mirror of
https://github.com/intel/llvm.git
synced 2026-01-24 08:30:34 +08:00
[clang] Use DenseMap::keys (NFC) (#167831)
With DenseMap::keys, we don't need to use [[maybe_unused]].
This commit is contained in:
@@ -131,7 +131,7 @@ public:
|
||||
<< " on StorageLocation " << this << " of type "
|
||||
<< getType() << "\n";
|
||||
llvm::dbgs() << "Existing children:\n";
|
||||
for ([[maybe_unused]] auto [Field, Loc] : Children) {
|
||||
for (const auto &Field : Children.keys()) {
|
||||
llvm::dbgs() << Field->getNameAsString() << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ bool containsSameFields(const FieldSet &Fields,
|
||||
const RecordStorageLocation::FieldToLoc &FieldLocs) {
|
||||
if (Fields.size() != FieldLocs.size())
|
||||
return false;
|
||||
for ([[maybe_unused]] auto [Field, Loc] : FieldLocs)
|
||||
for (const auto &Field : FieldLocs.keys())
|
||||
if (!Fields.contains(cast_or_null<FieldDecl>(Field)))
|
||||
return false;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user