[ci] use override keyword and build with Wsuggestoverride#18918
[ci] use override keyword and build with Wsuggestoverride#18918guitargeek merged 13 commits intoroot-project:masterfrom
Conversation
Test Results 19 files 19 suites 3d 10h 19m 27s ⏱️ Results for commit 6457831. ♻️ This comment has been updated with latest results. |
[ci] move to alma9 as warnings
[core] missing override in classdef [test] add proper override in rqobjecttester
fd42072 to
7833f3b
Compare
[net] tdavixfile apply override
|
There are 10 warnings remainings, but they cannot be easily solved, since we get: but if we fix it in the code, then we get an error due to a different pathway of template type overload (different base class): since IGradientFunctionMultiDimTempl implements a virtual Gradient function and DoDerivative function, but IBaseFunctionMultiDimTempl does not. This IBaseFunctionMultiDimTempl is called by Linkdef3.h, not sure if it can be commented out. |
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
@pcanal thanks for the feedback! Do you have a suggestion on how to deal with the 10 remaining warnings? |
|
If I understand correctly, this code snippet: https://godbolt.org/z/WWba5PqM5 is representing the dilemna where we would want to 'transform' In the case described in the code snippet, the 'only' solution I can think of is to clarify that it is expected (assuming it is indeed expected) that the base class may or may not include the [Alternatively the base class may be genuinely broken ... ] |
|
The error seen at https://github.com/root-project/root/pull/18918/checks?check_run_id=44076069569 is (likely) triggered by the change in the PR. |
Since override can not be consistently applied due to different base template parameters implementing or not the corresponding Gradient function
guitargeek
left a comment
There was a problem hiding this comment.
Thank you very much for doing this and also addressing the review comments! That's incredibly useful.
By the way, I have seem many bugs because people thought they were overriding a virtual function, but it was not virtual. Consistently using override gives you a compiler waning in these cases 👍
This Pull request:
Changes or fixes:
Fixes https://its.cern.ch/jira/browse/ROOT-8302
fyi @wlav