Author: Zahira Ammarguellat Date: 2024-12-05T07:42:02-05:00 New Revision: 44433147d62ef0b918c8925874a407ecec15193f
URL: https://github.com/llvm/llvm-project/commit/44433147d62ef0b918c8925874a407ecec15193f DIFF: https://github.com/llvm/llvm-project/commit/44433147d62ef0b918c8925874a407ecec15193f.diff LOG: [NFC] Fix uninitialized scalar field in constructor. (#118324) Non-static class field is not initialized in constructor. Added: Modified: clang-tools-extra/clangd/index/MemIndex.h clang-tools-extra/clangd/index/dex/Dex.h Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/index/MemIndex.h b/clang-tools-extra/clangd/index/MemIndex.h index 8f390c5028dc4d..fb1052b0c7ca85 100644 --- a/clang-tools-extra/clangd/index/MemIndex.h +++ b/clang-tools-extra/clangd/index/MemIndex.h @@ -97,7 +97,7 @@ class MemIndex : public SymbolIndex { // Set of files which were used during this index build. llvm::StringSet<> Files; // Contents of the index (symbols, references, etc.) - IndexContents IdxContents; + IndexContents IdxContents = IndexContents::None; std::shared_ptr<void> KeepAlive; // poor man's move-only std::any // Size of memory retained by KeepAlive. size_t BackingDataSize = 0; diff --git a/clang-tools-extra/clangd/index/dex/Dex.h b/clang-tools-extra/clangd/index/dex/Dex.h index 20c0503d19b978..46efbc6c699cab 100644 --- a/clang-tools-extra/clangd/index/dex/Dex.h +++ b/clang-tools-extra/clangd/index/dex/Dex.h @@ -146,7 +146,7 @@ class Dex : public SymbolIndex { // Set of files which were used during this index build. llvm::StringSet<> Files; // Contents of the index (symbols, references, etc.) - IndexContents IdxContents; + IndexContents IdxContents = IndexContents::None; // Size of memory retained by KeepAlive. size_t BackingDataSize = 0; }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits