diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-27 05:18:52 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-27 05:18:52 +0000 |
commit | eb7a779365c08f8f363e679a9f9fa389f22c7982 (patch) | |
tree | 65828cebf2ab54813f2db17a39b2df412389a657 /lib/Sema/AnalysisBasedWarnings.cpp | |
parent | 2c3af5c0db9ac169dcf464276178a3172a1a5cf4 (diff) |
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
Diffstat (limited to 'lib/Sema/AnalysisBasedWarnings.cpp')
-rw-r--r-- | lib/Sema/AnalysisBasedWarnings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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()) { |