-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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] some clang-diagnostic checks are not available. #117264
Comments
clang-tidy does not allow you to enable Clang warnings which are not enabled by the build system:
Enabling the diagnostic in Clang will cause it to be displayed by clang-tidy: https://godbolt.org/z/WcrhWd8q7 Closing the issue as not a bug, but if you think this is incorrect, feel free to reopen with more information! |
Yeah, I know I can enable it with I have |
Huh, that could be a bug with VSCode?
Okay, something odd is going on then because I cannot reproduce that behavior. If the warning is enabled for your compile, clang-tidy should emit the warning. Can you provide a small reproducer that includes one source file and a compile_commands.json for it? Maybe I'm trying something different from what you're doing. Reopening the issue while we continue the discussion. |
Let me see if I can repro it with a simple example. I was attempting to make VSCode flag these as "problems" so it could (in theory) automatically fix them. I'm working on an old code base that had over 50 What I did get to work was using VSCode to fix over 200 |
Yeah, clang-tidy works if I pass it a
Must be a VSCode issue or maybe my It's kinda surprising that just enabling |
Possibly anything not included by
-Wextra
...The
clang-dianostic-strict-prototypes
check can't be enabled by llvm 19.1.4's clang-tidy. Explicitly enabling it withclang-dianostic-strict-prototypes
in a.clang-tidy
file doesn't work. Is there some way to enable this manually? Seems like a bug.This prevents VSCode from being able to auto-correct these issues.
The text was updated successfully, but these errors were encountered: