[PATCH] D33823: [clang-format] Support sorting using declarations

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 19 06:06:22 PDT 2017


krasimir added inline comments.


================
Comment at: lib/Format/UsingDeclarationsSorter.cpp:66
+  }
+  return HasIdentifier && Tok && Tok->isOneOf(tok::semi, tok::comma);
+}
----------------
Typz wrote:
> could also be followed by an assignment, in case of type alias:
> 
>   using foo = bar::foo;
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.



https://reviews.llvm.org/D33823





More information about the cfe-commits mailing list