Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86352 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp
index d8b9a00..0010489 100644
--- a/test/SemaCXX/warn-unused-variables.cpp
+++ b/test/SemaCXX/warn-unused-variables.cpp
@@ -4,3 +4,11 @@
 	T t;
 	t = 17;
 }
+
+struct A { A(); };
+struct B { ~B(); };
+
+void f() {
+  A a;
+  B b;
+}
\ No newline at end of file