summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/mrtd.c
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-09-19 23:07:12 +0000
committerNico Weber <nicolasweber@gmx.de>2014-09-19 23:07:12 +0000
commitd191063c6c507aa24bc1d2346b17966aac4a734b (patch)
treebb102411c87aecf9f1b29db1917c9219d8cb6192 /clang/test/CodeGen/mrtd.c
parentde0253791cfadd186b904f75c406d4fdcbf58899 (diff)
downloadbcm5719-llvm-d191063c6c507aa24bc1d2346b17966aac4a734b.tar.gz
bcm5719-llvm-d191063c6c507aa24bc1d2346b17966aac4a734b.zip
Follow-up to r214408: Warn on other callee-cleanup functions without prototype too.
According to lore, we used to verifier-fail on: void __thiscall f(); int main() { f(1); } So that's fixed now. System headers use prototype-less __stdcall functions, so make that a warning that's DefaultError -- then it fires on regular code but is suppressed in system headers. Since it's used in system headers, we have codegen tests for this; massage them slightly so that they still compile. llvm-svn: 218166
Diffstat (limited to 'clang/test/CodeGen/mrtd.c')
-rw-r--r--clang/test/CodeGen/mrtd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/CodeGen/mrtd.c b/clang/test/CodeGen/mrtd.c
index 8fa7cf02cea..79cd490084f 100644
--- a/clang/test/CodeGen/mrtd.c
+++ b/clang/test/CodeGen/mrtd.c
@@ -1,4 +1,9 @@
-// RUN: %clang_cc1 -mrtd -triple i386-unknown-unknown -std=c89 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -mrtd -triple i386-unknown-unknown -std=c89 -Wsystem-headers -Wno-error=missing-prototype-for-cc -emit-llvm -o - %s 2>&1 | FileCheck %s
+
+// 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
void baz(int arg);
OpenPOWER on IntegriCloud