summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/warn-unused-variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/warn-unused-variables.cpp')
-rw-r--r--test/SemaCXX/warn-unused-variables.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp
index d8b9a00..0198636 100644
--- a/test/SemaCXX/warn-unused-variables.cpp
+++ b/test/SemaCXX/warn-unused-variables.cpp
@@ -4,3 +4,31 @@ template<typename T> void f() {
T t;
t = 17;
}
+
+// PR5407
+struct A { A(); };
+struct B { ~B(); };
+void f() {
+ A a;
+ B b;
+}
+
+// PR5531
+namespace PR5531 {
+ struct A {
+ };
+
+ struct B {
+ B(int);
+ };
+
+ struct C {
+ ~C();
+ };
+
+ void test() {
+ A();
+ B(17);
+ C();
+ }
+}
OpenPOWER on IntegriCloud