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

[10.6.X][TRACK] fix for clang warnings #26167

Merged
merged 3 commits into from Mar 19, 2019
Merged

[10.6.X][TRACK] fix for clang warnings #26167

merged 3 commits into from Mar 19, 2019

Conversation

smuzaffar
Copy link
Contributor

PR description:

This fixes clang warnings for packages under Track* subsystem

PR validation:

Local clang build looks good

if this PR is a backport please specify the original PR:

Before submitting your pull requests, make sure you followed this checklist:

@smuzaffar
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26167/8761

  • This PR adds an extra 36KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 13, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33570/console Started: 2019/03/13 14:50

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for master.

It involves the following packages:

TrackPropagation/SteppingHelixPropagator
TrackingTools/TrackRefitter

@cmsbuild, @perrotta, @slava77 can you please review it and eventually sign? Thanks.
@bellan, @makortel, @felicepantaleo, @abbiendi, @GiacomoSguazzoni, @jhgoh, @VinInn, @calderona, @HuguesBrun, @rovere, @gpetruc, @battibass, @ebrondol, @trocino, @dgulhan, @folguera this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-26167/33570/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 5016 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3114829
  • DQMHistoTests: Total failures: 720
  • DQMHistoTests: Total nulls: 2
  • DQMHistoTests: Total successes: 3113910
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.004 KiB( 31 files compared)
  • DQMHistoSizes: changed ( 136.85 ): 0.004 KiB JetMET/SUSYDQM
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@@ -341,7 +341,7 @@ vector<Trajectory> TrackTransformerForCosmicMuons::transform(const reco::Track&
return vector<Trajectory>();
}

return trajectoriesSM;
return std::move(trajectoriesSM);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall that in similar other cases we switched to lvalue instead of introducing a move.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning is

TrackingTools/TrackRefitter/src/TrackTransformerForCosmicMuons.cc:344:10: warning: local variable 'trajectoriesSM' will be copied despite being returned by name [-Wreturn-std-move]

I suppose this is because of it being an rvalue-reference vector<Trajectory> && trajectoriesSM = ... on line 337 above.

It would likely be clearer to drop the rvalue reference, i.e. change to vector<Trajectory> trajectoriesSM = ..., and keep returning the trajectoriesSM by value (relying on NRVO).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@makortel
thanks.
that's exactly what I meant, in a telegram style.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smuzaffar
please clarify if you are going to update this PR following the review comments.
Thank you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slava77 , @makortel I have updated it to use const vector<Trajectory> &trajectoriesSM. Let me know if you really want to use vector<Trajectory> trajectoriesSM instead.

By thr way, you we need line number 341? why not just return trajectoriesSM even if it is empty?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it really should be vector<Trajectory> (i.e. value instead of const reference) for the NRVO to apply (or at least that's what a quick test on godbolt suggests).

By thr way, you we need line number 341? why not just return trajectoriesSM even if it is empty?

I was wondering the same and would just return trajectoriesSM (probably some historical leftover).

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26167/8829

  • This PR adds an extra 36KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 19, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33658/console Started: 2019/03/19 08:25

@cmsbuild
Copy link
Contributor

Pull request #26167 was updated. @cmsbuild, @perrotta, @slava77 can you please check and sign again.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-26167/33658/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3114829
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3114631
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@slava77
Copy link
Contributor

slava77 commented Mar 19, 2019

+1

for #26167 ce22e41

  • technical
  • jenkins tests pass

@cmsbuild
Copy link
Contributor

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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit ee428a9 into cms-sw:master Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants