[PCH] Deserializing the DeclContext of a template parameter is not safe
until recursive loading is finished.

Otherwise we may end up with a template trying to deserialize a template
parameter that is in the process of getting loaded.

rdar://13135282

llvm-svn: 175329
diff --git a/clang/test/PCH/cxx-templates.cpp b/clang/test/PCH/cxx-templates.cpp
index d27e9ca..ddebae4 100644
--- a/clang/test/PCH/cxx-templates.cpp
+++ b/clang/test/PCH/cxx-templates.cpp
@@ -79,3 +79,9 @@
   Int &g(Int, int, double);
   Int &test = NestedExpansion<char, char, char>().f(0, 1, 2, Int(3), 4, 5.0);
 }
+
+namespace rdar13135282 {
+  void test() {
+    __mt_alloc<> mt = __mt_alloc<>();
+  }
+}