sizeof(x) doesn't require x to be an i-c-e for sizeof to be an i-c-e. Thanks to Neil for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41338 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Expr.cpp b/AST/Expr.cpp
index 7397e54..8701b9b 100644
--- a/AST/Expr.cpp
+++ b/AST/Expr.cpp
@@ -401,8 +401,8 @@
// Get the operand value. If this is sizeof/alignof, do not evalute the
// operand. This affects C99 6.6p3.
- if (Exp->isSizeOfAlignOfOp()) isEvaluated = false;
- if (!Exp->getSubExpr()->isIntegerConstantExpr(Result, Ctx,Loc, isEvaluated))
+ if (!Exp->isSizeOfAlignOfOp() &&
+ !Exp->getSubExpr()->isIntegerConstantExpr(Result, Ctx, Loc,isEvaluated))
return false;
switch (Exp->getOpcode()) {