-
Notifications
You must be signed in to change notification settings - Fork 1.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
Add a setting to disable --Wno-error=unknown with clang-format #10102
Comments
@sean-mcmanus #10072 Makes it impossible to use older versions (< 12) of clang-format, which don't have The default version of the I would therefore argue that the change from #10072 should not be published without an accompanying solution to this issue. |
Sure, that's even better than having to disable the flag manually. |
@saierd The clang-format version checking got added with 1.13.5 (pre-release, release candidate): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.13.5 . Let us know if you hit any issue with that. |
Hi @sean-mcmanus |
@NepEgor The issue is fixed for me -- we launch clang-format with the --version to get the version. It's possible that is failing for some unexpected reason. If you set C_Cpp.loggingLevel to the hidden value of "7" temporarily and then do the formatting you can see the raw command line that we run in the C/C++ logging. For clang-format 11 it should not show "--Wno-error=unknown". If you see that, then try adding "--version" to the path to the clang-format it is running to see if the result matches |
I have explored around for a bit more and found out that cpptools seem to not work with clang-format symlinks. I can invoke clang-format through a symling from cli without a problem. And changing path for cpptools to either of actual clang-formats works (The topic flag is not present in clang-format-11 call).
|
@NepEgor Yeah, can you open a new issue that describes the problem with clang-format symlinks? The /usr/bin/clang-format is usually a symlink, so I'm not aware of any issue with clang-format symlinks. |
@sean-mcmanus I had the same problem again and could find another condition for this to occur: VS Code has to be connected remotely via SSH, otherwise a symlink clang-format works as expected. I opened #12298 as requested. |
Follow up to #10072
Related to this would be surfacing the errors (other than a generic failure)...that could be tracked separately later if necessary.
The text was updated successfully, but these errors were encountered: