зеркало из https://github.com/microsoft/clang-1.git
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
This commit is contained in:
Родитель
d4fdee3547
Коммит
602dafdea3
|
@ -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()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче