struct DiagnosticMessage
Declaration
struct DiagnosticMessage { /* full declaration omitted */ };
Description
Represents the diagnostic message with the error message associated and the information on the location of the problem.
Declared at: clang/include/clang/Tooling/Core/Diagnostic.h:42
Member Variables
- public std::string Message
- public std::string FilePath
- public unsigned int FileOffset
- public llvm::StringMap<Replacements> Fix
- Fixes for this diagnostic, grouped by file path.
- public llvm::SmallVector<FileByteRange, 1> Ranges
- Extra source ranges associated with the note, in addition to the location of the Message itself.
Method Overview
- public DiagnosticMessage(llvm::StringRef Message = "")
- public DiagnosticMessage(llvm::StringRef Message, const clang::SourceManager & Sources, clang::SourceLocation Loc)
Methods
¶DiagnosticMessage(llvm::StringRef Message = "")
DiagnosticMessage(llvm::StringRef Message = "")
Declared at: clang/include/clang/Tooling/Core/Diagnostic.h:43
Parameters
- llvm::StringRef Message = ""
¶DiagnosticMessage(
llvm::StringRef Message,
const clang::SourceManager& Sources,
clang::SourceLocation Loc)
DiagnosticMessage(
llvm::StringRef Message,
const clang::SourceManager& Sources,
clang::SourceLocation Loc)
Description
Constructs a diagnostic message with anoffset to the diagnostic within the file where the problem occurred.
Declared at: clang/include/clang/Tooling/Core/Diagnostic.h:51
Parameters
- llvm::StringRef Message
- const clang::SourceManager& Sources
- clang::SourceLocation Loc
- Should be a file location, it is not meaningful for a macro location.