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
[Clang tidy] Apply checks for core #30712
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30712/17027
|
A new Pull Request was created by @cmsbuild for master. It involves the following packages: DataFormats/Common @makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@cmsbuild, please test |
The tests are being triggered in jenkins.
|
-1 Tested at: 30f9777 CMSSW: CMSSW_11_2_X_2020-07-14-2300 I found follow errors while testing this PR Failed tests: Build ClangBuild
I found compilation warning when building: See details on the summary page.
I found compilation warning while trying to compile with clang. Command used:
See details on the summary page. |
Comparison not run due to Build errors (RelVals and Igprof tests were also skipped) |
@@ -640,11 +640,11 @@ bool testMultiAssociation::tryBadFill(int i) { | |||
} break; | |||
case 11: { // Can copy a LazyFiller, but crash if I fill twice | |||
MultiRef::LazyFiller filler = m.lazyFiller(handleK1, true); | |||
MultiRef::LazyFiller filler2 = filler; | |||
const MultiRef::LazyFiller& filler2 = filler; |
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.
Apparently we need to add
const MultiRef::LazyFiller& filler2 = filler; | |
const MultiRef::LazyFiller& filler2 = filler; //NOLINT |
here.
@smuzaffar @mrodozov Should that be done in a separate PR and then we refresh this one?
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.
All the warnings appear to be from cases where a copy is intentional and should not be changed to const reference.
} break; | ||
case 12: { // Can copy a FastFiller | ||
MultiRef::FastFiller filler = m.fastFiller(handleK1); | ||
MultiRef::FastFiller filler2 = filler; | ||
const MultiRef::FastFiller& filler2 = filler; |
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.
Same here
CPPUNIT_ASSERT(4 == test.getParameter<std::string>("sb3").size()); | ||
std::vector<std::string> vs = test.getParameter<std::vector<std::string> >("vs"); | ||
int vssize = vs.size(); | ||
//FIXME doesn't do spaces right | ||
edm::Entry e(test.retrieve("vs")); | ||
const edm::Entry& e(test.retrieve("vs")); |
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.
and here
CPPUNIT_ASSERT(4 == test.getParameter<std::string>("sb3").size()); | ||
std::vector<std::string> vs = test.getParameter<std::vector<std::string> >("vs"); | ||
int vssize = vs.size(); | ||
//FIXME doesn't do spaces right | ||
edm::Entry e(test.retrieve("vs")); | ||
const edm::Entry& e(test.retrieve("vs")); |
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.
and here
yes unfortunately the checks were not applied properly but I found that after making the PR :/ I'm fixing it and force pushing the updates |
Apply new clang checks. See #30508 for more info.