diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-11-05 21:09:23 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2009-11-05 21:09:23 +0000 |
commit | 732429cfb1f77c1af61e239d0664e65962e488b3 (patch) | |
tree | d09b6d9d153c54f11f2780c5543afd71ddf8d819 | |
parent | c7621a64717203e1f7d5d79dbf548e590b32596c (diff) |
The signed/unsigned checker should not warn for value-dependent expressions, and should especially not try to evaluate them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86173 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index f94017129b..f5bae072ef 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -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; |