Suppress -Warray-bounds for classes (not just structs) where the last field is
a 1-length character array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145445 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/array-bounds.cpp b/test/SemaCXX/array-bounds.cpp
index 48788f6..c1b3701 100644
--- a/test/SemaCXX/array-bounds.cpp
+++ b/test/SemaCXX/array-bounds.cpp
@@ -190,10 +190,19 @@
     int x;
     char c2[1];
   };
-  
-  char bar(struct foo *F) {
-    return F->c1[3]; // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
-    return F->c2[3]; // no warning, foo could have tail padding allocated.
+
+  class baz {
+   public:
+    char c1[1]; // expected-note {{declared here}}
+    int x;
+    char c2[1];
+  };
+
+  char bar(struct foo *F, baz *B) {
+    return F->c1[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
+           F->c2[3] + // no warning, foo could have tail padding allocated.
+           B->c1[3] + // expected-warning {{array index 3 is past the end of the array (which contains 1 element)}}
+           B->c2[3]; // no warning, baz could have tail padding allocated.
   }
 }