llvm-project/clang/test/Headers/ms-no-wchar.cpp
Stephen Long 7f9837cfa6 [Headers][MSVC] Define wchar_t in stddef.h like MSVC if not using the builtin type
MSVC expects wchar_t to be defined in stddef.h if /Zc:wchar_t- is specified

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D124026
2022-05-12 09:38:07 -07:00

7 lines
223 B
C++

// RUN: %clang_cc1 -fsyntax-only -triple x86_64-pc-windows-msvc -fms-compatibility-version=17.00 -fno-wchar %s
// MSVC defines wchar_t instead of using the builtin if /Zc:wchar_t- is passed
#include <stddef.h>
wchar_t c;