diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp --- a/clang/lib/Analysis/CFG.cpp +++ b/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. diff --git a/clang/lib/CodeGen/CGObjCGNU.cpp b/clang/lib/CodeGen/CGObjCGNU.cpp --- a/clang/lib/CodeGen/CGObjCGNU.cpp +++ b/clang/lib/CodeGen/CGObjCGNU.cpp @@ -56,7 +56,7 @@ /// 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) {} + : CGM(nullptr), FTy(nullptr), FunctionName(nullptr), Function(nullptr) {} /// Initialises the lazy function with the name, return type, and the types /// of the arguments. diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h --- a/clang/lib/Format/UnwrappedLineParser.h +++ b/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. diff --git a/clang/lib/Lex/PPExpressions.cpp b/clang/lib/Lex/PPExpressions.cpp --- a/clang/lib/Lex/PPExpressions.cpp +++ b/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; diff --git a/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp +++ b/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