Turn explicit construction of temporaries using initializer list syntax into CXXTemporaryObjectExprs, not just CXXConstructExprs, which have a worrying tendency to vanish. Fixes PR12167.

llvm-svn: 152340
diff --git a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
index 14420d9..fdc882e 100644
--- a/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/clang/test/SemaCXX/cxx0x-initializer-constructor.cpp
@@ -218,3 +218,21 @@
   struct B { B(A); } b{{0}};
   struct C { C(int); } c{0};
 }
+
+namespace PR12167 {
+  template<int N> struct string {};
+
+  struct X {
+    X(const char v);
+    template<typename T> bool operator()(T) const;
+  };
+
+  template<int N, class Comparator> bool g(const string<N>& s, Comparator cmp) {
+    return cmp(s);
+  }
+  template<int N> bool f(const string<N> &s) {
+    return g(s, X{'x'});
+  }
+
+  bool s = f(string<1>());
+}