aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-13 23:47:13 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-13 23:47:13 +0000
commit32442bbc98bafa512fa42d46fedf60ed7d79f574 (patch)
tree52d208f90cc5ef783f847b7b91300759a6cd62c6 /lib/Sema/SemaStmt.cpp
parent3998d3fb8e34d3122cb815f1c18a4a246695215f (diff)
Update some isIntegerConstantExpr uses to use
getIntegerConstantExprValue where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index c6215daf53..abc7f8865a 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -347,9 +347,8 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
// We already verified that the expression has a i-c-e value (C99
// 6.8.4.2p3) - get that value now.
- llvm::APSInt LoVal(32);
Expr *Lo = CS->getLHS();
- Lo->isIntegerConstantExpr(LoVal, Context);
+ llvm::APSInt LoVal = Lo->getIntegerConstantExprValue(Context);
// Convert the value to the same width/sign as the condition.
ConvertIntegerToTypeWarnOnOverflow(LoVal, CondWidth, CondIsSigned,
@@ -398,9 +397,8 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
std::vector<llvm::APSInt> HiVals;
for (unsigned i = 0, e = CaseRanges.size(); i != e; ++i) {
CaseStmt *CR = CaseRanges[i].second;
- llvm::APSInt HiVal(32);
Expr *Hi = CR->getRHS();
- Hi->isIntegerConstantExpr(HiVal, Context);
+ llvm::APSInt HiVal = Hi->getIntegerConstantExprValue(Context);
// Convert the value to the same width/sign as the condition.
ConvertIntegerToTypeWarnOnOverflow(HiVal, CondWidth, CondIsSigned,