]> granicus.if.org Git - clang/commitdiff
Extensive diagnostics: Do not add a location context for do...while statements.
authorTed Kremenek <kremenek@apple.com>
Tue, 28 Apr 2009 04:28:12 +0000 (04:28 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 28 Apr 2009 04:28:12 +0000 (04:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70286 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index 8db4dfa247325397ea07ed9549dcd097dc56b5a2..3c814dbb67bd00eea172e413d7d1b4be1f8591d6 100644 (file)
@@ -1010,7 +1010,7 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD,
       const CFGBlock &Blk = *BE->getSrc();
       const Stmt *Term = Blk.getTerminator();
       
-      if (Term)
+      if (Term && !isa<DoStmt>(Term))
         EB.addContext(Term);
 
       // Are we jumping to the head of a loop?  Add a special diagnostic.