-
Notifications
You must be signed in to change notification settings - Fork 93
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
use override attribute for virtual functions #827
Comments
After coniguring the build in a build/ folder, with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON so that build/compile_commands.json exists. Then with clang-tidy like this:
see: https://www.kdab.com/clang-tidy-part-1-modernize-source-code-using-c11c14/ |
I tried this in a custom branch, see pull request number 23 (closed), it kind of worked well. The above command takes quite a while to run, unfortunately, due to the large codebase. Maybe you can select a few of the clang-tidy methods that you like and I can run them? Maybe also : It seems a few of them will break compatibinitly with the older compilers in the CD |
thanks @mahnen I think this is a great idea. I suppose the problem with #867 was:
I think doing this in stages would solve these problems though. It should be paired with creating some scripts for doing the cleaning, such that people can run it on a PR. We could even ultimately do that via git hooks once #724 is merged (although run-time might become a problem). Do you have a feel for a good order of doing this? |
I'll try with the minimum modernize-use-override and create a pull req. Lets see ;) |
sure. If possible, do the PR in commits: first commit to add a script (in Presumably running the script twice doesn't change anything anymore, so we can always run this after future merges. |
If we can find a volunteer to go and remove all work-arounds with |
pull request created, for your review #868 |
I'm picking this up now, as we've removed all (?) the work-arounds and macros for old compilers. I'm struggling with this sadly. Here's a list of steps that I tried, not in logical order...
Surely this isn't how it should be. I'm assuming this is because I'm making some mistakes in my installation, but I don't know which ones. I think a working summary could be
See #1367 |
Closed by #1367 |
C++-11 allows using the
override
attribute to prevent errors where inadvertently the wrong signature is used, see e.g. https://en.wikipedia.org/wiki/C%2B%2B11#Explicit_overrides_and_final#826 introduces this for the
BinNormalisation
hierarchy, but there are far more of course. It's unfortunately not obvious how to automate this.The text was updated successfully, but these errors were encountered: