diff options
author | Ted Kremenek <kremenek@apple.com> | 2013-05-04 01:13:12 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2013-05-04 01:13:12 +0000 |
commit | e644ed5308ab22e4bcb5f821fe7ea9dae324a0a8 (patch) | |
tree | 092708810500676365bb72f889e303266cf1efa6 /lib/StaticAnalyzer/Core/BugReporter.cpp | |
parent | f468fa16e37fc8fa6a915fe36aee8f0434709789 (diff) |
[analyzer;alternate edges] ignore parentheses when determining edge levels.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporter.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BugReporter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporter.cpp b/lib/StaticAnalyzer/Core/BugReporter.cpp index 759503a688..c198db2992 100644 --- a/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -1747,7 +1747,7 @@ const Stmt *getLocStmt(PathDiagnosticLocation L) { const Stmt *getStmtParent(const Stmt *S, ParentMap &PM) { if (!S) return 0; - return PM.getParent(S); + return PM.getParentIgnoreParens(S); } static bool optimizeEdges(PathPieces &path, @@ -1837,7 +1837,7 @@ static bool optimizeEdges(PathPieces &path, // (1.1 -> 1.1.1) -> (1.1.1 -> 1.2) becomes (1.1 -> 1.2). if (level1 && level2 && level1 == level4 && - level2 == level3 && PM.getParent(level2) == level1) { + level2 == level3 && PM.getParentIgnoreParens(level2) == level1) { PieceI->setEndLocation(PieceNextI->getEndLocation()); path.erase(NextI); hasChanges = true; @@ -1856,7 +1856,7 @@ static bool optimizeEdges(PathPieces &path, // // (1.1 -> 1.1.1) -> (1.1.1 -> X) becomes (1.1 -> X). // - if (level1 && level2 && level1 == PM.getParent(level2)) { + if (level1 && level2 && level1 == PM.getParentIgnoreParens(level2)) { PieceI->setEndLocation(PieceNextI->getEndLocation()); path.erase(NextI); hasChanges = true; |