diff options
author | Anna Zaks <ganna@apple.com> | 2011-08-18 22:37:56 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-08-18 22:37:56 +0000 |
commit | 8e6431adab313e283a992698f6fc7afe62420999 (patch) | |
tree | a933834cb37fa51a46c18feab2dcb747adbf3e1e /lib/StaticAnalyzer/Core/CFRefCount.cpp | |
parent | 47695c8ad8424851f62e0d4a983b45b15daee1c5 (diff) |
Static Analyzer Diagnostics: Move custom diagnostic visitors from BugReporterContext to BugReport.
One API change: I added BugReporter as an additional parameter to the BugReporterVisitor::VisitNode() method to allow visitors register other visitors with the report on the fly (while processing a node). This functionality is used by NilReceiverVisitor, which registers TrackNullOrUndefValue when the receiver is null.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CFRefCount.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CFRefCount.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/CFRefCount.cpp b/lib/StaticAnalyzer/Core/CFRefCount.cpp index 3c395fe282..78325f366c 100644 --- a/lib/StaticAnalyzer/Core/CFRefCount.cpp +++ b/lib/StaticAnalyzer/Core/CFRefCount.cpp @@ -1994,7 +1994,8 @@ namespace { PathDiagnosticPiece *VisitNode(const ExplodedNode *N, const ExplodedNode *PrevN, - BugReporterContext &BRC); + BugReporterContext &BRC, + BugReport &BR); }; class CFRefLeakReport : public CFRefReport { @@ -2061,7 +2062,8 @@ static inline bool contains(const SmallVectorImpl<ArgEffect>& V, PathDiagnosticPiece *CFRefReport::VisitNode(const ExplodedNode *N, const ExplodedNode *PrevN, - BugReporterContext &BRC) { + BugReporterContext &BRC, + BugReport &BR) { if (!isa<PostStmt>(N->getLocation())) return NULL; |