aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h')
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
index b0bb12feba20..e9c682d7986c 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
@@ -118,7 +118,7 @@ public:
/// Only runs visitors, no output generated.
None,
- /// Used for HTML and text output.
+ /// Used for HTML, SARIF, and text output.
Minimal,
/// Used for plist output, used for "arrows" generation.
@@ -178,10 +178,9 @@ public:
PathDiagnosticLocation() = default;
/// Create a location corresponding to the given statement.
- PathDiagnosticLocation(const Stmt *s,
- const SourceManager &sm,
+ PathDiagnosticLocation(const Stmt *s, const SourceManager &sm,
LocationOrAnalysisDeclContext lac)
- : K(s->getLocStart().isValid() ? StmtK : SingleLocK),
+ : K(s->getBeginLoc().isValid() ? StmtK : SingleLocK),
S(K == StmtK ? s : nullptr), SM(&sm),
Loc(genLocation(SourceLocation(), lac)), Range(genRange(lac)) {
assert(K == SingleLocK || S);
@@ -633,7 +632,7 @@ public:
}
static std::shared_ptr<PathDiagnosticCallPiece>
- construct(const ExplodedNode *N, const CallExitEnd &CE,
+ construct(const CallExitEnd &CE,
const SourceManager &SM);
static PathDiagnosticCallPiece *construct(PathPieces &pieces,
@@ -760,7 +759,7 @@ public:
};
/// File IDs mapped to sets of line numbers.
-using FilesToLineNumsMap = std::map<unsigned, std::set<unsigned>>;
+using FilesToLineNumsMap = std::map<FileID, std::set<unsigned>>;
/// PathDiagnostic - PathDiagnostic objects represent a single path-sensitive
/// diagnostic. It represents an ordered-collection of PathDiagnosticPieces,
@@ -859,13 +858,13 @@ public:
meta_iterator meta_end() const { return OtherDesc.end(); }
void addMeta(StringRef s) { OtherDesc.push_back(s); }
- using filesmap_iterator = FilesToLineNumsMap::const_iterator;
-
- filesmap_iterator executedLines_begin() const {
- return ExecutedLines->begin();
+ const FilesToLineNumsMap &getExecutedLines() const {
+ return *ExecutedLines;
}
- filesmap_iterator executedLines_end() const { return ExecutedLines->end(); }
+ FilesToLineNumsMap &getExecutedLines() {
+ return *ExecutedLines;
+ }
PathDiagnosticLocation getLocation() const {
return Loc;