Index: clang/lib/Analysis/CFG.cpp =================================================================== --- clang/lib/Analysis/CFG.cpp +++ clang/lib/Analysis/CFG.cpp @@ -4153,7 +4153,7 @@ // operand. [...] // We add only potentially evaluated statements to the block to avoid // CFG generation for unevaluated operands. - if (S && !S->isTypeDependent() && S->isPotentiallyEvaluated()) + if (!S->isTypeDependent() && S->isPotentiallyEvaluated()) return VisitChildren(S); // Return block without CFG for unevaluated operands. Index: clang/lib/CodeGen/CGObjCGNU.cpp =================================================================== --- clang/lib/CodeGen/CGObjCGNU.cpp +++ clang/lib/CodeGen/CGObjCGNU.cpp @@ -46,17 +46,13 @@ /// types and the function declaration into a module if they're not used, and /// avoids constructing the type more than once if it's used more than once. class LazyRuntimeFunction { - CodeGenModule *CGM; - llvm::FunctionType *FTy; - const char *FunctionName; - llvm::FunctionCallee Function; + CodeGenModule *CGM = nullptr; + llvm::FunctionType *FTy = nullptr; + const char *FunctionName = nullptr; + llvm::FunctionCallee Function = nullptr; public: - /// Constructor leaves this class uninitialized, because it is intended to - /// be used as a field in another class and not all of the types that are - /// used as arguments will necessarily be available at construction time. - LazyRuntimeFunction() - : CGM(nullptr), FunctionName(nullptr), Function(nullptr) {} + LazyRuntimeFunction() = default; /// Initialises the lazy function with the name, return type, and the types /// of the arguments. Index: clang/lib/Format/UnwrappedLineParser.h =================================================================== --- clang/lib/Format/UnwrappedLineParser.h +++ clang/lib/Format/UnwrappedLineParser.h @@ -306,7 +306,7 @@ // Since the next token might already be in a new unwrapped line, we need to // store the comments belonging to that token. SmallVector CommentsBeforeNextToken; - FormatToken *FormatTok; + FormatToken *FormatTok = nullptr; bool MustBreakBeforeNextToken; // The parsed lines. Only added to through \c CurrentLines. Index: clang/lib/Lex/PPExpressions.cpp =================================================================== --- clang/lib/Lex/PPExpressions.cpp +++ clang/lib/Lex/PPExpressions.cpp @@ -44,7 +44,7 @@ /// conditional and the source range covered by it. class PPValue { SourceRange Range; - IdentifierInfo *II; + IdentifierInfo *II = nullptr; public: llvm::APSInt Val; Index: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp =================================================================== --- clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp +++ clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp @@ -96,7 +96,7 @@ mutable std::unique_ptr BT_Null, BT_Bounds, BT_Overlap, BT_NotCString, BT_AdditionOverflow, BT_UninitRead; - mutable const char *CurrentFunctionDescription; + mutable const char *CurrentFunctionDescription = nullptr; public: /// The filter is used to filter out the diagnostics which are not enabled by