]> granicus.if.org Git - clang/commit
Add Expr::EvaluateAsBooleanCondition(), which does unprincipled folding to
authorJohn McCall <rjmccall@apple.com>
Tue, 5 Jan 2010 23:42:56 +0000 (23:42 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 5 Jan 2010 23:42:56 +0000 (23:42 +0000)
commitcd7a445c6b46c5585580dfb652300c8483c0cb6b
tree1330a8434ff577b5dd5d839fa099e4dba5d6af02
parent377adb6cffb3fdfcf659303d6f901adef4d61971
Add Expr::EvaluateAsBooleanCondition(), which does unprincipled folding to
try to evaluate an expression as a constant boolean condition.  This has
the same intended semantics as used in folding conditional operators.

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