[llvm-bugs] [Bug 49402] New: clang-format formats template template parameters inconsistently for Mozilla/Chromium style
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 2 17:24:02 PST 2021
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: unassignedclangbugs at nondot.org
Reporter: dcheng at google.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210303/234bd5d6/attachment.html>
More information about the llvm-bugs
mailing list