void foo() {}
} c1;
-struct X1 { virtual void f(); } x1;
+struct X1 { virtual void f(); } x1, x1arr[2];
struct X2 : virtual S1 {} x2;
struct ContainsDynamic { X1 dynamic; } contains_dynamic;
memset(&x1, 0, sizeof x1); // \
// expected-warning {{destination for this 'memset' call is a pointer to dynamic class}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
+ memset(x1arr, 0, sizeof x1arr); // \
+ // expected-warning {{destination for this 'memset' call is a pointer to dynamic class}} \
+ // expected-note {{explicitly cast the pointer to silence this warning}}
+ memset((void*)x1arr, 0, sizeof x1arr);
memset(&x2, 0, sizeof x2); // \
// expected-warning {{destination for this 'memset' call is a pointer to dynamic class}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
int iarr[14];
memset(&iarr[0], 0, sizeof iarr);
+ memset(iarr, 0, sizeof iarr);
int* iparr[14];
memset(&iparr[0], 0, sizeof iparr);
+ memset(iparr, 0, sizeof iparr);
memset(m, 0, sizeof(Mat));