diff --git a/clang/lib/ARCMigrate/TransProperties.cpp b/clang/lib/ARCMigrate/TransProperties.cpp --- a/clang/lib/ARCMigrate/TransProperties.cpp +++ b/clang/lib/ARCMigrate/TransProperties.cpp @@ -45,7 +45,7 @@ class PropertiesRewriter { MigrationContext &MigrateCtx; MigrationPass &Pass; - ObjCImplementationDecl *CurImplD; + ObjCImplementationDecl *CurImplD = nullptr; enum PropActionKind { PropAction_None, diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -580,7 +580,7 @@ /// LambdaCaptureFields - Mapping from captured variables/this to /// corresponding data members in the closure class. llvm::DenseMap LambdaCaptureFields; - FieldDecl *LambdaThisCaptureField; + FieldDecl *LambdaThisCaptureField = nullptr; CallStackFrame(EvalInfo &Info, SourceLocation CallLoc, const FunctionDecl *Callee, const LValue *This, diff --git a/clang/lib/Frontend/ASTConsumers.cpp b/clang/lib/Frontend/ASTConsumers.cpp --- a/clang/lib/Frontend/ASTConsumers.cpp +++ b/clang/lib/Frontend/ASTConsumers.cpp @@ -184,7 +184,7 @@ namespace { class ASTViewer : public ASTConsumer { - ASTContext *Context; + ASTContext *Context = nullptr; public: void Initialize(ASTContext &Context) override { this->Context = &Context; diff --git a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp @@ -29,7 +29,7 @@ class StackAddrEscapeChecker : public Checker, check::EndFunction> { - mutable IdentifierInfo *dispatch_semaphore_tII; + mutable IdentifierInfo *dispatch_semaphore_tII = nullptr; mutable std::unique_ptr BT_stackleak; mutable std::unique_ptr BT_returnstack; mutable std::unique_ptr BT_capturedstackasync;