Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use clang-tidy syntax for C++ named arguments #24661

Merged
merged 1 commit into from Apr 4, 2022

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Mar 24, 2022

Incorrect named args are source of bugs, like #22979.

To allow them being checked by clang-tidy, use a format it can understand.

Picks up #23545, with some additional changes and some feedback addressed.

With these changes invoking ./autogen.sh && ./configure CC=clang-12 CXX=clang++-12 && make clean && bear make -j9 && ( cd ./src/ && run-clang-tidy-12 -j9 ) no-longer results in named argument errors out of clang-tidy.

Ultimately I think we should just add clang-tidy-* jobs to the CI and automate things away.

fanquake added a commit that referenced this pull request Mar 25, 2022
7e22d80 addrman: fix incorrect named args (fanquake)
67f654e doc: Document clang-tidy in dev notes (MarcoFalke)

Pull request description:

  The documentation, and a single commit extracted from #24661.

  Motivation:
  > Incorrect named args are source of bugs, like #22979.

  > To allow them being checked by clang-tidy, use a format it can understand.

ACKs for top commit:
  glozow:
    ACK 7e22d80

Tree-SHA512: 4037fcea59fdf583b171bce7ad350299fe5f9feb3c398413432168f3b9a185e51884d5b30e4b4ab9c6c5bb896c178cfaee1d78d5b4f0034cd70121c9ea4184b7
@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 27, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #24595 (deploymentstatus: move g_versionbitscache global to ChainstateManager by ajtowns)
  • #24584 (wallet: avoid mixing different OutputTypes during coin selection by josibake)
  • #22910 (net: Encapsulate asmap in NetGroupManager by jnewbery)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Mar 28, 2022
21db4eb test: fix incorrect named args in wallet tests (fanquake)
8b0e776 test: fix incorrect named args in coin_selection tests (fanquake)
6fc00f7 bench: fix incorrect named args in coin_selection bench (fanquake)

Pull request description:

  Should be one of the last changes split from bitcoin#24661.

  Motivation:
  > Incorrect named args are source of bugs, like bitcoin#22979.

  > To allow them being checked by clang-tidy, use a format it can understand.

ACKs for top commit:
  MarcoFalke:
    Concept ACK 21db4eb

Tree-SHA512: c29743a70f6118cf73dc37b56b30f45da55b7d7b3b8ed36859ad59f602c3e6692eb755e05d9a4dd17f05085bcd6cb5b8c4007090a76e4fbfb053f925322cf985
@fanquake fanquake marked this pull request as ready for review March 28, 2022 13:03
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Apr 1, 2022
bf77fea test: fix incorrect named args in txpackage tests (fanquake)

Pull request description:

  Final non-scripted-diff commit split from bitcoin#24661.

  Could be tested with: `./autogen.sh && ./configure CC=clang-12 CXX=clang++-12 && make clean && bear make -j9 && ( cd ./src/ && run-clang-tidy-12 -j9 )`.

  Motivation:
  > Incorrect named args are source of bugs, like bitcoin#22979.

  > To allow them being checked by clang-tidy, use a format it can understand.

ACKs for top commit:
  ajtowns:
    ACK bf77fea

Tree-SHA512: a13bfb5fc70424b13fbeec7f164d7a0d3b72b27ebec11dfd4115b7782a0037f26e9349e06eef8a6b17b8f529e0c7f43ae37a9c252bde65706dd164704d207d5f
@fanquake
Copy link
Member Author

fanquake commented Apr 1, 2022

Rebased past #24724.

@maflcko
Copy link
Member

maflcko commented Apr 1, 2022

Maybe this can be split up as a non-scripted diff? It should be easier to review the 61 lines changed than to review the scripted diff.

@fanquake
Copy link
Member Author

fanquake commented Apr 2, 2022

Maybe this can be split up as a non-scripted diff? It should be easier to review the 61 lines changed than to review the scripted diff.

Ok. Have split this up and dropped the scripted-diff.

sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 2, 2022
7e22d80 addrman: fix incorrect named args (fanquake)
67f654e doc: Document clang-tidy in dev notes (MarcoFalke)

Pull request description:

  The documentation, and a single commit extracted from bitcoin#24661.

  Motivation:
  > Incorrect named args are source of bugs, like bitcoin#22979.

  > To allow them being checked by clang-tidy, use a format it can understand.

ACKs for top commit:
  glozow:
    ACK 7e22d80

Tree-SHA512: 4037fcea59fdf583b171bce7ad350299fe5f9feb3c398413432168f3b9a185e51884d5b30e4b4ab9c6c5bb896c178cfaee1d78d5b4f0034cd70121c9ea4184b7
@maflcko
Copy link
Member

maflcko commented Apr 4, 2022

cr ACK 37a16ff

@maflcko maflcko merged commit 0da559e into bitcoin:master Apr 4, 2022
@fanquake fanquake deleted the rebase_23545 branch April 4, 2022 08:18
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 4, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants