diff options
| author | John McCall <rjmccall@apple.com> | 2010-08-28 20:17:00 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-08-28 20:17:00 +0000 |
| commit | fb3f9ba969e3ec5b31d0286f53f978363c5d9623 (patch) | |
| tree | 7c600bac9f1735044e2d033184eeefb79fa4c7b5 /clang/lib/Sema/SemaTemplate.cpp | |
| parent | d13b1a3581baf589d5491923e0ec88c6ae0aa7dc (diff) | |
| download | bcm5719-llvm-fb3f9ba969e3ec5b31d0286f53f978363c5d9623.tar.gz bcm5719-llvm-fb3f9ba969e3ec5b31d0286f53f978363c5d9623.zip | |
If filtering a lookup result leaves it ambiguous, keep the ambiguity
kind. Fixes PR7252.
llvm-svn: 112383
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 09656bcd915..2cbf3073a46 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -141,8 +141,13 @@ TemplateNameKind Sema::isTemplateName(Scope *S, LookupOrdinaryName); LookupTemplateName(R, S, SS, ObjectType, EnteringContext, MemberOfUnknownSpecialization); - if (R.empty() || R.isAmbiguous()) { + if (R.empty()) return TNK_Non_template; + if (R.isAmbiguous()) { + // Suppress diagnostics; we'll redo this lookup later. R.suppressDiagnostics(); + + // FIXME: we might have ambiguous templates, in which case we + // should at least parse them properly! return TNK_Non_template; } |

