-
Notifications
You must be signed in to change notification settings - Fork 37.7k
refactor (tidy): Fixes after enable-debug configure #27353
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
The failure here is #27316. |
8ce79e6
to
73afe2c
Compare
I think this PR diff is an improvement. |
I'll undraft this then, even if I still don't understand why |
Could you explain why it's an improvement? It's unclear to me why const references to iterators would be an improvement, I was under the impression that iters by value were fine. |
UPD. The mentioned defined macro makes |
Well, my main point was enforcing of const-corectness, but I missed the fact that Making a constness at the call site obvious for a code reader/reviewer is a very minor improvement, which could be just ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making a constness at the call site obvious for a code reader/reviewer is a very minor improvement, which could be just ignored.
Ok, so it seems we agree there is no code quality benefit. Is the motivation = CI already failing or wanting to add --enable-debug to it?
The failure here is #27316.
I'm having trouble understanding the relationship between this PR and that issue, am I missing something?
The CI was previously failing on the functional tests due to that issue. |
How is it possible for that functional test to fail due to using iters vs references to iters? |
The functional test failure was sporadic, and unrelated to the changes proposed here. |
To clarify my point, this change does improve code performance when the build is configured with I'm not saying that this fact justifies this PR sufficiently, but it should be considered, at the very least.
I'd avoid it as it will change code paths being parsed now (for example, the |
73afe2c
to
efa1d5b
Compare
This diff can be reproduced by running: ``` ./autogen.sh && CC=clang CXX=clang++ CPPFLAGS=-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE ./configure --enable-suppress-external-warnings --enable-debug bear --config src/.bear-tidy-config -- make -j $(nproc) cd ./src/ && run-clang-tidy -quiet -fix -j $(nproc) ```
efa1d5b
to
3e76aff
Compare
Updated 73afe2c -> efa1d5b (clangTidyDebug_0 -> clangTidyDebug_1, compare).
Rebased efa1d5b -> 3e76aff (clangTidyDebug_1 -> clangTidyDebug_2, compare). |
Concept ~0 on making our clang-tidy usage dependant on some Boost define. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 3e76aff
Concept ~0 on making our clang-tidy usage dependant on some Boost define.
What are possible drawbacks here?
In this case the -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE
is just a subset of flags being used for debug builds.
I don't really understand adding it given your comment above:
You suggested avoiding changing the code paths being parsed, and then suggested adding a define that changes the code paths being parsed? In its current state, this PR is adding a Boost define, because it has a side-effect that basically "tricks" We could instead probably just add the consts, and leave it at that, without trying to invoke some boost-safe-mode-based side effect to trick a linter, and enforce some code change that in reality, doesn't make any difference to anything. |
@TheCharlatan can you update this to drop 3e76aff, or I think we could just close this? |
I'll drop the commit. Could this be related to #27586 and solve some of the performance issues? |
3e76aff
to
27d182c
Compare
Updated 3e76aff -> 27d182c (clangTidyDebug_2 -> clangTidyDebug_3, compare).
|
re: #27353 (comment)
Having #27724 been merged, I agree to close this PR. |
This diff can be reproduced by running (tested with clang-14 and clang-15):