The signed/unsigned checker should not warn for value-dependent expressions, and should especially not try to evaluate them.

llvm-svn: 86173
This commit is contained in:
Sebastian Redl 2009-11-05 21:09:23 +00:00
parent bed7cb6c1d
commit 0b7c85fc5a
1 changed files with 5 additions and 0 deletions

View File

@ -4434,6 +4434,11 @@ void Sema::CheckSignCompare(Expr *lex, Expr *rex, SourceLocation OpLoc,
if (!lt->isIntegerType() || !rt->isIntegerType()) if (!lt->isIntegerType() || !rt->isIntegerType())
return; return;
// If either expression is value-dependent, don't warn. We'll get another
// chance at instantiation time.
if (lex->isValueDependent() || rex->isValueDependent())
return;
// The rule is that the signed operand becomes unsigned, so isolate the // The rule is that the signed operand becomes unsigned, so isolate the
// signed operand. // signed operand.
Expr *signedOperand; Expr *signedOperand;