================
@@ -412,6 +414,15 @@ const FormatToken 
*LeftRightQualifierAlignmentFixer::analyzeLeft(
   // The case `const long long volatile int` -> `const volatile long long int`
   // The case `long volatile long int const` -> `const volatile long long int`
   if (TypeToken->isTypeName(LangOpts)) {
+    for (const auto *Prev = TypeToken->getPreviousNonComment();
+         Prev && Prev->is(tok::coloncolon);
+         Prev = Prev->getPreviousNonComment()) {
+      TypeToken = Prev;
+      Prev = Prev->getPreviousNonComment();
+      if (!(Prev && Prev->is(tok::identifier)))
----------------
HazardyKnusperkeks wrote:

```suggestion
      if (!Prev || Prev->isNot(tok::identifier))
```
I personally don't like negated parenthesis.

https://github.com/llvm/llvm-project/pull/125327
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to