[clang-tools-extra] 9c8a6a1 - [include-cleaner] Fix a warning
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 25 09:51:32 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T09:51:25-08:00
New Revision: 9c8a6a1627480b30b54b4ffc691beebb8554e124
URL: https://github.com/llvm/llvm-project/commit/9c8a6a1627480b30b54b4ffc691beebb8554e124
DIFF: https://github.com/llvm/llvm-project/commit/9c8a6a1627480b30b54b4ffc691beebb8554e124.diff
LOG: [include-cleaner] Fix a warning
This patch fixes:
clang-tools-extra/include-cleaner/lib/HTMLReport.cpp:240:51: error:
missing field 'Locations' initializer
[-Werror,-Wmissing-field-initializers]
Added:
Modified:
clang-tools-extra/include-cleaner/lib/HTMLReport.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp b/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp
index fc9b00dc572df..cd43a27e5fc5b 100644
--- a/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp
+++ b/clang-tools-extra/include-cleaner/lib/HTMLReport.cpp
@@ -146,11 +146,11 @@ class Reporter {
unsigned Offset;
RefType Type;
Symbol Sym;
- SmallVector<SymbolLocation> Locations;
- SmallVector<Header> Headers;
- SmallVector<const Include *> Includes;
- bool Satisfied = false; // Is the include present?
- std::string Insert; // If we had no includes, what would we insert?
+ SmallVector<SymbolLocation> Locations = {};
+ SmallVector<Header> Headers = {};
+ SmallVector<const Include *> Includes = {};
+ bool Satisfied = false; // Is the include present?
+ std::string Insert = {}; // If we had no includes, what would we insert?
};
std::vector<Ref> Refs;
llvm::DenseMap<const Include *, std::vector<unsigned>> IncludeRefs;
More information about the cfe-commits
mailing list