aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-10 17:38:18 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-10 17:38:18 +0000
commitf8b6e1591b5c5085cf4dec8df657e32a68053b12 (patch)
treef1e0d75929840f6427ad13945b93b40e1bdccd5a /lib/Sema/SemaChecking.cpp
parentd61db33331c264d6361283602b248a7423040597 (diff)
Don't analyze comparisons in type- or value-dependent
subexpressions. Fixes PR10291. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp
index 71a7ebcd1c..181d40ba01 100644
--- a/lib/Sema/SemaChecking.cpp
+++ b/lib/Sema/SemaChecking.cpp
@@ -3472,6 +3472,9 @@ void AnalyzeImplicitConversions(Sema &S, Expr *OrigE, SourceLocation CC) {
QualType T = OrigE->getType();
Expr *E = OrigE->IgnoreParenImpCasts();
+ if (E->isTypeDependent() || E->isValueDependent())
+ return;
+
// For conditional operators, we analyze the arguments as if they
// were being fed directly into the output.
if (isa<ConditionalOperator>(E)) {