summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTContext.cpp2
-rw-r--r--clang/lib/Sema/SemaInit.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 2b4bc89aace..f76d320c386 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1444,8 +1444,6 @@ QualType ASTContext::getWCharType() const {
if (LangOpts.CPlusPlus)
return WCharTy;
- // FIXME: In C, shouldn't WCharTy just be a typedef of the target's
- // wide-character type?
return getFromTargetType(Target.getWCharType());
}
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index eeda1d05ca3..1f4ab078efa 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -48,7 +48,7 @@ static Expr *IsStringInit(Expr *Init, QualType DeclType, ASTContext &Context) {
// wchar_t array can be initialized with a wide string: C99 6.7.8p15:
// "An array with element type compatible with wchar_t may be initialized by a
// wide string literal, optionally enclosed in braces."
- if (Context.typesAreCompatible(Context.WCharTy, AT->getElementType()))
+ if (Context.typesAreCompatible(Context.getWCharType(), AT->getElementType()))
// Only allow wchar_t x[] = L"foo"; not wchar_t x[] = "foo";
return Init;
OpenPOWER on IntegriCloud