]> granicus.if.org Git - clang/commit
Sema: correct handling for __va_start for WoA
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 22 Jul 2014 02:01:04 +0000 (02:01 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 22 Jul 2014 02:01:04 +0000 (02:01 +0000)
commitc61a708c63ab7b89a5b6c80bc37dd32824b2f2d8
tree47fe274e8523b66bd8a056f47da8cb1cdd0b2be5
parent9115f7255f489610de3cd3bb9e1a1aef66e38ae9
Sema: correct handling for __va_start for WoA

Windows ARM indicates __va_start as a variadic function.  However, the function
itself is treated as having 4 formal arguments:
  - (out) pointer to the va_list
  - (in) address of the last named argument
  - (in) slot size for the type of the last argument
  - address of the last named argument

The last argument does not seem to have any bearing on codegen, and thus is not
explicitly type checked at this point.

Unlike the previous handling for __va_start, it does not currently validate if
the parameter is the last named parameter (it seems that MSVC currently accepts
this).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213595 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaChecking.cpp
test/SemaCXX/microsoft-varargs-diagnostics.cpp [new file with mode: 0644]
test/SemaCXX/microsoft-varargs.cpp [new file with mode: 0644]