[clang] [clang-format] Handle common C++ non-keyword types as such (PR #83709)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 23:39:31 PST 2024


================
@@ -268,20 +268,24 @@ const FormatToken *LeftRightQualifierAlignmentFixer::analyzeRight(
   if (isPossibleMacro(TypeToken))
     return Tok;
 
+  const bool IsCpp = Style.isCpp();
+
   // The case `const long long int volatile` -> `long long int const volatile`
   // The case `long const long int volatile` -> `long long int const volatile`
   // The case `long long volatile int const` -> `long long int const volatile`
   // The case `const long long volatile int` -> `long long int const volatile`
-  if (TypeToken->isSimpleTypeSpecifier()) {
+  if (TypeToken->isTypeName(IsCpp)) {
----------------
mydeveloperday wrote:

Thanks fine, we'll live with it..

https://github.com/llvm/llvm-project/pull/83709


More information about the cfe-commits mailing list