[cfe-commits] r41338 - /cfe/trunk/AST/Expr.cpp
Chris Lattner
sabre at nondot.org
Thu Aug 23 14:42:51 PDT 2007
Author: lattner
Date: Thu Aug 23 16:42:50 2007
New Revision: 41338
URL: http://llvm.org/viewvc/llvm-project?rev=41338&view=rev
Log:
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.
Modified:
cfe/trunk/AST/Expr.cpp
Modified: cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Expr.cpp?rev=41338&r1=41337&r2=41338&view=diff
==============================================================================
--- cfe/trunk/AST/Expr.cpp (original)
+++ cfe/trunk/AST/Expr.cpp Thu Aug 23 16:42:50 2007
@@ -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()) {
More information about the cfe-commits
mailing list