[cfe-commits] r171191 - in /cfe/trunk: lib/AST/ExprConstant.cpp test/Sema/i-c-e.c
Richard Smith
richard-llvm at metafoo.co.uk
Fri Dec 28 04:53:55 PST 2012
Author: rsmith
Date: Fri Dec 28 06:53:55 2012
New Revision: 171191
URL: http://llvm.org/viewvc/llvm-project?rev=171191&view=rev
Log:
PR14729: Fix typo in CheckICE for BinaryConditionalOperators.
Modified:
cfe/trunk/lib/AST/ExprConstant.cpp
cfe/trunk/test/Sema/i-c-e.c
Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=171191&r1=171190&r2=171191&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Fri Dec 28 06:53:55 2012
@@ -6734,7 +6734,7 @@
if (FalseResult.Val == 2) return FalseResult;
if (CommonResult.Val == 1) return CommonResult;
if (FalseResult.Val == 1 &&
- Exp->getCommon()->EvaluateKnownConstInt(Ctx) == 0) return NoDiag();
+ Exp->getCommon()->EvaluateKnownConstInt(Ctx) != 0) return NoDiag();
return FalseResult;
}
case Expr::ConditionalOperatorClass: {
Modified: cfe/trunk/test/Sema/i-c-e.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/i-c-e.c?rev=171191&r1=171190&r2=171191&view=diff
==============================================================================
--- cfe/trunk/test/Sema/i-c-e.c (original)
+++ cfe/trunk/test/Sema/i-c-e.c Fri Dec 28 06:53:55 2012
@@ -73,3 +73,5 @@
int chooseexpr[__builtin_choose_expr(1, 1, expr)];
int realop[(__real__ 4) == 4 ? 1 : -1];
int imagop[(__imag__ 4) == 0 ? 1 : -1];
+
+int *PR14729 = 0 ?: 1/0; // expected-error {{not a compile-time constant}} expected-warning 3{{}}
More information about the cfe-commits
mailing list