aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-06 05:42:39 +0000
committerChris Lattner <sabre@nondot.org>2008-10-06 05:42:39 +0000
commit46cfefa8a4e486ee6a9b8960f232237bf7a4b1f9 (patch)
treee3798cfdb9395012fd23fe69f6915d25d0f80b11 /lib/CodeGen/CGExprConstant.cpp
parent019f4e858e78587f2241ff1a76c747d7bcd7578c (diff)
"Enhance" CheckArithmeticConstantExpression to accept ?: with a constant
condition as a constant even if the unevaluated side is a not a constant. We don't do this when extensions are off, and we emit a warning when this happens: t.c:22:11: warning: expression is not a constant, but is accepted as one by GNU extensions short t = __builtin_constant_p(5353) ? 42 : somefunc(); ^ ~~~~~~~~~~ suggestions for improvement are welcome. This is obviously horrible, but is required for real-world code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions