This is an archive of the discontinued LLVM Phabricator instance.

ASTMatchers: Avoid using SmallVector::set_size()
ClosedPublic

Authored by dexonsmith on Dec 8 2021, 12:39 PM.

Details

Summary

Update variadicMatcherDescriptor to assert on reserved capacity and
to call emplace_back() instead of calling set_size() and constructing
the element in-place.

Diff Detail

Event Timeline

dexonsmith requested review of this revision.Dec 8 2021, 12:39 PM
dexonsmith created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2021, 12:39 PM
dblaikie accepted this revision.Dec 9 2021, 12:04 PM
dblaikie added a subscriber: dblaikie.

Looks good!

This revision is now accepted and ready to land.Dec 9 2021, 12:04 PM
This revision was landed with ongoing or failed builds.Jan 11 2022, 5:02 PM
This revision was automatically updated to reflect the committed changes.