|
clang 22.0.0git
|
#include "SarifDiagnostics.h"#include "HTMLDiagnostics.h"#include "clang/Analysis/IssueHash.h"#include "clang/Analysis/MacroExpansionContext.h"#include "clang/Analysis/PathDiagnostic.h"#include "clang/Basic/Sarif.h"#include "clang/Basic/SourceManager.h"#include "clang/Basic/Version.h"#include "clang/Lex/Preprocessor.h"#include "clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h"#include "llvm/ADT/StringMap.h"#include "llvm/Support/ConvertUTF.h"#include "llvm/Support/JSON.h"#include <memory>#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) |
| #define | GET_CHECKERS |
| #define | CHECKER(FULLNAME, CLASS, HELPTEXT, DOC_URI, IS_HIDDEN) |
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) |
Variables | |
| static const llvm::StringRef | IssueHashKey = "clang/issueHash/v1" |
| #define CHECKER | ( | FULLNAME, | |
| CLASS, | |||
| HELPTEXT, | |||
| DOC_URI, | |||
| IS_HIDDEN ) |
| #define CHECKER | ( | FULLNAME, | |
| CLASS, | |||
| HELPTEXT, | |||
| DOC_URI, | |||
| IS_HIDDEN ) |
| #define GET_CHECKERS |
| #define GET_CHECKERS |
|
static |
Definition at line 109 of file SarifDiagnostics.cpp.
References clang::ento::PathDiagnosticPiece::Call, clang::ento::PathDiagnosticPiece::ControlFlow, clang::Essential, clang::ento::PathDiagnosticPiece::Event, clang::ento::PathDiagnosticPiece::getKind(), clang::ento::PathDiagnosticPiece::getTagStr(), clang::Important, clang::ento::PathDiagnosticPiece::Macro, clang::ento::PathDiagnosticPiece::Note, clang::ento::PathDiagnosticPiece::PopUp, and clang::Unimportant.
Referenced by createThreadFlows().
|
static |
Accepts a SourceRange corresponding to a pair of the first and last tokens and converts to a Character granular CharSourceRange.
Definition at line 129 of file SarifDiagnostics.cpp.
References clang::SourceRange::getBegin(), clang::CharSourceRange::getCharRange(), clang::SourceRange::getEnd(), clang::Lexer::getLocForEndOfToken(), and SM.
Referenced by createThreadFlows().
|
static |
Definition at line 163 of file SarifDiagnostics.cpp.
References clang::SarifRule::create(), clang::SarifDocumentWriter::createRule(), getRuleDescription(), getRuleHelpURIStr(), clang::SarifRule::setDescription(), clang::SarifRule::setHelpURI(), clang::SarifRule::setName(), and clang::SarifRule::setRuleId().
|
static |
Definition at line 146 of file SarifDiagnostics.cpp.
References calculateImportance(), convertTokenRangeToCharRange(), clang::ThreadFlow::create(), Diag(), clang::ThreadFlow::setImportance(), clang::ThreadFlow::setMessage(), and clang::ThreadFlow::setRange().
|
static |
Definition at line 86 of file SarifDiagnostics.cpp.
Referenced by createRuleMapping().
|
static |
Definition at line 97 of file SarifDiagnostics.cpp.
Referenced by createRuleMapping().
|
static |
Definition at line 184 of file SarifDiagnostics.cpp.