[cfe-commits] r124356 - /cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
Ted Kremenek
kremenek at apple.com
Wed Jan 26 21:18:52 PST 2011
Author: kremenek
Date: Wed Jan 26 23:18:52 2011
New Revision: 124356
URL: http://llvm.org/viewvc/llvm-project?rev=124356&view=rev
Log:
Tweak -Wuninitialized fixit for '_Bool' types to be initialized to 0, and C++ 'bool' types to false.
Modified:
cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=124356&r1=124355&r2=124356&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)
+++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Wed Jan 26 23:18:52 2011
@@ -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()) {
More information about the cfe-commits
mailing list