summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/class.cpp
diff options
context:
space:
mode:
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