Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[include-cleaner] Weaken signal for boosting preferred headers
Putting preferred header signal above completeness implied we would uprank forward declarations above complete ones in certain cases. This can be desired in cases where: - Complete definition is private. But this case is already governed by publicness signal. - The library indeed intends to provide a forward declaring interface, like iosfwd vs ostream. In all other cases, upranking is undesired as it means we've picked up prefered headerness signal by mistake from an unrelated declaration to the library. This change regresses the behavior for libraries that intentionally provide a forward declaring interface. But that wasn't something we intended to support explicitly, it was working incidentally when the forward declaring header had a similar name to the symbol. Moreover, include-cleaner deliberately discourages forward-declarations, so not working in this case is also more aligned with rest of the components. Differential Revision: https://reviews.llvm.org/D159441
- Loading branch information