https://bugs.llvm.org/show_bug.cgi?id=42167

            Bug ID: 42167
           Summary: Clang-format Add Option to Suppress Break of Template
                    Declaration with Empty Parameter List
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: matthias.schae...@versasec.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

Though it is useful to break template declarations in general with the
AlwaysBreakTemplateDeclarations setting, it might not always be as useful to
break template declarations which have an empty parameter list, which is
usually the case for function template specializations, as partial
specializations as not allowed for function templates. For the sake of
completeness, it should also be possible to suppress breaking all other
template declarations which have an empty parameter list.

I propose to add a new setting SuppressEmptyTemplateDeclarationsBreak with the
options:
- Never, the default value and all breaking is done according to the
AlwaysBreakTemplateDeclarations setting,
- Functions, only breaks of empty function template declarations are suppressed
and all non-empty function template declarations and all non-function template
declarations are performed according to the AlwaysBreakTemplateDeclarations
setting, and
- Always, breaks of all empty template declarations are suppressed, non-empty
template declarations are performed according to the
AlwaysBreakTemplateDeclarations setting.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to