[cfe-commits] r40110 - /cfe/trunk/AST/ASTContext.cpp
Chris Lattner
sabre at nondot.org
Fri Jul 20 11:13:33 PDT 2007
Author: lattner
Date: Fri Jul 20 13:13:33 2007
New Revision: 40110
URL: http://llvm.org/viewvc/llvm-project?rev=40110&view=rev
Log:
fix a nasty bug Owen noticed in a gcc warning.
Modified:
cfe/trunk/AST/ASTContext.cpp
Modified: cfe/trunk/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/ASTContext.cpp?rev=40110&r1=40109&r2=40110&view=diff
==============================================================================
--- cfe/trunk/AST/ASTContext.cpp (original)
+++ cfe/trunk/AST/ASTContext.cpp Fri Jul 20 13:13:33 2007
@@ -160,18 +160,18 @@
case Type::TypeName: assert(0 && "Not a canonical type!");
case Type::FunctionNoProto:
case Type::FunctionProto:
- assert(0 && "Incomplete types have no size!");
default:
+ assert(0 && "Incomplete types have no size!");
case Type::Array: {
std::pair<uint64_t, unsigned> EltInfo =
getTypeInfo(cast<ArrayType>(T)->getElementType(), L);
// Get the size of the array.
- llvm::APSInt Size(32);
- if (!cast<ArrayType>(T)->getSizeExpr()->isIntegerConstantExpr(Size, *this))
+ llvm::APSInt Sz(32);
+ if (!cast<ArrayType>(T)->getSizeExpr()->isIntegerConstantExpr(Sz, *this))
assert(0 && "VLAs not implemented yet!");
- Size = EltInfo.first*Size.getZExtValue();
+ Size = EltInfo.first*Sz.getZExtValue();
Align = EltInfo.second;
break;
}
More information about the cfe-commits
mailing list