This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Refactor forwarding call detection logic
ClosedPublic

Authored by kadircet on Jul 21 2022, 5:51 AM.

Diff Detail

Event Timeline

kadircet created this revision.Jul 21 2022, 5:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 5:51 AM
kadircet requested review of this revision.Jul 21 2022, 5:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2022, 5:51 AM
ilya-biryukov requested changes to this revision.Jul 21 2022, 7:11 AM

The new test fails in the pre merge checks.
Maybe the diff is missing some more changes?

clang-tools-extra/clangd/AST.cpp
793–794

NIT: maybe rename to PackLocation?
now that there is only 1 variable we could use a shorter name without any confusion

828

NIT: doesn't this work without dyn_cast? looks redundant, I expect derived-to-base conversion to do the right thing.

871–874

Could you update the comment to account for the new semantics?

clang-tools-extra/clangd/unittests/InlayHintTests.cpp
1446 ↗(On Diff #446457)

NIT: maybe test for the case with a single expansion here:

foo(Foo(args...), 1);
foo({args...}, 1);

?

testing multiple expansions is also interesting, but seems orthogonal to the change being made here.
E.g. tests for it would probably benefit from more than 2 appearances of args and more complicated nesting structures.

This revision now requires changes to proceed.Jul 21 2022, 7:11 AM
kadircet updated this revision to Diff 446529.Jul 21 2022, 9:02 AM
kadircet marked 4 inline comments as done.
  • Address comments
clang-tools-extra/clangd/unittests/InlayHintTests.cpp
1446 ↗(On Diff #446457)

this was mostly a "sugar" patch, the tests are part of D130260 but I didn't do a good job of splitting the change 😅

This revision is now accepted and ready to land.Jul 21 2022, 9:04 AM
This revision was landed with ongoing or failed builds.Jul 21 2022, 9:05 AM
This revision was automatically updated to reflect the committed changes.