clang 20.0.0git
|
This file contains the declaration of the SARIFDocumentWriter class, and associated builders such as: More...
#include "clang/Basic/Sarif.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Path.h"
#include <optional>
#include <string>
#include <utility>
Go to the source code of this file.
Functions | |
static StringRef | getFileName (FileEntryRef FE) |
static unsigned int | adjustColumnPos (FullSourceLoc Loc, unsigned int TokenLen=0) |
Calculate the column position expressed in the number of UTF-8 code points from column start to the source location. | |
URI | |
static std::string | percentEncodeURICharacter (char C) |
static std::string | fileNameToURI (StringRef Filename) |
SARIF Utilities | |
static json::Object | createMessage (StringRef Text) |
static json::Object | createTextRegion (const SourceManager &SM, const CharSourceRange &R) |
static json::Object | createLocation (json::Object &&PhysicalLocation, StringRef Message="") |
static StringRef | importanceToStr (ThreadFlowImportance I) |
static StringRef | resultLevelToStr (SarifResultLevel R) |
static json::Object | createThreadFlowLocation (json::Object &&Location, const ThreadFlowImportance &Importance) |
This file contains the declaration of the SARIFDocumentWriter class, and associated builders such as:
Definition in file Sarif.cpp.
|
static |
Calculate the column position expressed in the number of UTF-8 code points from column start to the source location.
Loc | The source location whose column needs to be calculated. |
TokenLen | Optional hint for when the token is multiple bytes long. |
Definition at line 117 of file Sarif.cpp.
References clang::SourceLocation::isInvalid(), and Loc.
Referenced by createTextRegion().
|
static |
Definition at line 166 of file Sarif.cpp.
References createMessage().
Referenced by clang::SarifDocumentWriter::appendResult().
|
static |
Definition at line 144 of file Sarif.cpp.
References Text.
Referenced by clang::SarifDocumentWriter::appendResult(), and createLocation().
|
static |
Definition at line 150 of file Sarif.cpp.
References adjustColumnPos(), clang::CharSourceRange::getBegin(), clang::CharSourceRange::getEnd(), and SM.
|
static |
Definition at line 202 of file Sarif.cpp.
References importanceToStr().
|
static |
|
static |
Definition at line 38 of file Sarif.cpp.
References Filename, clang::FileEntryRef::getFileEntry(), clang::FileEntryRef::getName(), and clang::FileEntry::tryGetRealPathName().
|
static |
Definition at line 174 of file Sarif.cpp.
Referenced by createThreadFlowLocation().
|
static |
Definition at line 54 of file Sarif.cpp.
References clang::C, and contains().
Referenced by fileNameToURI().
|
static |
Definition at line 186 of file Sarif.cpp.
Referenced by clang::SarifDocumentWriter::appendResult(), and clang::SarifDocumentWriter::endRun().