This is an archive of the discontinued LLVM Phabricator instance.

[clang-rename] handle overridden functions correctly
ClosedPublic

Authored by omtcyfz on Aug 1 2016, 4:38 AM.

Details

Summary
  1. Renaming overridden functions only works for two levels of "overriding hierarchy". clang-rename should recursively add overridden methods.
  2. Make use of forEachOverridden AST Matcher.

Diff Detail

Repository
rL LLVM

Event Timeline

omtcyfz updated this revision to Diff 66302.Aug 1 2016, 4:38 AM
omtcyfz retitled this revision from to [clang-rename] handle overridden functions correctly.
omtcyfz updated this object.
omtcyfz added reviewers: alexfh, klimek.
omtcyfz added a subscriber: cfe-commits.
alexfh requested changes to this revision.Aug 1 2016, 9:26 AM
alexfh edited edge metadata.
alexfh added inline comments.
test/clang-rename/FunctionOverride.cpp
3 ↗(On Diff #66302)

I guess, this test will pass even if clang-rename doesn't do any changes, since the pattern in the CHECK line will match with itself. There are multiple ways to fix this. For instance, you can anchor the pattern to the start of line (// CHECK: {{ˆ}}class A ...) or add | sed 's,//.*,//' to the pipeline before | FileCheck %s.

This revision now requires changes to proceed.Aug 1 2016, 9:26 AM
omtcyfz updated this revision to Diff 66338.Aug 1 2016, 10:08 AM
omtcyfz edited edge metadata.
omtcyfz marked an inline comment as done.
alexfh accepted this revision.Aug 1 2016, 10:12 AM
alexfh edited edge metadata.

LG

This revision is now accepted and ready to land.Aug 1 2016, 10:12 AM
This revision was automatically updated to reflect the committed changes.