[PATCH] D59560: Permit redeclarations of a builtin to specify calling convention.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 19 13:53:51 PDT 2019


erichkeane created this revision.
erichkeane added a reviewer: rnk.
Herald added a subscriber: javed.absar.

After https://reviews.llvm.org/rL355317 we noticed that quite a decent
amount of code redeclares builtins (memcpy in particular, I believe
reduced from an MSVC header) with a calling convention specified.
This gets particularly troublesome when the user specifies a new
'default' calling convention on the command line.

      

When looking to add a diagnostic for this case, it was noticed that we
had 3 other diagnostics that differed only slightly.  This patch ALSO
unifies those under a 'select'.  Unfortunately, the order of words in
ONE of these diagnostics was reversed ("'thiscall' calling convention"
vs "calling convention 'thiscall'"), so this patch also standardizes on
the former.


https://reviews.llvm.org/D59560

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaDeclAttr.cpp
  lib/Sema/SemaType.cpp
  test/CodeGen/aarch64-vpcs.c
  test/Sema/callingconv-iamcu.c
  test/Sema/callingconv.c
  test/Sema/pr25786.c
  test/Sema/stdcall-fastcall-x64.c
  test/SemaCUDA/cuda-inherits-calling-conv.cu
  test/SemaCXX/borland-extensions.cpp
  test/SemaCXX/cxx11-gnu-attrs.cpp
  test/SemaCXX/virtual-override-x64.cpp
  test/SemaTemplate/instantiate-function-params.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59560.191389.patch
Type: text/x-patch
Size: 23411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190319/28c8fdbb/attachment-0001.bin>


More information about the cfe-commits mailing list