clang
7.0.0
|
Represents the diagnostic with the level of severity and possible fixes to be applied. More...
#include "clang/Tooling/Core/Diagnostic.h"
Public Types | |
enum | Level { Warning = DiagnosticsEngine::Warning, Error = DiagnosticsEngine::Error } |
Public Member Functions | |
Diagnostic ()=default | |
Diagnostic (llvm::StringRef DiagnosticName, Level DiagLevel, StringRef BuildDirectory) | |
Diagnostic (llvm::StringRef DiagnosticName, const DiagnosticMessage &Message, const llvm::StringMap< Replacements > &Fix, const SmallVector< DiagnosticMessage, 1 > &Notes, Level DiagLevel, llvm::StringRef BuildDirectory) | |
Public Attributes | |
std::string | DiagnosticName |
Name identifying the Diagnostic. More... | |
DiagnosticMessage | Message |
Message associated to the diagnostic. More... | |
llvm::StringMap< Replacements > | Fix |
Fixes to apply, grouped by file path. More... | |
SmallVector< DiagnosticMessage, 1 > | Notes |
Potential notes about the diagnostic. More... | |
Level | DiagLevel |
Diagnostic level. Can indicate either an error or a warning. More... | |
std::string | BuildDirectory |
A build directory of the diagnostic source file. More... | |
Represents the diagnostic with the level of severity and possible fixes to be applied.
Definition at line 50 of file Diagnostic.h.
Enumerator | |
---|---|
Warning | |
Error |
Definition at line 51 of file Diagnostic.h.
|
default |
clang::tooling::Diagnostic::Diagnostic | ( | llvm::StringRef | DiagnosticName, |
Diagnostic::Level | DiagLevel, | ||
StringRef | BuildDirectory | ||
) |
Definition at line 32 of file Diagnostic.cpp.
clang::tooling::Diagnostic::Diagnostic | ( | llvm::StringRef | DiagnosticName, |
const DiagnosticMessage & | Message, | ||
const llvm::StringMap< Replacements > & | Fix, | ||
const SmallVector< DiagnosticMessage, 1 > & | Notes, | ||
Level | DiagLevel, | ||
llvm::StringRef | BuildDirectory | ||
) |
Definition at line 37 of file Diagnostic.cpp.
std::string clang::tooling::Diagnostic::BuildDirectory |
A build directory of the diagnostic source file.
It's an absolute path which is directory
field of the source file in compilation database. If users don't specify the compilation database directory, it is the current directory where clang-tidy runs.
Note: it is empty in unittest.
Definition at line 88 of file Diagnostic.h.
Level clang::tooling::Diagnostic::DiagLevel |
Diagnostic level. Can indicate either an error or a warning.
Definition at line 79 of file Diagnostic.h.
std::string clang::tooling::Diagnostic::DiagnosticName |
Name identifying the Diagnostic.
Definition at line 67 of file Diagnostic.h.
llvm::StringMap<Replacements> clang::tooling::Diagnostic::Fix |
Fixes to apply, grouped by file path.
Definition at line 73 of file Diagnostic.h.
DiagnosticMessage clang::tooling::Diagnostic::Message |
Message associated to the diagnostic.
Definition at line 70 of file Diagnostic.h.
SmallVector<DiagnosticMessage, 1> clang::tooling::Diagnostic::Notes |
Potential notes about the diagnostic.
Definition at line 76 of file Diagnostic.h.