[llvm] r368877 - Fix cppcheck + MSVC analyzer uninitialized member variable warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 09:55:35 PDT 2019


Author: rksimon
Date: Wed Aug 14 09:55:34 2019
New Revision: 368877

URL: http://llvm.org/viewvc/llvm-project?rev=368877&view=rev
Log:
Fix cppcheck + MSVC analyzer uninitialized member variable warning. NFCI.

Modified:
    llvm/trunk/include/llvm/IR/DiagnosticInfo.h

Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=368877&r1=368876&r2=368877&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Wed Aug 14 09:55:34 2019
@@ -663,7 +663,7 @@ public:
 private:
   /// The IR value (currently basic block) that the optimization operates on.
   /// This is currently used to provide run-time hotness information with PGO.
-  const Value *CodeRegion;
+  const Value *CodeRegion = nullptr;
 };
 
 /// Diagnostic information for applied optimization remarks.




More information about the llvm-commits mailing list