AST: Create __va_list in the std namespace even in C.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 5 Feb 2021 00:14:04 +0000 (16:14 -0800)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 24 Jun 2021 01:59:10 +0000 (18:59 -0700)
commite655e74a318e0b4140391ae18725300c7f0629f6
treeb65d595927905a0fc1934d9f463339b062b9ada9
parent78f7e6d8d7956cb96d0fa0fd606192ca0218eee1
AST: Create __va_list in the std namespace even in C.

This ensures that the mangled type names match between C and C++,
which is significant when using -fsanitize=cfi-icall. Ideally we
wouldn't have created this namespace at all, but it's now part of
the ABI (e.g. in mangled names), so we can't change it.

Differential Revision: https://reviews.llvm.org/D104830
clang/lib/AST/ASTContext.cpp
clang/test/CodeGen/aarch64-varargs.c
clang/test/CodeGen/arm64-be-hfa-vararg.c
clang/test/CodeGen/cfi-icall-va-list.c [new file with mode: 0644]
clang/test/Headers/stdarg.cpp