From 20c38a7c5870d300a4d713c13ac5e761d61d04d7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 21 May 2010 23:43:39 +0000 Subject: Improve recovery when we see a dependent template name that is missing the required "template" keyword, using the same heuristics we do for dependent template names in member access expressions, e.g., test/SemaTemplate/dependent-template-recover.cpp:11:8: error: use 'template' keyword to treat 'getAs' as a dependent template name T::getAs(); ^ template Fixes PR5404. llvm-svn: 104409 --- clang/lib/Sema/SemaTemplate.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Sema/SemaTemplate.cpp') diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index b4f9c3df8b4..8ff637f2d11 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -175,6 +175,7 @@ bool Sema::DiagnoseUnknownTemplateName(const IdentifierInfo &II, TemplateNameKind &SuggestedKind) { // We can't recover unless there's a dependent scope specifier preceding the // template name. + // FIXME: Typo correction? if (!SS || !SS->isSet() || !isDependentScopeSpecifier(*SS) || computeDeclContext(*SS)) return false; -- cgit v1.2.3