]> granicus.if.org Git - clang/commit
[analyzer; new edges] In for(;;), use the ForStmt itself for loop notes.
authorJordan Rose <jordan_rose@apple.com>
Thu, 30 May 2013 01:05:58 +0000 (01:05 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 30 May 2013 01:05:58 +0000 (01:05 +0000)
commit3e8a85fcfc3d264e4c5b21fbdd741bbc0c24a266
tree87acf4d6f6e84b01a30e167fa1186c6822213c60
parent1bc085aec3901e22b819bb6761d5ccc360194604
[analyzer; new edges] In for(;;), use the ForStmt itself for loop notes.

Most loop notes (like "entering loop body") are attached to the condition
expression guarding a loop or its equivalent. For loops may not have a
condition expression, though. Rather than crashing, just use the entire
ForStmt as the location. This is probably the best we can do.

<rdar://problem/14016063>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182904 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporter.cpp
test/Analysis/edges-new.mm [moved from test/Analysis/edges-new.m with 87% similarity]