diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-26 22:19:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-26 22:19:44 +0000 |
commit | fc705b84347e6fb4746a1a7e26949f64c2f2f358 (patch) | |
tree | e6ec475fb6c12bfe460fe56da06fc3b9cfd82e48 /lib/AST/DeclBase.cpp | |
parent | 8af2975d50270813ae6366d007e9e1f5b65ddc68 (diff) |
Make the type associated with a ClassTemplateSpecializationDecl be a
nicely sugared type that shows how the user wrote the actual
specialization. This sugared type won't actually show up until we
start doing instantiations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index d6a0c35d92..574de1675f 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -446,8 +446,7 @@ DeclContext *DeclContext::getPrimaryContext() { if (DeclKind >= Decl::TagFirst && DeclKind <= Decl::TagLast) { // If this is a tag type that has a definition or is currently // being defined, that definition is our primary context. - if (TagType *TagT - = cast_or_null<TagType>(cast<TagDecl>(this)->TypeForDecl)) + if (const TagType *TagT = cast<TagDecl>(this)->TypeForDecl->getAsTagType()) if (TagT->isBeingDefined() || (TagT->getDecl() && TagT->getDecl()->isDefinition())) return TagT->getDecl(); |