This patch adds UsingDeclarationsSorter, a TokenAnalyzer that sorts consecutive
using declarations.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Format/UsingDeclarationsSorter.cpp | ||
---|---|---|
66 ↗ | (On Diff #101188) | could also be followed by an assignment, in case of type alias: using foo = bar::foo; |
lib/Format/UsingDeclarationsSorter.cpp | ||
---|---|---|
41–42 ↗ | (On Diff #101188) | Use either:
|
59 ↗ | (On Diff #101188) | I'd invert this if - the happy case is in the if here. That way, you also don't need a continue. |
Comment Actions
- Update test case
lib/Format/UsingDeclarationsSorter.cpp | ||
---|---|---|
66 ↗ | (On Diff #101188) | Type aliases are in general not safe to permute, as in: struct C { struct B { struct A; }; }; using B = C::B; using A = B::A; Adding a test specifically for this. |