aboutsummaryrefslogtreecommitdiff
path: root/include/clang/StaticAnalyzer/Core
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-03 00:22:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-03 00:22:49 +0000
commitae8c50552df2498130dd33a940d98e0dc4ec26b9 (patch)
tree51b143bfdbacccdc8875411a877d0328cfb493cd /include/clang/StaticAnalyzer/Core
parentaeeacf725c9e0ddd64ea9764bd008e5b6873ce51 (diff)
Revert "Change LocationContextMap to be a temporary instead of shared variable in BugReporter."
This reverts commit 180974. It broke the build. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/StaticAnalyzer/Core')
-rw-r--r--include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
index 5c560b2f0e..7a87e47f74 100644
--- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
+++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
@@ -406,6 +406,11 @@ private:
/// A vector of BugReports for tracking the allocated pointers and cleanup.
std::vector<BugReportEquivClass *> EQClassesVector;
+ /// A map from PathDiagnosticPiece to the LocationContext of the inlined
+ /// function call it represents.
+ llvm::DenseMap<const PathDiagnosticCallPiece*,
+ const LocationContext*> LocationContextMap;
+
protected:
BugReporter(BugReporterData& d, Kind k) : BugTypes(F.getEmptySet()), kind(k),
D(d) {}
@@ -477,6 +482,10 @@ public:
EmitBasicReport(DeclWithIssue, BugName, Category, BugStr, Loc, &R, 1);
}
+ void addCallPieceLocationContextPair(const PathDiagnosticCallPiece *C,
+ const LocationContext *LC) {
+ LocationContextMap[C] = LC;
+ }
private:
llvm::StringMap<BugType *> StrBugTypes;