diff --git a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp @@ -30,7 +30,7 @@ public: // Checker options. int MinComplexity; - bool ReportNormalClones; + DefaultBool ReportNormalClones; StringRef IgnoredFilesPattern; private: diff --git a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp @@ -120,7 +120,7 @@ namespace { class DeadStoresChecker : public Checker { public: - bool ShowFixIts = false; + DefaultBool ShowFixIts; bool WarnForDeadNestedAssignments = true; void checkASTCodeBody(const Decl *D, AnalysisManager &Mgr, diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h @@ -267,13 +267,13 @@ static std::unique_ptr CastFailTag; /// Track Objective-C and CoreFoundation objects. - bool TrackObjCAndCFObjects = false; + DefaultBool TrackObjCAndCFObjects; /// Track sublcasses of OSObject. - bool TrackOSObjects = false; + DefaultBool TrackOSObjects; /// Track initial parameters (for the entry point) for NS/CF objects. - bool TrackNSCFStartParam = false; + DefaultBool TrackNSCFStartParam; RetainCountChecker() {}; diff --git a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp @@ -566,9 +566,9 @@ DefaultBool ChecksEnabled[CK_NumCheckKinds]; CheckerNameRef CheckNames[CK_NumCheckKinds]; - bool DisplayLoadedSummaries = false; - bool ModelPOSIX = false; - bool ShouldAssumeControlledEnvironment = false; + DefaultBool DisplayLoadedSummaries; + DefaultBool ModelPOSIX; + DefaultBool ShouldAssumeControlledEnvironment; private: Optional findFunctionSummary(const FunctionDecl *FD, diff --git a/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h b/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h --- a/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h +++ b/clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObject.h @@ -71,11 +71,11 @@ namespace ento { struct UninitObjCheckerOptions { - bool IsPedantic = false; - bool ShouldConvertNotesToWarnings = false; - bool CheckPointeeInitialization = false; + DefaultBool IsPedantic; + DefaultBool ShouldConvertNotesToWarnings; + DefaultBool CheckPointeeInitialization; std::string IgnoredRecordsWithFieldPattern; - bool IgnoreGuardedFields = false; + DefaultBool IgnoreGuardedFields; }; /// A lightweight polymorphic wrapper around FieldRegion *. We'll use this diff --git a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp @@ -44,7 +44,7 @@ public: // These are going to be null if the respective check is disabled. mutable std::unique_ptr BT_Pure, BT_Impure; - bool ShowFixIts = false; + DefaultBool ShowFixIts; void checkBeginFunction(CheckerContext &C) const; void checkEndFunction(const ReturnStmt *RS, CheckerContext &C) const;