diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-08-26 18:27:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-08-26 18:27:52 +0000 |
commit | 5e0962f944c80f66bfccff18a4c072c8b28fc7ab (patch) | |
tree | 0910b146880277f110b622930bd82ab691e60759 /clang/lib/Parse/MinimalAction.cpp | |
parent | f571c11d54b4ee1b94217bf9f6ade057f105bf50 (diff) | |
download | bcm5719-llvm-5e0962f944c80f66bfccff18a4c072c8b28fc7ab.tar.gz bcm5719-llvm-5e0962f944c80f66bfccff18a4c072c8b28fc7ab.zip |
When we know that we are parsing a class-name, implicitly construct a
TypenameType if getTypeName is looking at a member of an unknown
specialization. This allows us to properly parse class templates that
derived from type that could only otherwise be described by a typename type,
e.g.,
template<class T> struct X {};
template<typename T> struct Y : public X<T>::X { };
Fixes PR4381.
llvm-svn: 80123
Diffstat (limited to 'clang/lib/Parse/MinimalAction.cpp')
-rw-r--r-- | clang/lib/Parse/MinimalAction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/MinimalAction.cpp b/clang/lib/Parse/MinimalAction.cpp index 6c8d75c2d6d..4e32de34b7e 100644 --- a/clang/lib/Parse/MinimalAction.cpp +++ b/clang/lib/Parse/MinimalAction.cpp @@ -143,7 +143,8 @@ void MinimalAction::ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { /// FIXME: Use the passed CXXScopeSpec for accurate C++ type checking. Action::TypeTy * MinimalAction::getTypeName(IdentifierInfo &II, SourceLocation Loc, - Scope *S, const CXXScopeSpec *SS) { + Scope *S, const CXXScopeSpec *SS, + bool isClassName) { if (TypeNameInfo *TI = II.getFETokenInfo<TypeNameInfo>()) if (TI->isTypeName) return TI; |