[Sema] Fix a diag change to include a range that appeared intended, but never

actually happened.

llvm-svn: 152442
This commit is contained in:
Daniel Dunbar 2012-03-09 21:38:22 +00:00
parent 97bd94bd98
commit 900ceade87
1 changed files with 2 additions and 1 deletions

View File

@ -3566,7 +3566,8 @@ static uint64_t EvaluateArrayTypeTrait(Sema &Self, ArrayTypeTrait ATT,
false).isInvalid())
return 0;
if (Value.isSigned() && Value.isNegative()) {
Self.Diag(KeyLoc, diag::err_dimension_expr_not_constant_integer);
Self.Diag(KeyLoc, diag::err_dimension_expr_not_constant_integer)
<< DimExpr->getSourceRange();
return 0;
}
Dim = Value.getLimitedValue();