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)
commit202aac174abaaab0fcd1616f4728d11111441efa
tree3cb20c4e866e0a443f93123709b2a883942538ab
parentb4b3578af7d013f5fe4f4bb323bc52bc2991ae33
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).

llvm-svn: 213595
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/microsoft-varargs-diagnostics.cpp [new file with mode: 0644]
clang/test/SemaCXX/microsoft-varargs.cpp [new file with mode: 0644]