diff options
author | Anders Carlsson <andersca@mac.com> | 2008-12-01 02:07:06 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-12-01 02:07:06 +0000 |
commit | 564730a85769cb539f21ec2b9d0054eb9abf60a3 (patch) | |
tree | 9627d8abba3ed66f88b400274ff4f432af12577a /clang/lib/AST | |
parent | 8facc59e72dbb188bbbbc3aa10c95d9fb9c3d52d (diff) | |
download | bcm5719-llvm-564730a85769cb539f21ec2b9d0054eb9abf60a3.tar.gz bcm5719-llvm-564730a85769cb539f21ec2b9d0054eb9abf60a3.zip |
Emit the correct diagnostic when a comma is in an ICE.
llvm-svn: 60316
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 855385cf988..b9f3c77363a 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -516,13 +516,13 @@ bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { // Evaluate the side that actually matters; this needs to be // handled specially because calling Visit() on the LHS can // have strange results when it doesn't have an integral type. - if (Visit(E->getRHS())) - return true; - + if (!Visit(E->getRHS())) + return false; + if (Info.ShortCircuit) return Extension(E->getOperatorLoc(), diag::note_comma_in_ice, E); - return false; + return true; } if (E->isLogicalOp()) { |