aaronpuchert added a comment.
In D66919#1658355 <https://reviews.llvm.org/D66919#1658355>, @aaron.ballman
wrote:
> We do have numerous warnings that are default errors, you can look for
> `DefaultError` in the diagnostic .td files to see the uses.
Thanks, I hadn't seen that before. It seems that most of these warnings are for
extensions, but one comes pretty close to what @dexonsmith has suggested:
def warn_cannot_pass_non_pod_arg_to_vararg : Warning<
"cannot pass object of %select{non-POD|non-trivial}0 type %1 through
variadic"
" %select{function|block|method|constructor}2; call will abort at runtime">,
InGroup<NonPODVarargs>, DefaultError;
The standard explicitly says in C11 6.5.2.2p8: “the number and types of
arguments are not compared with those of the parameters in a function
definition that does not include a function prototype declarator”, but perhaps
this just means a programmer can't rely on such a check?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66919/new/
https://reviews.llvm.org/D66919
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits