aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/Expr.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index a92b940ead..5a3e8f78e2 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -101,6 +101,7 @@ public:
llvm::APSInt getIntegerConstantExprValue(ASTContext &Ctx) const {
llvm::APSInt X(32);
bool success = isIntegerConstantExpr(X, Ctx);
+ success = success;
assert(success && "Illegal argument to getIntegerConstantExpr");
return X;
}
@@ -1214,10 +1215,7 @@ public:
unsigned getShuffleMaskIdx(ASTContext &Ctx, unsigned N) {
assert((N < NumExprs - 2) && "Shuffle idx out of range!");
- llvm::APSInt Result(32);
- bool result = getExpr(N+2)->isIntegerConstantExpr(Result, Ctx);
- assert(result && "Must be integer constant");
- return Result.getZExtValue();
+ return getExpr(N+2)->getIntegerConstantExprValue(Ctx).getZExtValue();
}
// Iterators