Commit graph

18 commits

Author SHA1 Message Date
Danil Chapovalov
b889a7aee4 Replace iwyu rules for libcxx with reference to rules maintain by the library
No-Try: True
Bug: None
Change-Id: Ie79dbb1fd5e0b544ca0ea41a58eabd1967e7d5e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285481
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38766}
2022-11-29 16:37:57 +00:00
Harald Alvestrand
b4c96d6476 Update IWYU mappings with a few more lines.
Also run IWYU on a file picked for testing and check in the result.

Bug: none
Change-Id: Ide36bc59d126064f2bab7af441f72a6e8477c848
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280601
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38481}
2022-10-26 22:58:55 +00:00
Florent Castelli
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
Björn Terelius
f0faa999a5 Make iwyu use public API for pthread library
Bug: webrtc:13662
Change-Id: I8ee1d1b5882dcda6acdee7258f9a37676bbd0be7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36579}
2022-04-20 06:37:22 +00:00
Harald Alvestrand
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
Harald Alvestrand
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
Harald Alvestrand
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
Harald Alvestrand
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
Byoungchan Lee
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
Harald Alvestrand
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
Harald Alvestrand
39993844fa Reland "Reland "Split peer_connection_integrationtest.cc into pieces""
This reverts commit 89c40e246e.

Reason for revert: Added missing INSTANTIATE

Original change's description:
> Revert "Reland "Split peer_connection_integrationtest.cc into pieces""
>
> This reverts commit 772066bf16.
>
> 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 8644f2b763.
> >
> > Reason for revert: Fixed the bugs
> >
> > Original change's description:
> > > Revert "Split peer_connection_integrationtest.cc into pieces"
> > >
> > > This reverts commit cae4656d4a.
> > >
> > > 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
Harald Alvestrand
89c40e246e Revert "Reland "Split peer_connection_integrationtest.cc into pieces""
This reverts commit 772066bf16.

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 8644f2b763.
>
> Reason for revert: Fixed the bugs
>
> Original change's description:
> > Revert "Split peer_connection_integrationtest.cc into pieces"
> >
> > This reverts commit cae4656d4a.
> >
> > 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
Harald Alvestrand
772066bf16 Reland "Split peer_connection_integrationtest.cc into pieces"
This reverts commit 8644f2b763.

Reason for revert: Fixed the bugs

Original change's description:
> Revert "Split peer_connection_integrationtest.cc into pieces"
>
> This reverts commit cae4656d4a.
>
> 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
Mirko Bonadei
8644f2b763 Revert "Split peer_connection_integrationtest.cc into pieces"
This reverts commit cae4656d4a.

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
Harald Alvestrand
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
Harald Alvestrand
bee6408d7b Introduce length checking of all STUN byte string attributes
This will cause encoding of a STUN message with an over-long
byte string attribute to fail.

Bug: chromium:1144646
Change-Id: I265174577376ce01439835c03f2d46700842d211
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/191322
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Justin Uberti <juberti@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32603}
2020-11-13 12:31:37 +00:00
Harald Alvestrand
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
Harald Alvestrand
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