summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2008-12-28 15:28:59 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2008-12-28 15:28:59 +0000
commita2b5e31cb19f4fd4680e7230cd5497f5ef09a438 (patch)
tree6fd57f409f89d403fd1223128378c58cf61cbd3c /clang/test/SemaCXX/class.cpp
parent85cd7bac29a05dbab8b784eec5585ae1aa9564d7 (diff)
downloadbcm5719-llvm-a2b5e31cb19f4fd4680e7230cd5497f5ef09a438.tar.gz
bcm5719-llvm-a2b5e31cb19f4fd4680e7230cd5497f5ef09a438.zip
Diagnose declarations that don't declare anything, and fix PR3020.
Examples: int; typedef int; llvm-svn: 61454
Diffstat (limited to 'clang/test/SemaCXX/class.cpp')
-rw-r--r--clang/test/SemaCXX/class.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/class.cpp b/clang/test/SemaCXX/class.cpp
index b7d1ca34dcf..7e06415a09d 100644
--- a/clang/test/SemaCXX/class.cpp
+++ b/clang/test/SemaCXX/class.cpp
@@ -100,4 +100,8 @@ mutable void gfn(); // expected-error {{illegal storage class on function}}
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}}
}
OpenPOWER on IntegriCloud