Skip to content
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

Upgrade Clang Format Version to 9 or 10. #4772

Closed
dnwillia-work opened this issue Dec 19, 2019 · 5 comments
Closed

Upgrade Clang Format Version to 9 or 10. #4772

dnwillia-work opened this issue Dec 19, 2019 · 5 comments

Comments

@dnwillia-work
Copy link

dnwillia-work commented Dec 19, 2019

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10 and Linux CentOS 7.4
  • VS Code Version: 1.41.0
  • C/C++ Extension Version: 0.26.3-insiders2

clang-format seems to be version 6, can this be upgraded please?

To Reproduce

Just introduce a setting into the .clang-format file that is supported by version 9 or 10. eg:

AllowShortIfStatementsOnASingleLine: Always

formatting will fail....

@lclancey
Copy link

On my computer (Windows10, Extension Version: 0.26.2), it's clang-format V6.0 . You can find it here ${Users}${User}.vscode\extensions\ms-vscode.cpptools-0.26.2\LLVM\bin\clang-format.exe

You can install the clang-format version you like, and set the path in "setting"."C_Cpp.clang_format_path". That may solve your problem.

@mnme
Copy link

mnme commented Dec 20, 2019

I would also appreciate an upgrade of the clang-format version on Windows because I can't use BasedOnStyle: Microsoft with clang-format version 6. This option was added in clang-format 9. I'm now using the workaround @qianyeLC proposed: I installed clang 9 and set C_Cpp.clang_format_path accordingly.

@dnwillia-work
Copy link
Author

dnwillia-work commented Dec 20, 2019

If it's version 6 then seems like time for an upgrade! I realize I can install a newer clang and point vs code at it but would be awesome if a newer version came out of the box. The thing is that if you work in a team that everyone is using vs code, and you want to maintain a particular code formatting standard, then we all need to use the same clang-format version. It's much easier to manage this situation if it's included already.

@sean-mcmanus
Copy link
Contributor

We're tracking it with #2887 .

@sean-mcmanus
Copy link
Contributor

Our Insider release ships with clang 9.0.1: https://github.com/microsoft/vscode-cpptools/releases/tag/0.27.0-insiders

@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants