From 675857ee3eeaaaeb6f43ed78fa7f9a34c06c21dc Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 14 Jul 2019 19:13:09 +0000 Subject: [PATCH] Fix uninitialized variable analyzer warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366029 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 1324abb04a..ee7950de45 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -12192,7 +12192,7 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl *var) { // Cache the result of checking for constant initialization. Optional CacheHasConstInit; - const Expr *CacheCulprit; + const Expr *CacheCulprit = nullptr; auto checkConstInit = [&]() mutable { if (!CacheHasConstInit) CacheHasConstInit = var->getInit()->isConstantInitializer( -- 2.40.0