forked from OSchip/llvm-project
<rdar://problem/11146929>
Enabling support for the wchar_t type. Without the proper language option setup, clang's ASTContexts will be configured to have wchar_t == int This patch enables the correct options to make sure that we report wchar_t as itself Added a test case to make sure we do not regress Adding files missing from the previous commit llvm-svn: 172039
This commit is contained in:
parent
b4e2e93c61
commit
c921e34c81
|
@ -266,6 +266,8 @@ ParseLangArgs
|
|||
Opts.GNUInline = !Std.isC99();
|
||||
Opts.HexFloats = Std.hasHexFloats();
|
||||
Opts.ImplicitInt = Std.hasImplicitInt();
|
||||
|
||||
Opts.WChar = true;
|
||||
|
||||
// OpenCL has some additional defaults.
|
||||
if (LangStd == LangStandard::lang_opencl) {
|
||||
|
|
|
@ -58,6 +58,7 @@ ClangASTType::GetTypeNameForQualType (clang::ASTContext *ast, clang::QualType qu
|
|||
|
||||
clang::PrintingPolicy printing_policy (ast->getPrintingPolicy());
|
||||
printing_policy.SuppressTagKeyword = true;
|
||||
printing_policy.LangOpts.WChar = true;
|
||||
const clang::TypedefType *typedef_type = qual_type->getAs<clang::TypedefType>();
|
||||
if (typedef_type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue