This is an archive of the discontinued LLVM Phabricator instance.

[Clang-apply-replacements] Remove custom version printing; fix some Include What You Use warnings
AbandonedPublic

Authored by Eugene.Zelenko on Jul 21 2016, 3:54 PM.

Details

Reviewers
alexfh
Summary

I checked this patch on my own build on RHEL 6. Regressions were OK.

Diff Detail

Repository
rL LLVM

Event Timeline

Eugene.Zelenko retitled this revision from to [Clang-apply-replacements] Remove custom version printing; fix some Include What You Use warnings.
Eugene.Zelenko updated this object.
Eugene.Zelenko added a reviewer: alexfh.
Eugene.Zelenko set the repository for this revision to rL LLVM.
Eugene.Zelenko added a subscriber: cfe-commits.
alexfh requested changes to this revision.Jul 21 2016, 5:44 PM
alexfh edited edge metadata.
This revision now requires changes to proceed.Jul 21 2016, 5:44 PM
Eugene.Zelenko edited edge metadata.

Full context diff.

alexfh requested changes to this revision.Jul 22 2016, 7:56 AM
alexfh edited edge metadata.

In many cases a transitively included header can be considered a part of a public interface of an already included header, e.g. it's reasonable to assume that DiagnosticIDs.h is a part of the public API exposed by Diagnostics.h. Thus, I consider IWYU fixes useless or even mildly harmful until (most of) LLVM/Clang headers are properly annotated with // IWYU pragma: export etc.

The other change seems fine, if you have properly verified the new behavior.

This revision now requires changes to proceed.Jul 22 2016, 7:56 AM
Eugene.Zelenko edited edge metadata.

Don't include DiagnosticIDs.h.

Don't include DiagnosticIDs.h.

This header is just an example. I don't want anyone (including myself) manually figure out which of the headers inserted by IWYU actually need to be inserted. I'm also against adding #includes for every single transitively included header, since many of the headers can be considered "exported" by other headers. So, please, stop sending IWYU cleanups before reaching the general agreement and properly annotating LLVM and Clang headers.

alexfh requested changes to this revision.Jul 23 2016, 12:19 AM
alexfh edited edge metadata.
This revision now requires changes to proceed.Jul 23 2016, 12:19 AM

My last comment might come across as somewhat harsh. I didn't mean it to be harsh and just wanted to say that imo, llvm code is not ready to mechanically applying IWYU.

Eugene.Zelenko abandoned this revision.Jul 25 2016, 10:45 AM