]> granicus.if.org Git - clang/commit
CFG: In a DeclStmt, skip anything that's not a VarDecl.
authorJordan Rose <jordan_rose@apple.com>
Mon, 3 Jun 2013 22:59:41 +0000 (22:59 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 3 Jun 2013 22:59:41 +0000 (22:59 +0000)
commit2794bc0e3757992194dd587d0f6a253ec72afc9a
tree0207c86c013afeb310054f5cfabe8502c9b2af21
parent8fcb0452235eeecfae8cabd7381e146327a8472e
CFG: In a DeclStmt, skip anything that's not a VarDecl.

Neither the compiler nor the analyzer are doing anything with non-VarDecl
decls in the CFG, and having them there creates extra nodes in the
analyzer's path diagnostics. Simplify the CFG (and the path edges) by
simply leaving them out. We can always add interesting decls back in when
they become relevant.

Note that this only affects decls declared in a DeclStmt, and then only
those that appear within a function body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183157 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/CFG.cpp
test/Analysis/cfg.cpp
test/Analysis/edges-new.mm
test/Analysis/plist-output-alternate.m
test/Analysis/plist-output.m