When we have a dependent direct initializer but not a dependent
variable type, we can (and should) still check for completeness of the
variable's type. Do so, to work around an assertion that shows up in
Boost's shared_ptr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95934 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp
index 5620248..3b5349a 100644
--- a/test/SemaCXX/warn-unused-variables.cpp
+++ b/test/SemaCXX/warn-unused-variables.cpp
@@ -1,8 +1,7 @@
-// RUN: %clang -fsyntax-only -Wunused-variable -verify %s
-
+// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -verify %s
 template<typename T> void f() {
-	T t;
-	t = 17;
+  T t;
+  t = 17;
 }
 
 // PR5407
@@ -27,7 +26,7 @@
   };
 
   void test() {
-    A();
+    A(); // expected-warning{{expression result unused}}
     B(17);
     C();
   }
@@ -43,3 +42,12 @@
   x.foo(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}}
   x2->foo(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}}
 }
+
+template<typename T>
+struct X0 { };
+
+template<typename T>
+void test_dependent_init(T *p) {
+  X0<int> i(p);
+  (void)i;
+}