]> granicus.if.org Git - clang/commit
Sema: prevent __declspec(naked) use on x64
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 7 Apr 2017 15:13:47 +0000 (15:13 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 7 Apr 2017 15:13:47 +0000 (15:13 +0000)
commit49c4c7d799281c219c71cae4419afef8b300ee43
tree458d41ff72b54062500926a1c25369dd41cc4cdd
parent8567c2d9e717e928d6ae8b9145001cd36c23f873
Sema: prevent __declspec(naked) use on x64

MSDN (https://msdn.microsoft.com/en-us/library/h5w10wxs.aspx) indicates
that `__declspec(naked)` is only permitted on x86 and ARM targets.
Testing with cl does confirm this behaviour.  Provide a warning for use
of `__declspec(naked)` on x64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299774 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDeclAttr.cpp
test/Sema/declspec-naked.c [new file with mode: 0644]
test/Sema/ms-inline-asm.c