From: Ted Kremenek Date: Tue, 28 Apr 2009 04:28:12 +0000 (+0000) Subject: Extensive diagnostics: Do not add a location context for do...while statements. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a902d5599961dbeb91631ec912fae6a10f6c2839;p=clang Extensive diagnostics: Do not add a location context for do...while statements. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70286 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 8db4dfa247..3c814dbb67 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp @@ -1010,7 +1010,7 @@ static void GenerateExtensivePathDiagnostic(PathDiagnostic& PD, const CFGBlock &Blk = *BE->getSrc(); const Stmt *Term = Blk.getTerminator(); - if (Term) + if (Term && !isa(Term)) EB.addContext(Term); // Are we jumping to the head of a loop? Add a special diagnostic.