Teach -Wuninitialized to suggest "= false" for initializing bool variables.

llvm-svn: 124352
This commit is contained in:
Ted Kremenek 2011-01-27 02:57:57 +00:00
parent 2903675929
commit 064b0345f5
1 changed files with 3 additions and 0 deletions

View File

@ -433,6 +433,9 @@ public:
else if (vdTy->isRealFloatingType()) {
initialization = " = 0.0";
}
else if (vdTy->isBooleanType()) {
initialization = " = false";
}
else if (vdTy->isScalarType()) {
initialization = " = 0";
}