add an action method for declspecs without declarators, like "struct foo;".

llvm-svn: 39184
diff --git a/clang/AST/SemaDecl.cpp b/clang/AST/SemaDecl.cpp
index 39d90b6..972ba56 100644
--- a/clang/AST/SemaDecl.cpp
+++ b/clang/AST/SemaDecl.cpp
@@ -42,6 +42,20 @@
   }
 }
 
+/// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
+/// no declarator (e.g. "struct foo;") is parsed.
+Sema::DeclTy *Sema::ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS) {
+  // TODO: emit error on 'int;' or 'const enum foo;'.
+  // TODO: emit error on 'typedef int;'
+  // if (!DS.isMissingDeclaratorOk()) Diag(...);
+  
+  // TODO: Register 'struct foo;' with the type system as an opaque struct.
+  
+  // TODO: Check that we don't already have 'union foo;' or something else
+  // that conflicts.
+  return 0;
+}
+
 Action::DeclTy *
 Sema::ParseDeclarator(Scope *S, Declarator &D, ExprTy *Init, 
                       DeclTy *LastInGroup) {
@@ -82,7 +96,8 @@
   return New;
 }
 
-Action::DeclTy *
+
+Sema::DeclTy *
 Sema::ParseFunctionDefinition(Scope *S, Declarator &D, StmtTy *Body) {
   FunctionDecl *FD = (FunctionDecl *)ParseDeclarator(S, D, 0, 0);