Don't try to evaluate the LHS or RHS of a member pointer binary operation. Fixes PR8507.
llvm-svn: 117850
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 715d30e..61f5b13 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -1966,6 +1966,10 @@
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);