PR4281: Fix bogus CodeGen assertion.  The issue is that 
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical 
types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72552 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/2009-05-28-const-typedef.c b/test/CodeGen/2009-05-28-const-typedef.c
new file mode 100644
index 0000000..e46e83b
--- /dev/null
+++ b/test/CodeGen/2009-05-28-const-typedef.c
@@ -0,0 +1,17 @@
+// RUN: clang-cc -emit-llvm %s -o -
+// PR4281
+
+typedef struct {
+        int i;
+} something;
+
+typedef const something const_something;
+
+something fail(void);
+
+int
+main(int argc, char *argv[])
+{
+        const_something R = fail();
+}
+