14#ifndef LLVM_CLANG_FRONTEND_SARIFDIAGNOSTIC_H
15#define LLVM_CLANG_FRONTEND_SARIFDIAGNOSTIC_H
19#include "llvm/ADT/StringRef.h"
52 StringRef ModuleName)
override;
55 StringRef ModuleName)
override;
static DiagnosticBuilder Diag(DiagnosticsEngine *Diags, const LangOptions &Features, FullSourceLoc TokLoc, const char *TokBegin, const char *TokRangeBegin, const char *TokRangeEnd, unsigned DiagID)
Produce a diagnostic highlighting some portion of a literal.
Defines clang::SarifDocumentWriter, clang::SarifRule, clang::SarifResult.
Options for controlling the compiler diagnostics engine.
Class to encapsulate the logic for formatting a diagnostic message.
const LangOptions & LangOpts
IntrusiveRefCntPtr< DiagnosticOptions > DiagOpts
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) ...
Level
The level of the diagnostic, after it has been through mapping.
A SourceLocation and its associated SourceManager.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Represents an unpacked "presumed" location which can be presented to the user.
SARIFDiagnostic(const SARIFDiagnostic &)=delete
void emitIncludeLocation(FullSourceLoc Loc, PresumedLoc PLoc) override
~SARIFDiagnostic()=default
void emitDiagnosticMessage(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, StringRef Message, ArrayRef< CharSourceRange > Ranges, DiagOrStoredDiag D) override
void emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc, DiagnosticsEngine::Level Level, ArrayRef< CharSourceRange > Ranges) override
Print out the file/line/column information and include trace.
SARIFDiagnostic & operator=(const SARIFDiagnostic &&)=delete
void emitImportLocation(FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
void emitCodeContext(FullSourceLoc Loc, DiagnosticsEngine::Level Level, SmallVectorImpl< CharSourceRange > &Ranges, ArrayRef< FixItHint > Hints) override
SARIFDiagnostic(SARIFDiagnostic &&)=delete
void emitBuildingModuleLocation(FullSourceLoc Loc, PresumedLoc PLoc, StringRef ModuleName) override
SARIFDiagnostic & operator=(const SARIFDiagnostic &)=delete
This class handles creating a valid SARIF document given various input attributes.
A SARIF result (also called a "reporting item") is a unit of output produced when one of the tool's r...
A SARIF rule (reportingDescriptor object) contains information that describes a reporting item genera...
This class handles loading and caching of source files into memory.
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
llvm::PointerUnion< const Diagnostic *, const StoredDiagnostic * > DiagOrStoredDiag