clang 8.0.0

Public Types | Public Member Functions | List of all members
clang::StoredDiagnostic Class Reference

Represents a diagnostic in a form that can be retained until its corresponding source manager is destroyed. More...

`#include "clang/Basic/Diagnostic.h"`

## Public Types
using | range_iterator = std::vector< CharSourceRange >::const_iterator
using | fixit_iterator = std::vector< FixItHint >::const_iterator

## Public Member Functions
| StoredDiagnostic ()=default
| StoredDiagnostic (DiagnosticsEngine::Level Level, const Diagnostic &Info)
| StoredDiagnostic (DiagnosticsEngine::Level Level, unsigned ID, StringRef Message)
| StoredDiagnostic (DiagnosticsEngine::Level Level, unsigned ID, StringRef Message, FullSourceLoc Loc, ArrayRef< CharSourceRange > Ranges, ArrayRef< FixItHint > Fixits)
| operator bool () const
| Evaluates true when this object stores a diagnostic. More...
unsigned | getID () const
DiagnosticsEngine::Level | getLevel () const
const FullSourceLoc & | getLocation () const
StringRef | getMessage () const
void | setLocation (FullSourceLoc Loc)
range_iterator | range_begin () const
range_iterator | range_end () const
unsigned | range_size () const
ArrayRef< CharSourceRange > | getRanges () const
fixit_iterator | fixit_begin () const
fixit_iterator | fixit_end () const
unsigned | fixit_size () const
ArrayRef< FixItHint > | getFixIts () const

## Detailed Description

Represents a diagnostic in a form that can be retained until its corresponding source manager is destroyed.

Definition at line 1437 of file Diagnostic.h.

## Member Typedef Documentation

## ◆ fixit_iterator

using clang::StoredDiagnostic::fixit_iterator = std::vector<FixItHint>::const_iterator

Definition at line 1475 of file Diagnostic.h.

## ◆ range_iterator

using clang::StoredDiagnostic::range_iterator = std::vector<CharSourceRange>::const_iterator

Definition at line 1465 of file Diagnostic.h.

## Constructor & Destructor Documentation

## ◆ StoredDiagnostic() [1/4]

clang::StoredDiagnostic::StoredDiagnostic | ( |  | ) |
| default

## ◆ StoredDiagnostic() [2/4]

StoredDiagnostic::StoredDiagnostic | ( | DiagnosticsEngine::Level | Level,
|  | const Diagnostic & | Info
| ) |  |

Definition at line 1089 of file Diagnostic.cpp.

References clang::Diagnostic::FormatDiagnostic(), clang::Diagnostic::getFixItHints(), clang::Diagnostic::getLocation(), clang::Diagnostic::getRanges(), clang::Diagnostic::getSourceManager(), clang::Diagnostic::hasSourceManager(), clang::SourceLocation::isInvalid(), and clang::SourceLocation::isValid().

## ◆ StoredDiagnostic() [3/4]

StoredDiagnostic::StoredDiagnostic | ( | DiagnosticsEngine::Level | Level,
|  | unsigned | ID,
|  | StringRef | Message
| ) |  |

Definition at line 1085 of file Diagnostic.cpp.

## ◆ StoredDiagnostic() [4/4]

StoredDiagnostic::StoredDiagnostic | ( | DiagnosticsEngine::Level | Level,
|  | unsigned | ID,
|  | StringRef | Message,
|  | FullSourceLoc | Loc,
|  | ArrayRef< CharSourceRange > | Ranges,
|  | ArrayRef< FixItHint > | Fixits
| ) |  |

Definition at line 1103 of file Diagnostic.cpp.

## Member Function Documentation

## ◆ fixit_begin()

fixit_iterator clang::StoredDiagnostic::fixit_begin | ( |  | ) | const
| inline

Definition at line 1477 of file Diagnostic.h.

Referenced by clang::DiagnosticsEngine::Report().

## ◆ fixit_end()

fixit_iterator clang::StoredDiagnostic::fixit_end | ( |  | ) | const
| inline

Definition at line 1478 of file Diagnostic.h.

Referenced by clang::DiagnosticsEngine::Report().

## ◆ fixit_size()

unsigned clang::StoredDiagnostic::fixit_size | ( |  | ) | const
| inline

Definition at line 1479 of file Diagnostic.h.

## ◆ getFixIts()

ArrayRef<FixItHint> clang::StoredDiagnostic::getFixIts | ( |  | ) | const
| inline

Definition at line 1481 of file Diagnostic.h.

Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), and makeStandaloneDiagnostic().

## ◆ getID()

unsigned clang::StoredDiagnostic::getID | ( |  | ) | const
| inline

Definition at line 1458 of file Diagnostic.h.

Referenced by makeStandaloneDiagnostic(), clang::DiagnosticsEngine::Report(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ getLevel()

DiagnosticsEngine::Level clang::StoredDiagnostic::getLevel | ( |  | ) | const
| inline

Definition at line 1459 of file Diagnostic.h.

Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), makeStandaloneDiagnostic(), clang::DiagnosticsEngine::Report(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ getLocation()

const FullSourceLoc& clang::StoredDiagnostic::getLocation | ( |  | ) | const
| inline

Definition at line 1460 of file Diagnostic.h.

Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), isNonDriverDiag(), makeStandaloneDiagnostic(), clang::DiagnosticsEngine::Report(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ getMessage()

StringRef clang::StoredDiagnostic::getMessage | ( |  | ) | const
| inline

Definition at line 1461 of file Diagnostic.h.

Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), makeStandaloneDiagnostic(), clang::DiagnosticsEngine::Report(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ getRanges()

ArrayRef<CharSourceRange> clang::StoredDiagnostic::getRanges | ( |  | ) | const
| inline

Definition at line 1471 of file Diagnostic.h.

Referenced by clang::DiagnosticRenderer::emitStoredDiagnostic(), makeStandaloneDiagnostic(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ operator bool()

clang::StoredDiagnostic::operator bool | ( |  | ) | const
| inline explicit

Evaluates true when this object stores a diagnostic.

Definition at line 1456 of file Diagnostic.h.

## ◆ range_begin()

range_iterator clang::StoredDiagnostic::range_begin | ( |  | ) | const
| inline

Definition at line 1467 of file Diagnostic.h.

Referenced by clang::DiagnosticsEngine::Report(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ range_end()

range_iterator clang::StoredDiagnostic::range_end | ( |  | ) | const
| inline

Definition at line 1468 of file Diagnostic.h.

Referenced by clang::DiagnosticsEngine::Report(), and clang::arcmt::writeARCDiagsToPlist().

## ◆ range_size()

unsigned clang::StoredDiagnostic::range_size | ( |  | ) | const
| inline

Definition at line 1469 of file Diagnostic.h.

## ◆ setLocation()

void clang::StoredDiagnostic::setLocation | ( | FullSourceLoc | Loc | ) |
| inline

Definition at line 1463 of file Diagnostic.h.

The documentation for this class was generated from the following files:

- include/clang/Basic/Diagnostic.h
- lib/Basic/Diagnostic.cpp