commit | 01664814558343e4a305075e4155fc4ea7d499bd | [log] [tgz] |
---|---|---|
author | Anders Carlsson <andersca@mac.com> | Tue Jul 08 16:49:00 2008 +0000 |
committer | Anders Carlsson <andersca@mac.com> | Tue Jul 08 16:49:00 2008 +0000 |
tree | 5804ec4563a8b57959f3188f5d1843a887e3d666 | |
parent | 0a1e672dff50837e4cfd187098f6156d4187b22b [diff] [blame] |
Fix small bug. The evaluator now works well enough to pass all tests llvm-svn: 53238
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 860ff1c..db2fc458 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp
@@ -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!"); }