evaluator if they are actually int expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271754
91177308-0d34-0410-b5e6-
96231b3b80d8
static bool shouldEnqueue(const BinaryOperator *E) {
return E->getOpcode() == BO_Comma ||
E->isLogicalOp() ||
- (E->getLHS()->getType()->isIntegralOrEnumerationType() &&
+ (E->isRValue() &&
+ E->getType()->isIntegralOrEnumerationType() &&
+ E->getLHS()->getType()->isIntegralOrEnumerationType() &&
E->getRHS()->getType()->isIntegralOrEnumerationType());
}
static_assert(!f(), "");
}
+
+namespace PR27989 {
+ constexpr int f(int n) {
+ int a = (n = 1, 0);
+ return n;
+ }
+ static_assert(f(0) == 1, "");
+}