diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-09-24 17:49:24 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-09-24 17:49:24 +0000 |
commit | 2e0717e129b0de854b16ac6ff7398462ac89cf37 (patch) | |
tree | 09513707d77749198e97de735afbeebcd6b32fc9 /clang/test/CodeGen/mrtd.c | |
parent | f2fce1492092b5ca5f9a5aef5d41841860af8b8b (diff) | |
download | bcm5719-llvm-2e0717e129b0de854b16ac6ff7398462ac89cf37.tar.gz bcm5719-llvm-2e0717e129b0de854b16ac6ff7398462ac89cf37.zip |
Downgrade error about stdcall decls with no prototype to a warning
Fixes PR21027. 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.
}
Reviewers: thakis
Differential Revision: http://reviews.llvm.org/D5481
llvm-svn: 218394
Diffstat (limited to 'clang/test/CodeGen/mrtd.c')
-rw-r--r-- | clang/test/CodeGen/mrtd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGen/mrtd.c b/clang/test/CodeGen/mrtd.c index 79cd490084f..9bc485d3f35 100644 --- a/clang/test/CodeGen/mrtd.c +++ b/clang/test/CodeGen/mrtd.c @@ -3,7 +3,7 @@ // prototype-less __stdcall functions are only allowed in system headers. # 1 "fake_system_header.h" 1 3 4 -// CHECK: fake_system_header.h:9:3: warning: function with no prototype cannot use stdcall calling convention +// CHECK: fake_system_header.h:9:3: warning: function with no prototype cannot use the callee-cleanup stdcall calling convention void baz(int arg); |