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)
commitb51bcaf2f027f0774749e31d5fff2e618b1ee0f2
tree85951c0eb5d20c26cd0334bf8ad6777cb95d42ce
parent60d0e982f038ecb0b93e5896fd84988950977102
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.

llvm-svn: 299774
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Sema/declspec-naked.c [new file with mode: 0644]
clang/test/Sema/ms-inline-asm.c