This is an archive of the discontinued LLVM Phabricator instance.

[clang-rename] Simplify the code of handling class paritial specializations, NFC.
ClosedPublic

Authored by hokein on Oct 12 2020, 12:43 AM.

Details

Summary

Instead of collecting all specializations and doing a post-filterin, we
can just get all targeted specializations from getPartialSpecializationsizations.

Diff Detail

Event Timeline

hokein created this revision.Oct 12 2020, 12:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2020, 12:43 AM
hokein requested review of this revision.Oct 12 2020, 12:43 AM
kbobyrev accepted this revision.Oct 13 2020, 2:01 AM

LGTM, thanks!

This revision is now accepted and ready to land.Oct 13 2020, 2:01 AM
This revision was landed with ongoing or failed builds.Oct 14 2020, 12:58 AM
This revision was automatically updated to reflect the committed changes.
danilaml added inline comments.
clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
119

Btw, this breaks on GCC <= 7.1, due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67274
Workaround is to use this->.

hokein added inline comments.Oct 14 2020, 6:16 AM
clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
119

oh, thanks for spotting it!

Fixed in e6b4179c5d282905a8ad17c57153b991c42d1126, instead of adding this->, I reverted it to the for-range loop.