diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-28 23:26:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-28 23:26:52 +0000 |
commit | ee591a90c2e26c1ba33a4befb364a1c35fb2c311 (patch) | |
tree | 95cdcee2e48a995e8ba560c3d2aad1a6298813a0 /lib/AST/ExprConstant.cpp | |
parent | 50af19cb8aec23a182c9032e98e13f5da7707440 (diff) |
Fix assertion in constant expression evaluation. The LHS of a floating-point
binary operator isn't an rvalue if it's an assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 89bcacf2bb..6e2e15c6cb 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -2492,8 +2492,8 @@ bool FloatExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { return Visit(E->getRHS()); } - // We can't evaluate pointer-to-member operations. - if (E->isPtrMemOp()) + // We can't evaluate pointer-to-member operations or assignments. + if (E->isPtrMemOp() || E->isAssignmentOp()) return false; // FIXME: Diagnostics? I really don't understand how the warnings |