-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
clang-tidy check misc-unused-using-decls
appears to be quite slow
#72300
Comments
@firewave Our team saw the same issue with our project (so we disabled that check in certain scenarios). |
That's on LLVM 17/18 ? Based on how this check is implemented, yes it can be slow & buggy. I will see what I can do. |
@PiotrZSL I used clang-tidy 17.0.2. |
My numbers are from LLVM 18. |
Looks like this was fixed by #78231. CC @HerrCai0907 |
I am still seeing this:
I am using the binaries from
It looks like it is the wrong version but |
800ms for a clang-tidy check is not much, depend on file size. |
You sure? If you would have 100 of such checks a single file would take 80000ms. But we digress. The percentage still matches what I reported in the initial report. And it is still one of the slowest checks.
|
Lot of code, lot of using directives. This check need to be re-written to use RecursiveASTMatcher like bugprone-reserved-identifier were. misc-unused-using-decls would also benefit from ignoring system headers, and there were WIP change for that, but it stuck as amount of reviewers is ... small. From "priority" point of view there are other changes like https://reviews.llvm.org/D150126 that would bring bigger improvements over all checks, not only this one. And other issues. When your points are valid, I just don't think that anyone will spend time on this in near time, unless issue can be reproduced on some bigger files where this check would take more than ~20s, otherwise that's just a noise caused by simply cost of an AST processing. |
Possibly improved by #123454. |
The
misc-unused-using-decls
check constantly comes up as one of the top 3 expensive checks in our code base (it usually takes about 5% of the total time). Considering it is not providing that much in terms of its findings compared to other checks it seems a bit excessive.The text was updated successfully, but these errors were encountered: