[cfe-commits] r53238 - /cfe/trunk/lib/AST/ExprConstant.cpp

Anders Carlsson andersca at mac.com
Tue Jul 8 09:49:25 PDT 2008


Author: andersca
Date: Tue Jul  8 11:49:00 2008
New Revision: 53238

URL: http://llvm.org/viewvc/llvm-project?rev=53238&view=rev
Log:
Fix small bug. The evaluator now works well enough to pass all tests

Modified:
    cfe/trunk/lib/AST/ExprConstant.cpp

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=53238&r1=53237&r2=53238&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Tue Jul  8 11:49:00 2008
@@ -339,7 +339,8 @@
     if (LV.getLValueBase())
       return APValue();
     
-    Result = llvm::APSInt(DestWidth, LV.getLValueOffset());
+    Result.extOrTrunc(DestWidth);
+    Result = LV.getLValueOffset();
   } else {
     assert(0 && "Unhandled cast!");
   }





More information about the cfe-commits mailing list