aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-10-31 01:21:47 +0000
committerAnders Carlsson <andersca@mac.com>2010-10-31 01:21:47 +0000
commit96e93660124c8028a4c3bcc038ab0cdd18cd7ab2 (patch)
treed475d53ce4726b4dd9cc1d206442d43c7e8c3eba /lib/AST/ExprConstant.cpp
parent0f279e756e3df69f9e071c572805e5d3e89123a2 (diff)
Don't try to evaluate the LHS or RHS of a member pointer binary operation. Fixes PR8507.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 715d30ead0..61f5b136ac 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -1966,6 +1966,10 @@ bool FloatExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) {
return true;
}
+ // We can't evaluate pointer-to-member operations.
+ if (E->isPtrMemOp())
+ return false;
+
// FIXME: Diagnostics? I really don't understand how the warnings
// and errors are supposed to work.
APFloat RHS(0.0);