Hi guys,
Is the current setting of AlwaysBreakTemplateDeclarations: false
for LLVMStyle intentional? What was the rationale?
Some rough counts on the LLVM codebase:
same-line:
$ git grep -E ‘template.(class|struct).{’ – ‘.h’ '.cpp’ | wc -l
214
(most of them are tiny traits classes, like isPodLike or DenseMapInfo)
not-same-line:
$ git grep -A1 -h ‘template’ – ‘.h’ '.cpp’ | egrep ‘^\s*(class|struct).*{’ | wc -l
622
Recently, when using clang-format I’ve had to manually go back and change cases where clang-format does not put the template <...>
on its own line. I know that I could write a local .clang-format for this, but I think it should be in the LLVMStyle to begin with (barring this choice being intentional and having a reasonable rationale).
– Sean Silva