[TableGen] Record::checkRecordAssertions() - Use const-ref iterator in for-range loop. NFCI.

Avoid unnecessary copies, reported by MSVC static analyzer.
This commit is contained in:
Simon Pilgrim 2021-09-16 18:46:08 +01:00
parent 8821345e68
commit e4b2f66d7f
1 changed files with 1 additions and 1 deletions

View File

@ -2653,7 +2653,7 @@ void Record::checkRecordAssertions() {
RecordResolver R(*this);
R.setFinal(true);
for (auto Assertion : getAssertions()) {
for (const auto &Assertion : getAssertions()) {
Init *Condition = Assertion.Condition->resolveReferences(R);
Init *Message = Assertion.Message->resolveReferences(R);
CheckAssert(Assertion.Loc, Condition, Message);