[PATCH] D141478: [include-cleaner] Improve header spelling in the presence of links
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 11 05:44:01 PST 2023
sammccall added a comment.
In D141478#4043134 <https://reviews.llvm.org/D141478#4043134>, @hokein wrote:
> Thanks for tracking it down. The solution looks good to me. Since this is a fragile and subtle issue, is it possible to have a unittest for it? If it is not too hard, it would be nice to have a test.
I think it's hard to write a test that's worth anything :-(
It can't be a test that poking FileManager doesn't affect spelling, because I didn't fix that.
I can test specifically that getExports() doesn't affect the getName() of relevant fileentries, but if we regress this symptom that's very unlikely to be the mechanism.
An end-to-end test for the symptom needs to be set up in a way that tickles the bad side-effect at exactly the wrong time, and it's hard to predict how to do that in general.
I'm not happy with this patch, but I'm not sure a bad test would help with that :-\
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141478/new/
https://reviews.llvm.org/D141478
More information about the cfe-commits
mailing list