================
@@ -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();
----------------
owenca wrote:
I will replace `getPreviousNonComment()` with `Previous` for simplicity and 
better performance as we really don't need to be concerned about code like 
`::/**/std/**/::/**/int64_t`.

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