-
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
SimTracker : fix gcc700 warning: class has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor] #18923
SimTracker : fix gcc700 warning: class has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor] #18923
Conversation
A new Pull Request was created by @gartung (Patrick Gartung) for master. It involves the following packages: SimTracker/SiPhase2Digitizer @cmsbuild, @civanch, @mdhildreth, @kpedro88, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
-1 Tested at: fc4f487 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: You can see the results of the tests here: I found follow errors while testing this PR Failed tests: Build ClangBuild
I found an error when building: >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizer.cc >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.cc >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizerAlgorithm.cc >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PixelDigitizerAlgorithm.cc >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PSSDigitizerAlgorithm.cc /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.cc:47:1: error: definition of explicitly-defaulted 'PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm()' PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm() { ^ In file included from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.cc:4:0: /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.h:13:11: error: 'virtual PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm()' explicitly defaulted here virtual ~PSPDigitizerAlgorithm() = default;
I found a compilation error while trying to compile with clang: ^ /cvmfs/cms-ib.cern.ch/nweek-02473/slc6_amd64_gcc530/cms/cmssw-patch/CMSSW_9_2_X_2017-05-24-1100/src/FWCore/Framework/interface/EDAnalyzer.h:80:18: note: hidden overloaded virtual function 'edm::EDAnalyzer::endJob' declared here: different number of parameters (0 vs 2) virtual void endJob(){} ^ >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/test/Phase2TrackerMonitorDigi.cc /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.cc:47:24: error: definition of explicitly defaulted destructor PSPDigitizerAlgorithm::~PSPDigitizerAlgorithm() { ^ 1 warning generated. >> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-24-1100/src/SimTracker/SiPhase2Digitizer/test/TBeamTest.cc 1 warning generated. The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison not run due to Build errors (RelVals and Igprof tests were also skipped) |
@Dr15Jones this pattern produced an error. Did I do something wrong? |
The problem is that there's a definition of the destructor in the .cc file, which means it can't be |
Yes I think I was only supposed to do that in base classes. The other pull requests will likely fail. |
…rtual destructor [-Wnon-virtual-dtor]
Pull request #18923 was updated. @cmsbuild, @civanch, @mdhildreth, @kpedro88, @davidlange6 can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
+1 |
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 requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar |
+1 |
Fixes warnings like these by adding virtual destructor with default constructor.
/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/d36af6c2d5d322e52932978c6b2c4857/opt/cmssw/slc6_amd64_gcc700/cms/cmssw-patch/CMSSW_9_2_X_2017-05-23-2300/src/SimTracker/SiPhase2Digitizer/plugins/Phase2TrackerDigitizerAlgorithm.h:45:7: warning: 'class Phase2TrackerDigitizerAlgorithm' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/d36af6c2d5d322e52932978c6b2c4857/opt/cmssw/slc6_amd64_gcc700/cms/cmssw-patch/CMSSW_9_2_X_2017-05-23-2300/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.h:10:7: warning: base class 'class Phase2TrackerDigitizerAlgorithm' has accessible non-virtual destructor [-Wnon-virtual-dtor]
/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/d36af6c2d5d322e52932978c6b2c4857/opt/cmssw/slc6_amd64_gcc700/cms/cmssw-patch/CMSSW_9_2_X_2017-05-23-2300/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.h:10:7: warning: 'class PSPDigitizerAlgorithm' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/d36af6c2d5d322e52932978c6b2c4857/opt/cmssw/slc6_amd64_gcc700/cms/cmssw-patch/CMSSW_9_2_X_2017-05-23-2300/src/SimTracker/SiPhase2Digitizer/plugins/SSDigitizerAlgorithm.h:10:7: warning: 'class SSDigitizerAlgorithm' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/d36af6c2d5d322e52932978c6b2c4857/opt/cmssw/slc6_amd64_gcc700/cms/cmssw-patch/CMSSW_9_2_X_2017-05-23-2300/src/SimTracker/SiPhase2Digitizer/plugins/PSPDigitizerAlgorithm.h:10:7: warning: 'class PSPDigitizerAlgorithm' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]