Tweak -Wuninitialized fixit for '_Bool' types to be initialized to 0, and C++ 'bool' types to false.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124356 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp
index 2053bf4..355e114 100644
--- a/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/lib/Sema/AnalysisBasedWarnings.cpp
@@ -433,7 +433,7 @@
else if (vdTy->isRealFloatingType()) {
initialization = " = 0.0";
}
- else if (vdTy->isBooleanType()) {
+ else if (vdTy->isBooleanType() && S.Context.getLangOptions().CPlusPlus) {
initialization = " = false";
}
else if (vdTy->isScalarType()) {