Commit Graph

14 Commits

Author SHA1 Message Date
48a0c1a860 iwyu: MacOS Homebrew support
Bug: None
Change-Id: I7eba64647715b6e109e88faa177e48056eb001de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280580
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38477}
2022-10-26 13:28:25 +00:00
c2a2bef4f7 Add a header-reduction argument to IWYU
This allows to delete non-needed headers from .h files.
Ran this on peer_connection.cc to demonstrate.

Bug: none
Change-Id: I69ce48be25a9778297e521282898c6ac31e7ea6c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/254600
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36170}
2022-03-10 12:25:12 +00:00
c24a2189d7 Update IWYU tool with a mapping file
Also apply IWYU to all .cc files in pc/, and correct BUILD file to match.
Note: Some files came out wrong when iwyu was applied. These are not included.

Bug: none
Change-Id: Ib5ea46b8fcc505414d0447cca7218ad3afc2e321
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252280
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36064}
2022-02-24 11:05:06 +00:00
981c572eab Updated apply-iwyu to autogenerate compile_commands.json
Also deleted iwyu script that was not maintained, and deleted
some options that made the script more complex.

Bug: none
Change-Id: I39d8eaa37f12c72ddc127ae145e6a3a80f328316
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251384
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35966}
2022-02-09 14:30:57 +00:00
0d4af12cab Add back --no_fwd_decls to iwyu run
Applies IWYU to pc/peer_connection.cc as test.

Bug: webrtc:13532
Change-Id: Iec453fdf6525c6376cb73dd1199326a8e1a21ff6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35845}
2022-01-31 10:26:17 +00:00
e286a7bbf7 Modify apply-iwyu to utilize compile_commands.json
Bug: webrtc:13532
Change-Id: I06e5987469e732296deb1eefd317e2478add98b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246040
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35674}
2022-01-12 23:08:22 +00:00
2ff25db72a Update apply-iwyu tool to report compile errors
Note: apply-iwyu on a lone .h file *will* fail due to c++/c confusion.

Bug: none
Change-Id: I3dda0df28cd4ec85ecb895efed1b04c3d70343bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/212680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33525}
2021-03-22 13:01:56 +00:00
39993844fa Reland "Reland "Split peer_connection_integrationtest.cc into pieces""
This reverts commit 89c40e246e39372390f0f843545d4e56aa657040.

Reason for revert: Added missing INSTANTIATE

Original change's description:
> Revert "Reland "Split peer_connection_integrationtest.cc into pieces""
>
> This reverts commit 772066bf16b125c1346a4d1b3e28c6e6f21cc1a7.
>
> Reason for revert: Did not catch all missing INSTANTIATE_TEST_SUITE_P
>
> Original change's description:
> > Reland "Split peer_connection_integrationtest.cc into pieces"
> >
> > This reverts commit 8644f2b7632cff5e46560c2f5cf7c0dc071aa32d.
> >
> > Reason for revert: Fixed the bugs
> >
> > Original change's description:
> > > Revert "Split peer_connection_integrationtest.cc into pieces"
> > >
> > > This reverts commit cae4656d4a7439e25160ff4d94e50949ff87cebe.
> > >
> > > Reason for revert: Breaks downstream build (missing INSTANTIATE_TEST_SUITE_P in pc/data_channel_integrationtest.cc).
> > >
> > > Original change's description:
> > > > Split peer_connection_integrationtest.cc into pieces
> > > >
> > > > This creates two integration tests: One for datachannel, the other
> > > > for every test that is not datachannel.
> > > >
> > > > It separates out the common framework to a new file in pc/test.
> > > > Also applies some fixes to IWYU.
> > > >
> > > > Bug: None
> > > > Change-Id: I919def1c360ffce205c20bec2d864aad9b179c3a
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207060
> > > > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > > > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#33244}
> > >
> > > TBR=hbos@webrtc.org,hta@webrtc.org
> > >
> > > # Not skipping CQ checks because original CL landed > 1 day ago.
> > >
> > > No-Try: True
> > > Bug: None
> > > Change-Id: I7dbedd3256cb7ff47eb5f8cd46c7c044ed0aa1e0
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207283
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#33255}
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > Bug: None
> > Change-Id: I1bb6186d7f898de82d26f4cd3d8a88014140c518
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207864
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33283}
>
> Bug: None
> Change-Id: I2b09b57c2477e52301ac30ec12ed69f2555ba7f8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208021
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33286}

Bug: None
Change-Id: I6e362ac2234ae6c69dc9bbf886ee7dece8484202
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208022
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33289}
2021-02-17 12:28:07 +00:00
89c40e246e Revert "Reland "Split peer_connection_integrationtest.cc into pieces""
This reverts commit 772066bf16b125c1346a4d1b3e28c6e6f21cc1a7.

Reason for revert: Did not catch all missing INSTANTIATE_TEST_SUITE_P

