]> granicus.if.org Git - clang/commitdiff
Tweak -Wuninitialized fixit for '_Bool' types to be initialized to 0, and C++ 'bool...
authorTed Kremenek <kremenek@apple.com>
Thu, 27 Jan 2011 05:18:52 +0000 (05:18 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 27 Jan 2011 05:18:52 +0000 (05:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124356 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/AnalysisBasedWarnings.cpp

index 2053bf4536e8d0f44b9d7bc5f26fa9fa81320c3b..355e114746c3dffc0157a0097687066b58704a2d 100644 (file)
@@ -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()) {