Fix regression in r216520: don't apply nonnull to non-pointer function
parameters in the IR.

llvm-svn: 216574
diff --git a/clang/test/CodeGen/nonnull.c b/clang/test/CodeGen/nonnull.c
index 4d6cc45..e234105 100644
--- a/clang/test/CodeGen/nonnull.c
+++ b/clang/test/CodeGen/nonnull.c
@@ -21,3 +21,23 @@
   return &a;
 }
 
+// CHECK: define i32 @bar4(i32 %n, i32* nonnull %p)
+int bar4(int n, int *p) __attribute__((nonnull)) {
+  return n + *p;
+}
+
+// CHECK: define i32 @bar5(i32 %n, i32* nonnull %p)
+int bar5(int n, int *p) __attribute__((nonnull(1, 2))) {
+  return n + *p;
+}
+
+typedef union {
+  unsigned long long n;
+  int *p;
+  double d;
+} TransparentUnion __attribute__((transparent_union));
+
+// CHECK: define i32 @bar6(i64 %
+int bar6(TransparentUnion tu) __attribute__((nonnull(1))) {
+  return *tu.p;
+}