Original change's description:
> Reland "Split peer_connection_integrationtest.cc into pieces"
>
> This reverts commit 8644f2b7632cff5e46560c2f5cf7c0dc071aa32d.
>
> Reason for revert: Fixed the bugs
>
> Original change's description:
> > Revert "Split peer_connection_integrationtest.cc into pieces"
> >
> > This reverts commit cae4656d4a7439e25160ff4d94e50949ff87cebe.
> >
> > Reason for revert: Breaks downstream build (missing INSTANTIATE_TEST_SUITE_P in pc/data_channel_integrationtest.cc).
> >
> > Original change's description:
> > > Split peer_connection_integrationtest.cc into pieces
> > >
> > > This creates two integration tests: One for datachannel, the other
> > > for every test that is not datachannel.
> > >
> > > It separates out the common framework to a new file in pc/test.
> > > Also applies some fixes to IWYU.
> > >
> > > Bug: None
> > > Change-Id: I919def1c360ffce205c20bec2d864aad9b179c3a
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207060
> > > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#33244}
> >
> > TBR=hbos@webrtc.org,hta@webrtc.org
> >
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> >
> > No-Try: True
> > Bug: None
> > Change-Id: I7dbedd3256cb7ff47eb5f8cd46c7c044ed0aa1e0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207283
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33255}
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: None
> Change-Id: I1bb6186d7f898de82d26f4cd3d8a88014140c518
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207864
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33283}

Bug: None
Change-Id: I2b09b57c2477e52301ac30ec12ed69f2555ba7f8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/208021
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33286}
2021-02-17 08:59:05 +00:00
772066bf16 Reland "Split peer_connection_integrationtest.cc into pieces"
This reverts commit 8644f2b7632cff5e46560c2f5cf7c0dc071aa32d.

Reason for revert: Fixed the bugs

Original change's description:
> Revert "Split peer_connection_integrationtest.cc into pieces"
>
> This reverts commit cae4656d4a7439e25160ff4d94e50949ff87cebe.
>
> Reason for revert: Breaks downstream build (missing INSTANTIATE_TEST_SUITE_P in pc/data_channel_integrationtest.cc).
>
> Original change's description:
> > Split peer_connection_integrationtest.cc into pieces
> >
> > This creates two integration tests: One for datachannel, the other
> > for every test that is not datachannel.
> >
> > It separates out the common framework to a new file in pc/test.
> > Also applies some fixes to IWYU.
> >
> > Bug: None
> > Change-Id: I919def1c360ffce205c20bec2d864aad9b179c3a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207060
> > Reviewed-by: Henrik Boström <hbos@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#33244}
>
> TBR=hbos@webrtc.org,hta@webrtc.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> No-Try: True
> Bug: None
> Change-Id: I7dbedd3256cb7ff47eb5f8cd46c7c044ed0aa1e0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207283
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33255}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: None
Change-Id: I1bb6186d7f898de82d26f4cd3d8a88014140c518
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207864
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33283}
2021-02-16 18:53:18 +00:00
8644f2b763 Revert "Split peer_connection_integrationtest.cc into pieces"
This reverts commit cae4656d4a7439e25160ff4d94e50949ff87cebe.

Reason for revert: Breaks downstream build (missing INSTANTIATE_TEST_SUITE_P in pc/data_channel_integrationtest.cc).

Original change's description:
> Split peer_connection_integrationtest.cc into pieces
>
> This creates two integration tests: One for datachannel, the other
> for every test that is not datachannel.
>
> It separates out the common framework to a new file in pc/test.
> Also applies some fixes to IWYU.
>
> Bug: None
> Change-Id: I919def1c360ffce205c20bec2d864aad9b179c3a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207060
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#33244}

TBR=hbos@webrtc.org,hta@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

No-Try: True
Bug: None
Change-Id: I7dbedd3256cb7ff47eb5f8cd46c7c044ed0aa1e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207283
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33255}
2021-02-13 16:16:35 +00:00
cae4656d4a Split peer_connection_integrationtest.cc into pieces
This creates two integration tests: One for datachannel, the other
for every test that is not datachannel.

It separates out the common framework to a new file in pc/test.
Also applies some fixes to IWYU.

Bug: None
Change-Id: I919def1c360ffce205c20bec2d864aad9b179c3a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/207060
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33244}
2021-02-12 10:06:43 +00:00
3eaee6bff8 IWYU: Don't filter for already-included header files.
The Google C++ style guide says that when both use a declaration, both
the .h file and the .cc file should include the relevant header.

Bug: webrtc:12057
Change-Id: I4c01ce8930d73418cb23c7fe1bb7bcd12c1e2568
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189541
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32435}
2020-10-19 10:12:03 +00:00
1f7eab68c0 Remove superfluous #includes from peer_connection.cc, and add IWYU
Also adds a script that runs iwyu to the tools_webrtc directory.

Bug: webrtc:11995
Change-Id: I2185a9957e3578c2ec6d0d306061a48fcfe840d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188800
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32431}
2020-10-18 18:48:10 +00:00