[cfe-commits] r39645 - /cfe/cfe/trunk/AST/Expr.cpp
clattner at cs.uiuc.edu
clattner at cs.uiuc.edu
Wed Jul 11 09:46:36 PDT 2007
Author: clattner
Date: Wed Jul 11 11:46:36 2007
New Revision: 39645
URL: http://llvm.org/viewvc/llvm-project?rev=39645&view=rev
Log:
Enums are integer constant exprs, return their values.
Modified:
cfe/cfe/trunk/AST/Expr.cpp
Modified: cfe/cfe/trunk/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/AST/Expr.cpp?rev=39645&r1=39644&r2=39645&view=diff
==============================================================================
--- cfe/cfe/trunk/AST/Expr.cpp (original)
+++ cfe/cfe/trunk/AST/Expr.cpp Wed Jul 11 11:46:36 2007
@@ -229,10 +229,7 @@
case DeclRefExprClass:
if (const EnumConstantDecl *D =
dyn_cast<EnumConstantDecl>(cast<DeclRefExpr>(this)->getDecl())) {
- D = D;
- // FIXME: Get the real assigned value and width.
- Result.zextOrTrunc(32); // FIXME: NOT RIGHT IN GENERAL.
- Result = 0;
+ Result = D->getInitVal();
break;
}
if (Loc) *Loc = getLocStart();
More information about the cfe-commits
mailing list