def warn_cannot_pass_non_pod_arg_to_vararg : Warning<
"cannot pass object of non-POD type %0 through variadic "
- "%select{function|block|method|constructor}1; call will abort at runtime">;
+ "%select{function|block|method|constructor}1; call will abort at runtime">,
+ InGroup<DiagGroup<"non-pod-varargs">>, DefaultError;
def err_typecheck_call_invalid_ordered_compare : Error<
"ordered compare requires two args of floating point type (%0 and %1)">;
-// RUN: clang-cc -fsyntax-only %s
+// RUN: clang-cc -fsyntax-only %s -Wnon-pod-varargs
class X { };
int& copycon(X x);
void test_copycon2(A a, const A ac, B b, B const bc, B volatile bv) {
int& i1 = copycon2(b);
- float& f1 = copycon2(bc);
- float& f2 = copycon2(bv);
+ float& f1 = copycon2(bc); // expected-warning {{cannot pass object of non-POD type}}
+ float& f2 = copycon2(bv); // expected-warning {{cannot pass object of non-POD type}}
short& s1 = copycon2(a);
- float& f3 = copycon2(ac);
+ float& f3 = copycon2(ac); // expected-warning {{cannot pass object of non-POD type}}
}
int& copycon3(A a);
void test_copycon3(B b, const B bc) {
int& i1 = copycon3(b);
- float& f1 = copycon3(bc);
+ float& f1 = copycon3(bc); // expected-warning {{cannot pass object of non-POD type}}
}