diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-31 09:31:02 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-31 09:31:02 +0000 |
commit | c8ab2563ac8f7dcc4fdc518b5cc7015ecbb2f003 (patch) | |
tree | f88bd5a5e94527a2040562782a00cab2e9d9bebe /lib/AST/DeclBase.cpp | |
parent | f757ae711513e5b2efa25fde1562315c0906bd68 (diff) |
Initial infrastructure for class template partial specialization. Here
we have the basics of declaring and storing class template partial
specializations, matching class template partial specializations at
instantiation time via (limited) template argument deduction, and
using the class template partial specialization's pattern for
instantiation.
This patch is enough to make a simple is_pointer type trait work, but
not much else.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 80b422e753..fd7de715db 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -212,6 +212,7 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { // Aren't looked up? case UsingDirective: case ClassTemplateSpecialization: + case ClassTemplatePartialSpecialization: return 0; } } @@ -399,6 +400,9 @@ bool DeclContext::isDependentContext() const { if (isFileContext()) return false; + if (isa<ClassTemplatePartialSpecializationDecl>(this)) + return true; + if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(this)) if (Record->getDescribedClassTemplate()) return true; |