diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-10 17:38:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-10 17:38:18 +0000 |
commit | 6e8da6a291b9c460bba8537781de13884e3c0c67 (patch) | |
tree | 734e86e07a86fc9220663dfc7b66cbeb45c7eae4 /clang/lib/Sema/SemaChecking.cpp | |
parent | 03a466b3b9c7b4e00a09a334c67d6870ee7c6bba (diff) | |
download | bcm5719-llvm-6e8da6a291b9c460bba8537781de13884e3c0c67.tar.gz bcm5719-llvm-6e8da6a291b9c460bba8537781de13884e3c0c67.zip |
Don't analyze comparisons in type- or value-dependent
subexpressions. Fixes PR10291.
llvm-svn: 141552
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 71a7ebcd1cf..181d40ba014 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/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)) { |