summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-09-04 01:14:41 +0000
committerJohn McCall <rjmccall@apple.com>2009-09-04 01:14:41 +0000
commitf1bbbb49f06a7462476cd88166fccda5feb15cab (patch)
tree849b9006cad1a7c4dcd4cf03a4a7a5a96f15cc5e /lib/Sema/SemaDecl.cpp
parent34374e6ce5710a91c478f69379220ff20c3e7f15 (diff)
downloadclang-f1bbbb49f06a7462476cd88166fccda5feb15cab.tar.gz
clang-f1bbbb49f06a7462476cd88166fccda5feb15cab.tar.bz2
clang-f1bbbb49f06a7462476cd88166fccda5feb15cab.tar.xz
Correctly handle elaborated template ids. Still not handled properly for friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index abf95283cd..e929b5f0d6 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3966,14 +3966,7 @@ Sema::DeclPtrTy Sema::ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
"Nameless record must be a definition!");
OwnedDecl = false;
- TagDecl::TagKind Kind;
- switch (TagSpec) {
- default: assert(0 && "Unknown tag type!");
- case DeclSpec::TST_struct: Kind = TagDecl::TK_struct; break;
- case DeclSpec::TST_union: Kind = TagDecl::TK_union; break;
- case DeclSpec::TST_class: Kind = TagDecl::TK_class; break;
- case DeclSpec::TST_enum: Kind = TagDecl::TK_enum; break;
- }
+ TagDecl::TagKind Kind = TagDecl::getTagKindForTypeSpec(TagSpec);
if (TUK != TUK_Reference) {
if (TemplateParameterList *TemplateParams