aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaFixItUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaFixItUtils.cpp')
-rw-r--r--lib/Sema/SemaFixItUtils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Sema/SemaFixItUtils.cpp b/lib/Sema/SemaFixItUtils.cpp
index 3b76213e20..b78ea7d18e 100644
--- a/lib/Sema/SemaFixItUtils.cpp
+++ b/lib/Sema/SemaFixItUtils.cpp
@@ -182,6 +182,14 @@ const char *Sema::getFixItZeroInitializerForType(QualType T) const {
else if (isMacroDefined(*this, "NULL"))
return " = NULL";
}
+ if (T->isCharType())
+ return " = '\\0'";
+ if (T->isWideCharType())
+ return " = L'\\0'";
+ if (T->isChar16Type())
+ return " = u'\\0'";
+ if (T->isChar32Type())
+ return " = U'\\0'";
return " = 0";
}