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 | 992b3112ce2966a8fabfacd997d6925eb893e7b7 (patch) | |
| tree | 2fdc16f4b5c7c48027a7e80e289b82856c0661ce /clang | |
| parent | bcd6b0d891ab079c40dfeee8395b88491c63369f (diff) | |
| download | bcm5719-llvm-992b3112ce2966a8fabfacd997d6925eb893e7b7.tar.gz bcm5719-llvm-992b3112ce2966a8fabfacd997d6925eb893e7b7.zip | |
[analyzer;alternate edges] ignore parentheses when determining edge levels.
llvm-svn: 181087
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index 759503a688b..c198db29926 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/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; |

