Add TaggedType, which represents tagged decls as types. Create these when
converting a declspec with TST = struct/union. Pretty print as well.
llvm-svn: 39284
diff --git a/clang/Parse/ParseDecl.cpp b/clang/Parse/ParseDecl.cpp
index ae24105..2c7c68e 100644
--- a/clang/Parse/ParseDecl.cpp
+++ b/clang/Parse/ParseDecl.cpp
@@ -408,10 +408,11 @@
void Parser::ParseStructUnionSpecifier(DeclSpec &DS) {
assert((Tok.getKind() == tok::kw_struct ||
Tok.getKind() == tok::kw_union) && "Not a struct/union specifier");
- SourceLocation StartLoc = ConsumeToken();
DeclSpec::TST TagType =
Tok.getKind() == tok::kw_union ? DeclSpec::TST_union : DeclSpec::TST_struct;
+ SourceLocation StartLoc = ConsumeToken();
+
// If attributes exist after tag, parse them.
if (Tok.getKind() == tok::kw___attribute)
ParseAttributes();