Test case for PR16933/r188707.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188836 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/invalid.cpp b/test/CodeGenCXX/invalid.cpp
new file mode 100644
index 0000000..d346246
--- /dev/null
+++ b/test/CodeGenCXX/invalid.cpp
@@ -0,0 +1,11 @@
+// RUN: not %clang_cc1 -g -emit-llvm %s
+
+// Don't attempt to codegen invalid code that would lead to a crash
+
+// PR16933
+struct A;
+A *x;
+struct A {
+  B y;
+};
+A y;