FS#66830 - Qt Creator's clang-format plugin needs patch applied to Clang's libFormat
Attached to Project:
Arch Linux
Opened by Ruben Van Boxem (rubenvb) - Friday, 29 May 2020, 16:37 GMT
Last edited by Antonio Rojas (arojas) - Friday, 29 May 2020, 20:27 GMT
Opened by Ruben Van Boxem (rubenvb) - Friday, 29 May 2020, 16:37 GMT
Last edited by Antonio Rojas (arojas) - Friday, 29 May 2020, 20:27 GMT
|
Details
Description:
Qt Creator ships with Clang-format support. They require it to have a patch as detailed in the readme (search for "clang-format"): https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md Basically, it's a patch for Clang's libFormat to accept a flag for keeping line breaks in certain scenario's that Qt Creator developers deem necessary: https://code.qt.io/cgit/clang/clang.git/commit/?h=release_80-based&id=fa1b9053729ec6a4425a44ec5502dd388928274a The LLVM code review of the patch isn't very positive though in the sense that this will probably never make it upstream in this form: https://reviews.llvm.org/D53072 Besides applying this patch to the clang package proper (which probably goes against Arch Linux policies), there is the option to build libFormat (is it possible to only build this single library? Hopefully statically?) with that patch which can then be linked into the clang-format plugin and packages alongside Qt Creator. I'm not sure how easy this is given Qt Creator's build system (I'm guessing it will just be a matter of building+installing the patched libFormat and pointing the linker to it before the system's version. Additional info: * qtcreator-4.12.1-1 * clang-10.0.0-3 Steps to reproduce: 1. In Qt Creator, go to Help->About Plugins and enable the clang-format plugin. 2. Restart Qt Creator to be greeted with the message "Plugin initialization failed: Disabling ClangFormat plugin as it has not been built against a modified Clang's libFormat.For more information see the Qt Creator README at https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md |
This task depends upon
Closed by Antonio Rojas (arojas)
Friday, 29 May 2020, 20:27 GMT
Reason for closing: Duplicate
Additional comments about closing: FS#43718
FS#43748
Friday, 29 May 2020, 20:27 GMT
Reason for closing: Duplicate
Additional comments about closing:
Comment by Antonio Rojas (arojas) -
Friday, 29 May 2020, 20:27 GMT
We are not going to ship a modified clang, sorry. This should be
sorted out upstream. If you really need this plugin you should use
the binary version of qtcreator.