diff options
author | John McCall <rjmccall@apple.com> | 2009-09-04 01:14:41 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-04 01:14:41 +0000 |
commit | f1bbbb49f06a7462476cd88166fccda5feb15cab (patch) | |
tree | 849b9006cad1a7c4dcd4cf03a4a7a5a96f15cc5e /lib/AST/Decl.cpp | |
parent | 34374e6ce5710a91c478f69379220ff20c3e7f15 (diff) |
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/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index fc19e61a09..41ba1f1df9 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -22,6 +22,8 @@ #include "clang/AST/PrettyPrinter.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/IdentifierTable.h" +#include "clang/Parse/DeclSpec.h" +#include "llvm/Support/ErrorHandling.h" #include <vector> using namespace clang; @@ -708,6 +710,16 @@ TagDecl* TagDecl::getDefinition(ASTContext& C) const { return 0; } +TagDecl::TagKind TagDecl::getTagKindForTypeSpec(unsigned TypeSpec) { + switch (TypeSpec) { + default: llvm::llvm_unreachable("unexpected type specifier"); + case DeclSpec::TST_struct: return TK_struct; + case DeclSpec::TST_class: return TK_class; + case DeclSpec::TST_union: return TK_union; + case DeclSpec::TST_enum: return TK_enum; + } +} + //===----------------------------------------------------------------------===// // RecordDecl Implementation //===----------------------------------------------------------------------===// |