Skip to content

Commit 6bde640

Browse files
[clang] Use DenseMap::keys (NFC)
With DenseMap::keys, we don't need to use [[maybe_unused]].
1 parent 99a726e commit 6bde640

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/include/clang/Analysis/FlowSensitive/StorageLocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class RecordStorageLocation final : public StorageLocation {
131131
<< " on StorageLocation " << this << " of type "
132132
<< getType() << "\n";
133133
llvm::dbgs() << "Existing children:\n";
134-
for ([[maybe_unused]] auto [Field, Loc] : Children) {
134+
for (const auto &Field : Children.keys()) {
135135
llvm::dbgs() << Field->getNameAsString() << "\n";
136136
}
137137
}

clang/lib/Analysis/FlowSensitive/ASTOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ bool containsSameFields(const FieldSet &Fields,
8181
const RecordStorageLocation::FieldToLoc &FieldLocs) {
8282
if (Fields.size() != FieldLocs.size())
8383
return false;
84-
for ([[maybe_unused]] auto [Field, Loc] : FieldLocs)
84+
for (const auto &Field : FieldLocs.keys())
8585
if (!Fields.contains(cast_or_null<FieldDecl>(Field)))
8686
return false;
8787
return true;

0 commit comments

Comments
 (0)