Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61454 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/class.cpp b/test/SemaCXX/class.cpp
index b7d1ca3..7e06415 100644
--- a/test/SemaCXX/class.cpp
+++ b/test/SemaCXX/class.cpp
@@ -100,4 +100,8 @@
 void ogfn()
 {
   mutable int ml; // expected-error {{error: 'mutable' can only be applied to member variables}}
+
+  // PR3020: This used to crash due to double ownership of C4.
+  struct C4;
+  C4; // expected-error {{declaration does not declare anything}}
 }