From: Ted Kremenek Date: Thu, 27 Jan 2011 05:18:52 +0000 (+0000) Subject: Tweak -Wuninitialized fixit for '_Bool' types to be initialized to 0, and C++ 'bool... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb7a779365c08f8f363e679a9f9fa389f22c7982;p=clang 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 2053bf4536..355e114746 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -433,7 +433,7 @@ public: 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()) {