]> granicus.if.org Git - clang/commit
Added static method "CFG::hasImplicitControlFlow".
authorTed Kremenek <kremenek@apple.com>
Tue, 11 Sep 2007 22:08:24 +0000 (22:08 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 11 Sep 2007 22:08:24 +0000 (22:08 +0000)
commit155383b0fcd0a12a103310010f8c0d084b90b090
tree66a803cc6ba29741c2f394381985186ceca5871f
parentf50ec1026d23282d94699f079ffb5edb9dfd951f
Added static method "CFG::hasImplicitControlFlow".

This method is used to determine if an expression contains implicit
control-flow, and thus appears in a distinct statement slot in the CFG.

For example:

  (1) x = ... ? ... ? ...

  logically becomes:

  (1) ... ? ... : ...  (a unique statement slot for the ternary ?)
  (2) x = [E1]         (where E1 is actually the ConditionalOperator*)

A client of the CFG, when walking the statement at (2), will encounter
E1.  In this case, hasImplicitControlFlow(E1) == true, and the client
will know that the expression E1 is explicitly placed into its own statement
slot to capture the implicit control-flow it has.

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