Index: test/Analysis/misc-ps-cxx0x.cpp
===================================================================
--- test/Analysis/misc-ps-cxx0x.cpp	(revision 141126)
+++ test/Analysis/misc-ps-cxx0x.cpp	(working copy)
@@ -9,3 +9,27 @@
   *p = 0xDEADBEEF; // expected-warning {{null}}
 }
 
+// Tests for CXXTemporaryObjectExpr.
+struct X {
+    X( int *ip, int );
+};
+
+// Test to see if CXXTemporaryObjectExpr is being handled.
+int tempobj1()
+{
+  int j;
+  int i;
+  X a = X( &j, 1 );
+
+  return i; // expected-warning {{Undefined or garbage value returned to caller}}
+}
+
+// Test to see if CXXTemporaryObjectExpr invalidates arguments.
+int tempobj2()
+{
+  int j;
+  X a = X( &j, 1 );
+
+  return j; // no-warning
+}
+
