Commit Graph

3 Commits

Author SHA1 Message Date
NAKAMURA Takumi 8c27a52eb8 clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp: Appease -Asserts to skip 1st alloca.
llvm-svn: 218647
2014-09-29 23:55:58 +00:00
Hans Wennborg e4c1892ece Try to fix non-asserts CodeGenCXX/vararg-non-pod-ms-compat.cpp
There are two GEP's in the function, and it seems the X64 CHECK
was matching the wrong one.

llvm-svn: 218645
2014-09-29 23:45:00 +00:00
Hans Wennborg d9dd4d29b7 Don't trap when passing non-POD arguments to variadic functions in MS-compatibility mode
Clang warns (treated as error by default, but still ignored in system headers)
when passing non-POD arguments to variadic functions, and generates a trap
instruction to crash the program if that code is ever run.

Unfortunately, MSVC happily generates code for such calls without a warning,
and there is code in system headers that use it.

This makes Clang not insert the trap instruction when in -fms-compatibility
mode, while still generating the warning/error message.

Differential Revision: http://reviews.llvm.org/D5492

llvm-svn: 218640
2014-09-29 23:06:57 +00:00