|
clang 22.0.0git
|
Carries a Clang diagnostic in an llvm::Error. More...
#include "clang/Basic/DiagnosticError.h"
Public Member Functions | |
| DiagnosticError (PartialDiagnosticAt Diag) | |
| void | log (raw_ostream &OS) const override |
| PartialDiagnosticAt & | getDiagnostic () |
| const PartialDiagnosticAt & | getDiagnostic () const |
Static Public Member Functions | |
| static llvm::Error | create (SourceLocation Loc, PartialDiagnostic Diag) |
Creates a new DiagnosticError that contains the given diagnostic at the given location. | |
| static std::optional< PartialDiagnosticAt > | take (llvm::Error &Err) |
Extracts and returns the diagnostic payload from the given Error if the error is a DiagnosticError. | |
Static Public Attributes | |
| static char | ID |
Carries a Clang diagnostic in an llvm::Error.
Users should emit the stored diagnostic using the DiagnosticsEngine.
Definition at line 21 of file DiagnosticError.h.
|
inline |
Definition at line 23 of file DiagnosticError.h.
Referenced by take().
|
inlinestatic |
Creates a new DiagnosticError that contains the given diagnostic at the given location.
Definition at line 32 of file DiagnosticError.h.
Referenced by clang::tooling::RefactoringRuleContext::createDiagnosticError().
|
inline |
Definition at line 27 of file DiagnosticError.h.
Referenced by take().
|
inline |
Definition at line 28 of file DiagnosticError.h.
|
inlineoverride |
Definition at line 25 of file DiagnosticError.h.
|
inlinestatic |
Extracts and returns the diagnostic payload from the given Error if the error is a DiagnosticError.
Returns std::nullopt if the given error is not a DiagnosticError.
Definition at line 40 of file DiagnosticError.h.
References DiagnosticError(), getDiagnostic(), and clang::Result.
|
static |
Definition at line 48 of file DiagnosticError.h.