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

            Bug ID: 49402
           Summary: clang-format formats template template parameters
                    inconsistently for Mozilla/Chromium style
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: dch...@google.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org

Input:

  $ cat test.cc 
  template <template <typename> class A,
            template <typename> class B,
            typename C,
            typename D>
  struct TemplatedClass {};

Output for Mozilla style:

  $ clang-format --style=Mozilla test.cc
  template<template<typename> class A,
           template<typename>
           class B,
           typename C,
           typename D>
  struct TemplatedClass
  {};

Output for Chromium style:

  $ clang-format --style=Chromium test.cc
  template <template <typename> class A,
            template <typename>
            class B,
            typename C,
            typename D>
  struct TemplatedClass {};

One might have expected "template <typename>" and "class B" to be on the same
line, as is the case with the first template template parameter.

-- 
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