[cfe-commits] r86173 - /cfe/trunk/lib/Sema/SemaExpr.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Thu Nov 5 13:09:23 PST 2009
Author: cornedbee
Date: Thu Nov 5 15:09:23 2009
New Revision: 86173
URL: http://llvm.org/viewvc/llvm-project?rev=86173&view=rev
Log:
The signed/unsigned checker should not warn for value-dependent expressions, and should especially not try to evaluate them.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=86173&r1=86172&r2=86173&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Thu Nov 5 15:09:23 2009
@@ -4434,6 +4434,11 @@
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;
More information about the cfe-commits
mailing list