-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[CORE] Apply code checks/format #46999
Conversation
cms-bot internal usage |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46999/43085 ERROR: Build errors found during clang-tidy run.
|
@@ -632,7 +633,7 @@ namespace edm { | |||
} | |||
|
|||
void ELoutput::changeFile(const std::string& filename) { | |||
os.reset(new std::ofstream(filename.c_str(), std::ios /*_base*/ ::app), close_and_delete()); | |||
os = std::make_shared<std::ofstream>(filename.c_str(), std::ios /*_base*/ ::app, close_and_delete()); |
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.
@makortel , as std::make_shared
does not allow a custom deleter. so should I revert this change and add // NOLINT
?
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.
as
std::make_shared
does not allow a custom deleter. so should I revert this change and add// NOLINT
?
Yes, this change should be reverted.
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.
So clang-tidy made a change that it then failed to process? :(
@@ -214,7 +213,7 @@ namespace edm { | |||
std::optional<ProductProvenance> productProvenance) const { | |||
assert(!bd.produced()); | |||
if (productProvenance) { | |||
productProvenanceRetrieverPtr()->insertIntoSet(std::move(*productProvenance)); | |||
productProvenanceRetrieverPtr()->insertIntoSet(*productProvenance); |
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.
Just to note for future reference, ProductProvenance
is as efficient to copy as it is to move.
ea26d4a
to
c0045dc
Compare
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46999/43108 |
A new Pull Request was created by @smuzaffar for master. It involves the following packages:
@Dr15Jones, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@@ -148,7 +148,7 @@ namespace { | |||
} | |||
}; | |||
|
|||
static ThreadTracker& getTracker() { |
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.
I don't like this code change.
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.
Isn't this all inside an anonymous namespace anyway ?
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.
Isn't this all inside an anonymous namespace anyway ?
yes @fwyzard. clang-tidy removed the static
due to exact same reason (https://clang.llvm.org/extra/clang-tidy/checks/readability/static-definition-in-anonymous-namespace.html)
warning: 'getTracker' is a static definition in anonymous namespace; static is redundant here [readability-static-definition-in-anonymous-namespace]
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.
I should have looked closer. I had thought the function was actually a member function of a class, not a free function.
+1 Size: This PR adds an extra 24KB to repository Comparison SummarySummary:
|
Comparison differences are related to #46416 |
+core |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @sextonkennedy, @mandrenguyen, @antoniovilela, @rappoccio (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PGO changes ( e.g. using relative source path instead of full path ) broke
scram build code-checks
rule. So it has not been running properly on PR.code-format
was working but onlycode-checks
i.e.clang-tidy
did not work as it required correctcompiler_command.json
with correct source file paths.Build rules are fixed now, so this PR applies
code-checks
( and format) for those files which were merged with proper code-checks