]> granicus.if.org Git - clang/commit
Add CFG logic to create a conditional branch for modeling static initializers.
authorTed Kremenek <kremenek@apple.com>
Thu, 28 Mar 2013 18:43:15 +0000 (18:43 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 28 Mar 2013 18:43:15 +0000 (18:43 +0000)
commitfbd4b5dc7febd1d8b4fa64ab00a29d72b44bec7b
tree37ce213d499eff1f3e353c475579a0127a1f59b3
parent9fdc00a237fe19b892f22780321ddfd1a3691d61
Add CFG logic to create a conditional branch for modeling static initializers.

This is an optional variant of the CFG.  This allows analyses to model whether
or not a static initializer has run, e.g.:

  static Foo x = bar();

For basic dataflow analysis in Sema we will just assume that the initializer
always runs.  For the static analyzer we can use this branch to accurately
track whether or not initializers are on.

This patch just adds the (opt-in) functionality to the CFG.  The
static analyzer still needs to be modified to adopt this feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178263 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Analysis/CFG.h
lib/Analysis/CFG.cpp