Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10159 )
Change subject: iwyu: pass source root into fix_includes ...................................................................... iwyu: pass source root into fix_includes fix_includes tries to identify the "main compilation unit header" for each file using some heuristics. For example, "foo-test.cc" is associated with "foo.h". This was previously broken due to the fact that the tool runs from the build/ directory instead of the source directory, so it saw the CC file as "../../src/kudu/.../foo.cc" while it saw the header file as "kudu/.../foo.h". This adds a --source_root parameter to fix_includes so that the source files can be relativized to this path prior to fixing. Change-Id: Iac9f0b47b9a3c8180e178ed59863d33840434433 Reviewed-on: http://gerrit.cloudera.org:8080/10159 Tested-by: Todd Lipcon <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> --- M build-support/iwyu.py M build-support/iwyu/fix_includes.py 2 files changed, 24 insertions(+), 14 deletions(-) Approvals: Todd Lipcon: Verified Alexey Serbin: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/10159 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iac9f0b47b9a3c8180e178ed59863d33840434433 Gerrit-Change-Number: 10159 Gerrit-PatchSet: 2 Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
