Template instantiation for CXXExprWithTemporaries, which occurs when
temporaries are generated for some object-constructing expressions in
templates that are not type-dependent. 

Also, be sure to introduce the variable from a CXXConditionDeclExpr
into the set of instantiated local variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72185 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-expr-4.cpp b/test/SemaTemplate/instantiate-expr-4.cpp
index a5b55b3..8a3f7d8 100644
--- a/test/SemaTemplate/instantiate-expr-4.cpp
+++ b/test/SemaTemplate/instantiate-expr-4.cpp
@@ -33,3 +33,12 @@
 };
 
 template struct BuildTemporary0<5, 7>;
+
+template<int N, int M>
+struct Temporaries0 {
+  void f() {
+    (void)X(N, M);
+  }
+};
+
+template struct Temporaries0<5, 7>;
diff --git a/test/SemaTemplate/instantiate-function-1.cpp b/test/SemaTemplate/instantiate-function-1.cpp
index caae97e..6182e1f 100644
--- a/test/SemaTemplate/instantiate-function-1.cpp
+++ b/test/SemaTemplate/instantiate-function-1.cpp
@@ -69,6 +69,9 @@
         return v; // expected-error{{incompatible type}}
     }
 
+    if (T x = t) {
+      t = x;
+    }
     return v;
   }
 };