https://bugs.llvm.org/show_bug.cgi?id=40046
Bug ID: 40046
Summary: clang-format fails formatting basic C++11 code
Product: clang
Version: 7.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Tooling
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
I evaluated clang-format with one of my projects. Evaluation failed due to
following problems
1. There is no way of adding missing empty lines (e.g. between function
definitions). There should be explicit options for mandatory empty lines.
2. I was not able to configure correct class indention (public: 3 spaces, class
members: 6 spaces, function definition: 3 spaces). There should be separate
options for indention of class members and function definitions.
3. Wrapping of constructor initialize lists fails as soon as
"BreakConstructorInitializers: AfterColon" is accompanied by a "ColumnLimit:
'160'". ColumnLimit seems to break BreakConstructorInitializers completely. See
also https://stackoverflow.com/q/53797967/1421332.
4. Wrapping of template specifications seems to work in one direction only. If
"template <typename T>" is in one line with the function, a line break is added
properly if required by "AlwaysBreakTemplateDeclarations: Yes". However when
having "template <typename T>" in a separate line, the line break is not
removed as required by "AlwaysBreakTemplateDeclarations: No".
Please fix these issues. clang-format is very promising. I am eager to evaluate
it again.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs