Index: cfe/trunk/lib/Basic/Targets/AArch64.h =================================================================== --- cfe/trunk/lib/Basic/Targets/AArch64.h +++ cfe/trunk/lib/Basic/Targets/AArch64.h @@ -105,6 +105,8 @@ MacroBuilder &Builder) const override; BuiltinVaListKind getBuiltinVaListKind() const override; + + CallingConvCheckResult checkCallingConvention(CallingConv CC) const override; }; class LLVM_LIBRARY_VISIBILITY AArch64beTargetInfo : public AArch64TargetInfo { Index: cfe/trunk/lib/Basic/Targets/AArch64.cpp =================================================================== --- cfe/trunk/lib/Basic/Targets/AArch64.cpp +++ cfe/trunk/lib/Basic/Targets/AArch64.cpp @@ -458,6 +458,23 @@ return TargetInfo::CharPtrBuiltinVaList; } +TargetInfo::CallingConvCheckResult +MicrosoftARM64TargetInfo::checkCallingConvention(CallingConv CC) const { + switch (CC) { + case CC_X86StdCall: + case CC_X86ThisCall: + case CC_X86FastCall: + case CC_X86VectorCall: + return CCCR_Ignore; + case CC_C: + case CC_OpenCLKernel: + case CC_Win64: + return CCCR_OK; + default: + return CCCR_Warning; + } +} + DarwinAArch64TargetInfo::DarwinAArch64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : DarwinTargetInfo(Triple, Opts) { Index: cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c =================================================================== --- cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c +++ cfe/trunk/test/Parser/arm-windows-calling-convention-handling.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple aarch64-windows -fms-compatibility -fsyntax-only -verify %s int __cdecl cdecl(int a, int b, int c, int d) { // expected-no-diagnostics return a + b + c + d;