]> granicus.if.org Git - clang/commit
Support __wchar_t in -fms-extensions and -fms-compatibility modes.
authorHans Wennborg <hans@hanshq.net>
Fri, 3 May 2013 09:10:16 +0000 (09:10 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 3 May 2013 09:10:16 +0000 (09:10 +0000)
commit6f464bb8d316b95bf60efcdb2d21803659d3aa1b
treee4d554844ad553b9d747996604c909adc6666eea
parentf5ebf9bf1df10ac15ba32a4b24dfe171b7848c58
Support __wchar_t in -fms-extensions and -fms-compatibility modes.

MSVC provides __wchar_t, either as an alias for the built-in wchar_t
type, or as a separate type depending on language (C vs C++) and flags
(-fno-wchar).

In -fms-extensions, Clang will simply accept __wchar_t as an alias for
whatever type is used for wide character literals. In -fms-compatibility, we
try to mimic MSVC's behavior by always making __wchar_t a builtin type.

This fixes PR15815.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181004 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/PrettyPrinter.h
include/clang/Basic/TokenKinds.def
lib/AST/ASTContext.cpp
lib/AST/Type.cpp
test/Lexer/ms-compatibility-wchar.c [new file with mode: 0644]
test/Lexer/ms-extensions-wchar.c [new file with mode: 0644]