clang: lib/StaticAnalyzer/Core/SarifDiagnostics.cpp File Reference (original) (raw)

#include "[clang/Analysis/MacroExpansionContext.h](MacroExpansionContext%5F8h%5Fsource.html)"
#include "[clang/Analysis/PathDiagnostic.h](PathDiagnostic%5F8h%5Fsource.html)"
#include "[clang/Basic/FileManager.h](FileManager%5F8h%5Fsource.html)"
#include "[clang/Basic/Sarif.h](Sarif%5F8h%5Fsource.html)"
#include "[clang/Basic/SourceManager.h](SourceManager%5F8h%5Fsource.html)"
#include "[clang/Basic/Version.h](Version%5F8h%5Fsource.html)"
#include "[clang/Lex/Preprocessor.h](Preprocessor%5F8h%5Fsource.html)"
#include "[clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h](PathDiagnosticConsumers%5F8h%5Fsource.html)"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Path.h"
#include "clang/StaticAnalyzer/Checkers/Checkers.inc"

Go to the source code of this file.

Macros
#define GET_CHECKERS
#define CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN) .Case(FULLNAME, HELPTEXT)
#define GET_CHECKERS
#define CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN) .Case(FULLNAME, DOC_URI)
Functions
static StringRef getRuleDescription (StringRef CheckName)
static StringRef getRuleHelpURIStr (StringRef CheckName)
static ThreadFlowImportance calculateImportance (const PathDiagnosticPiece &Piece)
static CharSourceRange convertTokenRangeToCharRange (const SourceRange &R, const SourceManager &SM, const LangOptions &LO)
Accepts a SourceRange corresponding to a pair of the first and last tokens and converts to a Character granular CharSourceRange.
static SmallVector< ThreadFlow, 8 > createThreadFlows (const PathDiagnostic *Diag, const LangOptions &LO)
static StringMap< uint32_t > createRuleMapping (const std::vector< const PathDiagnostic * > &Diags, SarifDocumentWriter &SarifWriter)
static SarifResult createResult (const PathDiagnostic *Diag, const StringMap< uint32_t > &RuleMapping, const LangOptions &LO)

CHECKER [1/2]

| #define CHECKER | ( | | FULLNAME, | | --------------- | ------------------------- | | --------- | | | CLASS, | | | | | | HELPTEXT, | | | | | | DOC_URI, | | | | | | IS_HIDDEN | | | | | ) | .Case(FULLNAME, HELPTEXT) | | |

CHECKER [2/2]

| #define CHECKER | ( | | FULLNAME, | | --------------- | ------------------------- | | --------- | | | CLASS, | | | | | | HELPTEXT, | | | | | | DOC_URI, | | | | | | IS_HIDDEN | | | | | ) | .Case(FULLNAME, DOC_URI) | | |

GET_CHECKERS [1/2]

GET_CHECKERS [2/2]

calculateImportance()

convertTokenRangeToCharRange()

createResult()

createRuleMapping()

createThreadFlows()

getRuleDescription()

static StringRef getRuleDescription ( StringRef CheckName) static

getRuleHelpURIStr()

static StringRef getRuleHelpURIStr ( StringRef CheckName) static