[Sema] Handle __va_start for Windows/ARM64 in the same way as for ARM
authorMartin Storsjo <martin@martin.st>
Thu, 27 Sep 2018 08:24:15 +0000 (08:24 +0000)
committerMartin Storsjo <martin@martin.st>
Thu, 27 Sep 2018 08:24:15 +0000 (08:24 +0000)
This fixes PR39090.

Differential Revision: https://reviews.llvm.org/D52571

llvm-svn: 343184

clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/microsoft-varargs.cpp

index c46468f..a258d34 100644 (file)
@@ -929,6 +929,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
     break;
   case Builtin::BI__va_start: {
     switch (Context.getTargetInfo().getTriple().getArch()) {
+    case llvm::Triple::aarch64:
     case llvm::Triple::arm:
     case llvm::Triple::thumb:
       if (SemaBuiltinVAStartARMMicrosoft(TheCall))
index 5b0f90e..311ce4a 100644 (file)
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only %s -verify
+// RUN: %clang_cc1 -triple aarch64-windows -fms-compatibility -fsyntax-only %s -verify
 // expected-no-diagnostics
 
 extern "C" {