[PATCH] Downgrade error about stdcall decls with no prototype to a warning
Reid Kleckner
rnk at google.com
Wed Sep 24 09:57:06 PDT 2014
Hi thakis,
The MIDL compiler produces code that does this.
If we wanted to improve the warning, I think we could do this:
void __stdcall f(); // Don't warn without -Wstrict-prototypes.
void g() {
f(); // Might warn, the user probably meant for f to take no args.
f(1, 2, 3); // Warn, we have no idea what args f takes.
f(1); // Error, this is insane, one of these calls is broken.
}
http://reviews.llvm.org/D5481
Files:
include/clang/Basic/DiagnosticSemaKinds.td
test/Sema/decl-microsoft-call-conv.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5481.14039.patch
Type: text/x-patch
Size: 3495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140924/7d5d6569/attachment.bin>
More information about the cfe-commits
mailing list