ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

Fix warnings found by -Wsuggest-override

Open knutpett opened this issue 2 years ago • 8 comments

There are many, many files with this warning. Will update this PR several times, work in progress.

knutpett avatar Aug 30 '22 09:08 knutpett

It should be virtual or override but not both

jwillemsen avatar Aug 30 '22 09:08 jwillemsen

Make sure you update all operations that are overridden in a class, when you forget some the newer clang versions will give a lot of warnings

jwillemsen avatar Aug 30 '22 09:08 jwillemsen

Removing virtual could mean you have to change the indent of multiple lines when the declaration is using multiple lines, all together a lot of work for a simple change

jwillemsen avatar Aug 30 '22 11:08 jwillemsen

Removing virtual could mean you have to change the indent of multiple lines when the declaration is using multiple lines, all together a lot of work for a simple change

It involves quite a lot of files. Would it be better to review and handle if I split this into 2-3 PRs? One for ACE, one for TAO etc...?

If i chose to do, can I just split locally and just force push the new commits?

knutpett avatar Aug 30 '22 14:08 knutpett

Don't use force push, that makes it impossible for us to see what changed each time and also means we have to review everything again and again

jwillemsen avatar Aug 31 '22 06:08 jwillemsen

Now this one has a huge number of merge conflicts

jwillemsen avatar Sep 14 '22 07:09 jwillemsen

Still not finished. Trying to fix even more

knutpett avatar Sep 23 '22 13:09 knutpett

Looks also the code generated by TAO_IDL needs to be updated, see for example a clang build log, a huge number of warnings given now

jwillemsen avatar Sep 30 '22 13:09 jwillemsen

Looks also the code generated by TAO_IDL needs to be updated, see for example a clang build log, a huge number of warnings given now

Are the warnings introduced by my change, or did they exist before?

I'm working on fixing TAO_IDL as well. It takes some time to fix since I use a lot of time figuring out which visitors are used to generate the code with the warnings. And it takes time to test. A lot of back and forth because I end up with adding override to something that should etc, etc.

Do you prefer that we fix everything in this PR, or could we do this incrementally?

knutpett avatar Oct 14 '22 10:10 knutpett

I think the warnings are there because of the changes, at the moment you use override for some operations in a class clang gives a warning that you should do all.

We could do this incrementally, but we shouldn't have an increase of warnings which could be impossible, the challenge is that we want to have master always in a state that we can release when needed, not that we have to wait a long time before we are back to the same level.

jwillemsen avatar Oct 14 '22 10:10 jwillemsen

Closing, lot of merge conflicts due to changes on master

jwillemsen avatar Feb 23 '23 08:02 jwillemsen