]> granicus.if.org Git - clang/commit
Follow-up to r214408: Warn on other callee-cleanup functions without prototype too.
authorNico Weber <nicolasweber@gmx.de>
Fri, 19 Sep 2014 23:07:12 +0000 (23:07 +0000)
committerNico Weber <nicolasweber@gmx.de>
Fri, 19 Sep 2014 23:07:12 +0000 (23:07 +0000)
commit5305cff6f260894fa8642805ad004847889fb2a4
treedd7a3f17bb95acde3e63e131861f793aee5aef5e
parentb96c3eeb86ded2991bed7b236d51f45b0f0d83a4
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218166 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/CodeGen/mangle-windows.c
test/CodeGen/mrtd.c
test/Sema/decl-microsoft-call-conv.c
test/Sema/stdcall-fastcall.c