aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/Expr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 6fb2627321..3699ba1df7 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -1152,7 +1152,8 @@ public:
return SubExprs[Index];
}
- int getShuffleMaskIdx(ASTContext &Ctx, unsigned N) {
+ 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");