diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-16 17:22:48 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-16 17:22:48 +0000 |
commit | 2ad226bdc847df6b6b6e4f832856478ab63bb3dc (patch) | |
tree | fc2c092df8c2ea90a2e46b070be258be7b4f0492 /lib/AST/ExprConstant.cpp | |
parent | 261e75bd10198c336aded42f0398a13f7bf88889 (diff) |
PR11391: Don't try to evaluate the LHS of a _Complex assignment as an rvalue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 699d81715e..f461ec6429 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -3695,10 +3695,14 @@ bool ComplexExprEvaluator::VisitCastExpr(const CastExpr *E) { } bool ComplexExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { + if (E->isPtrMemOp() || E->isAssignmentOp()) + return ExprEvaluatorBaseTy::VisitBinaryOperator(E); + if (E->getOpcode() == BO_Comma) { VisitIgnoredValue(E->getLHS()); return Visit(E->getRHS()); } + if (!Visit(E->getLHS())) return false; |