https://bugs.llvm.org/show_bug.cgi?id=48438
Bug ID: 48438
Summary: clang-format confused with class template parametrized
by enums
Product: clang
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: mateuszalewi...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
Following code is strangely formatted in clang-format 8, 10, 11 (from Ubuntu
repo) with llvm style:
```
template <enum AAAA aaa, BBBB bbb, enum CCC ccc>
class DDD : public EEE, public FFFF {
public : static constexpr GGG ggg = ccc; static constexpr HHH hhh = ggg;
}
}
;
}
```
Removing `enum` from `enum CCC` gives much better output:
```
template <enum AAAA aaa, BBBB bbb, CCC ccc>
class DDD : public EEE, public FFFF {
public:
static constexpr GGG ggg = ccc;
static constexpr HHH hhh = ggg;
}
}
;
}
```
Though `;` in separate line still looks strange.
Possibly related to https://bugs.llvm.org/show_bug.cgi?id=48305
Both originate in my project, both have problems with mismatching parentheses
and both are worked-around by removing something. I concede this may be
far-fetched connection.
--
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