Ensure that |SomeTemplate<SomeClass>* ptr_field| gets rewritten.
It turns out that before this CL |SomeTemplate<SomeClass>* ptr_field| would match the |non_free_standing_tag_type| matcher and therefore would not get rewritten. :-( Both the old |non_free_standing_tag_type| matcher, and the old |hasUniqueTypeLoc| matcher were trying to prevent generating conflicting replacements (i.e. separate edits of overlapping sections of a source file). This CL fixes this problem in a more direct way - by introducing |overlapsOtherDeclsWithinRecordDecl| matcher for FieldDecls. The new matcher replaces both of the old matchers. The new matcher is a more generic version of the old, removed |hasUniqueTypeLoc| matcher. The new matcher: 1) considers all Decls under a RecordDecl (not just FieldDecls) 2) looks for any SourceRange overlap (rather than just considering the starting SourceLocation of a field type) Bug: 1069567 Change-Id: I6392aa84e9e808790be3d84d0ba3079d1cc4ddf8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2211054Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/master@{#777544}
Showing
Please register or sign in to comment