-
Notifications
You must be signed in to change notification settings - Fork 186
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
Look into using clang-tidy #548
Comments
I'd be happy to do a first pass at this and report back. One of my side hobbies it tinkering with clang-tidy and have some experience with the checks that verify correct uses of |
Note that on modern versions of clang std::forward/move now get translated to intrinsics which shouldn’t have the same template instantiation overhead. |
Ok, these two checks are of interest (both of which would appear in the next LLVM release version 17). Both help identify all cases where functions do not use
Both checks are expecting code to always use the "named cast" using
If you'd like, I can do a first pass to fix the parameters that use C-cast instead of |
Those look awesome, @ccotter. A first pass would be most welcome. Do you know anything about running |
Unfortunately I'm not familiar with GitHub CI specifically. Googling around shows there's https://github.com/marketplace/actions/clang-tidy-review. What's needed generally to run |
Just to confirm, should I also look at migrating |
Yes, please! We're having a discussion on #552 about what to do when forwarding not-really-forwarding-references, which I think makes this issue nuanced, but, for clear cases of moves and forwards, I think we should standardize on |
Oh, and that |
@ccotter suggested on PR #545 that
clang-tidy
might be able to catch the bugs we've seen with incorrect forwards, perhaps at the expense of usingstd::forward
. Automated bug-catching is nice, and probably worth some amount of build speed degradation so we should look into someclang-tidy
CI.The text was updated successfully, but these errors were encountered: