]> granicus.if.org Git - clang/commit
Limit our MSVC compat hack for nested names from dependent bases
authorReid Kleckner <reid@kleckner.net>
Thu, 14 Aug 2014 23:34:52 +0000 (23:34 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 14 Aug 2014 23:34:52 +0000 (23:34 +0000)
commit99af5d60f1c51b67547fb82056221f2dd7f88aaa
tree8dafeefe81e15d0e8411ecece9912ded93832bab
parent8e928eb5560c6ca902624a045700fa99970973b8
Limit our MSVC compat hack for nested names from dependent bases

Previously, any undeclared unqualified id starting a nested name
specifier in a dependent context would have its lookup retried during
template instantiation.  Now we limit that retry hack to methods of a
class with dependent bases.  Free function templates in particular are
no longer affected by this hack.

Also, diagnose this as a Microsoft extension. This has the downside that
template authors may see this warning *and* an error during
instantiation time about this identifier. Fixing that will probably
require formalizing some kind of "delayed" identifier, instead of our
ad-hoc solutions of forming dependent AST nodes when lookup fails.

Based on a patch by Kim Gräsman!

Differential Revision: http://reviews.llvm.org/D4854

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215683 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaCXXScopeSpec.cpp
test/SemaTemplate/lookup-dependent-bases.cpp
test/SemaTemplate/ms-lookup-template-base-classes.cpp