diff options
author | Anna Zaks <ganna@apple.com> | 2013-03-27 17:35:58 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-03-27 17:35:58 +0000 |
commit | 4a49df3be929d442535d6721ab8a2bbc8a7cd528 (patch) | |
tree | aaab4d76bf89f9f37ad424c0490221a1c2bd0ffe /lib/StaticAnalyzer/Core | |
parent | ea744ab5f39b8f45f802301841b77398166bce8f (diff) |
[analyzer] Ensure that the node NilReceiverBRVisitor is looking for is not reclaimed
The visitor should look for the PreStmt node as the receiver is nil in the PreStmt and this is the node. Also, tag the nil
receiver nodes with a special tag for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporterVisitors.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp index 4539d85cca..3146e6c60e 100644 --- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp +++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp @@ -981,7 +981,7 @@ PathDiagnosticPiece *NilReceiverBRVisitor::VisitNode(const ExplodedNode *N, const ExplodedNode *PrevN, BugReporterContext &BRC, BugReport &BR) { - Optional<PostStmt> P = N->getLocationAs<PostStmt>(); + Optional<PreStmt> P = N->getLocationAs<PreStmt>(); if (!P) return 0; const ObjCMessageExpr *ME = P->getStmtAs<ObjCMessageExpr>(); |