This change ensures that forward declarations of classes are not considered for identifier naming checks within a translation unit.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I don't see how your fix relates to the 'header-filter' option. I can image the following cases:
- a class is forward declared and then a system header (i.e. not in header-filter) is included that defines the class -> should be no warning
- a class is forward declared and then a user header (i.e. in header-filter) is included that defines the class -> should be a warning
- a class is forward declared and never defined -> should be no warning
It seems that you only consider point 3), correct?
@mgehre, you're right. I only consider "a class is forward declared and never defined -> should be no warning" and do not test for classes that are declared in excluded headers or system headers.
Please include full diffs with the patch (http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface).
1 and 2 are a part of a more generic problem related to changes that need to be "transactional" (i.e. either all of the changes from a certain group - for example, renaming a certain identifier - need to be applied, or none). And we don't have a good solution to that yet. I don't think this can be properly solved exclusively on the level of the check, there should be some infrastructure support for this as well.