This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Rewrite TweakTesting helpers to avoid reparsing the same code. NFC
ClosedPublic

Authored by sammccall on May 6 2022, 11:07 AM.

Details

Summary

Previously the EXPECT_AVAILABLE macros would rebuild the code at each marked
point, by expanding the cases textually.
There were often lots, and it's nice to have lots!

This reduces total unittest time by ~10% on my machine.
I did have to sacrifice a little apply() coverage in AddUsingTests (was calling
expandCases directly, which was otherwise unused), but we have
EXPECT_AVAILABLE tests covering that, I don't think there's real risk here.

Diff Detail

Event Timeline

sammccall created this revision.May 6 2022, 11:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 11:07 AM
sammccall requested review of this revision.May 6 2022, 11:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 11:07 AM
This revision is now accepted and ready to land.May 9 2022, 2:35 AM