diff options
author | Chris Lattner <sabre@nondot.org> | 2008-07-11 19:19:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-07-11 19:19:21 +0000 |
commit | 2bd2e028cafdfbfe1dbc34a4c737eedcbf09527a (patch) | |
tree | 107c54ed3bb25afe19b810ec646a2dc38bdf68ca /clang/lib/Sema | |
parent | 36f82122997ca58789cc4ebd1cdedd9ad96f4ea3 (diff) | |
download | bcm5719-llvm-2bd2e028cafdfbfe1dbc34a4c737eedcbf09527a.tar.gz bcm5719-llvm-2bd2e028cafdfbfe1dbc34a4c737eedcbf09527a.zip |
rename "SInt" methods to "Int" in APValue.
llvm-svn: 53467
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 183d9a9a24b..4836be4b8ef 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1814,12 +1814,11 @@ QualType Sema::TryFixInvalidVariablyModifiedType(QualType T) { if (const VariableArrayType* VLATy = dyn_cast<VariableArrayType>(T)) { APValue Result; if (VLATy->getSizeExpr() && - VLATy->getSizeExpr()->tryEvaluate(Result, Context) && Result.isSInt() && - Result.getSInt() > llvm::APSInt(Result.getSInt().getBitWidth(), - Result.getSInt().isUnsigned())) { - return Context.getConstantArrayType(VLATy->getElementType(), - Result.getSInt(), - ArrayType::Normal, 0); + VLATy->getSizeExpr()->tryEvaluate(Result, Context) && Result.isInt()) { + llvm::APSInt &Res = Result.getInt(); + if (Res > llvm::APSInt(Res.getBitWidth(), Res.isUnsigned())) + return Context.getConstantArrayType(VLATy->getElementType(), + Res, ArrayType::Normal, 0); } } return QualType(); |