diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index df62f0e918b2..a517d81545e8 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1062,7 +1062,7 @@ static void appendFieldAndPadding(CodeGenModule &CGM, llvm::Constant *CodeGenModule:: GetAddrOfConstantCFString(const StringLiteral *Literal) { std::string str; - unsigned StringLength; + unsigned StringLength = 0; bool isUTF16 = false; if (Literal->containsNonAsciiOrNull()) {