diff options
| author | Ted Kremenek <kremenek@apple.com> | 2013-05-07 21:11:52 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2013-05-07 21:11:52 +0000 |
| commit | f3510071f30e63586adb55d8c96a07c37ed4a29f (patch) | |
| tree | c7af8acdec2921f561873baf177af1c407a7fa6b /clang/lib/StaticAnalyzer/Core/BugReporter.cpp | |
| parent | 2f2a3042e17b5807e337d09f58dce9b47e9f2fb4 (diff) | |
| download | bcm5719-llvm-f3510071f30e63586adb55d8c96a07c37ed4a29f.tar.gz bcm5719-llvm-f3510071f30e63586adb55d8c96a07c37ed4a29f.zip | |
[analyzer; alternate arrows] the extra edge to the closing '}' in a loop adds no value.
llvm-svn: 181357
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BugReporter.cpp')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp index 7ee172a7f9f..225b913f813 100644 --- a/clang/lib/StaticAnalyzer/Core/BugReporter.cpp +++ b/clang/lib/StaticAnalyzer/Core/BugReporter.cpp @@ -1723,12 +1723,6 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD, // Are we jumping to the head of a loop? Add a special diagnostic. if (const Stmt *Loop = BE->getSrc()->getLoopTarget()) { PathDiagnosticLocation L(Loop, SM, PDB.LC); - const CompoundStmt *CS = NULL; - - if (const ForStmt *FS = dyn_cast<ForStmt>(Loop)) - CS = dyn_cast<CompoundStmt>(FS->getBody()); - else if (const WhileStmt *WS = dyn_cast<WhileStmt>(Loop)) - CS = dyn_cast<CompoundStmt>(WS->getBody()); PathDiagnosticEventPiece *p = new PathDiagnosticEventPiece(L, "Looping back to the head " @@ -1738,11 +1732,6 @@ GenerateAlternateExtensivePathDiagnostic(PathDiagnostic& PD, addEdgeToPath(PD.getActivePath(), PrevLoc, p->getLocation(), LC); PD.getActivePath().push_front(p); EventCategory[p] = EC_LoopingBack; - - if (CS) { - addEdgeToPath(PD.getActivePath(), PrevLoc, - PathDiagnosticLocation::createEndBrace(CS, SM), LC); - } } const CFGBlock *BSrc = BE->getSrc(); |

