<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Depending on how the loop-back-to-top arrow is drawn, this might not be the case. If it's drawn along the left edge (for a while loop), I'd rather have it come from the close brace. If it's drawn along the right edge (for a for loop), this is less important.</div><div><br></div><div>...then again, the arrow should <i>not</i> go to the close brace after a 'continue'. So...</div><div><br></div><br><div><div>On May 7, 2013, at 14:11 , Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Author: kremenek<br>Date: Tue May  7 16:11:52 2013<br>New Revision: 181357<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=181357&view=rev">http://llvm.org/viewvc/llvm-project?rev=181357&view=rev</a><br>Log:<br>[analyzer; alternate arrows] the extra edge to the closing '}' in a loop adds no value.<br><br>Modified:<br>   cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp<br><br>Modified: cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=181357&r1=181356&r2=181357&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp?rev=181357&r1=181356&r2=181357&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp (original)<br>+++ cfe/trunk/lib/StaticAnalyzer/Core/BugReporter.cpp Tue May  7 16:11:52 2013<br>@@ -1723,12 +1723,6 @@ GenerateAlternateExtensivePathDiagnostic<br>        // Are we jumping to the head of a loop?  Add a special diagnostic.<br>        if (const Stmt *Loop = BE->getSrc()->getLoopTarget()) {<br>          PathDiagnosticLocation L(Loop, SM, PDB.LC);<br>-          const CompoundStmt *CS = NULL;<br>-<br>-          if (const ForStmt *FS = dyn_cast<ForStmt>(Loop))<br>-            CS = dyn_cast<CompoundStmt>(FS->getBody());<br>-          else if (const WhileStmt *WS = dyn_cast<WhileStmt>(Loop))<br>-            CS = dyn_cast<CompoundStmt>(WS->getBody());<br><br>          PathDiagnosticEventPiece *p =<br>            new PathDiagnosticEventPiece(L, "Looping back to the head "<br>@@ -1738,11 +1732,6 @@ GenerateAlternateExtensivePathDiagnostic<br>          addEdgeToPath(PD.getActivePath(), PrevLoc, p->getLocation(), LC);<br>          PD.getActivePath().push_front(p);<br>          EventCategory[p] = EC_LoopingBack;<br>-<br>-          if (CS) {<br>-            addEdgeToPath(PD.getActivePath(), PrevLoc,<br>-                          PathDiagnosticLocation::createEndBrace(CS, SM), LC);<br>-          }<br>        }<br><br>        const CFGBlock *BSrc = BE->getSrc();<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a></div></blockquote></div><br></body></html>