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.
llvm-svn: 41338
This commit is contained in:
parent
9aae513318
commit
9568880c3e
|
@ -401,8 +401,8 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx,
|
|||
|
||||
// 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()) {
|
||||
|
|
Loading…
Reference in New Issue