forked from OSchip/llvm-project
[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:
parent
8821345e68
commit
e4b2f66d7f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue