mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
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:
@@ -4434,6 +4434,11 @@ void Sema::CheckSignCompare(Expr *lex, Expr *rex, SourceLocation OpLoc,
|
||||
if (!lt->isIntegerType() || !rt->isIntegerType())
|
||||
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
|
||||
// signed operand.
|
||||
Expr *signedOperand;
|
||||
|
||||
Reference in New Issue
Block a user