[clang] [clang-format] Improve annotating star and amp (PR #194190)

via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 25 17:09:14 PDT 2026


owenca wrote:

Can we do the following instead?
```diff
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/lib/Format/UnwrappedLineParser.cpp
@@ -2741,6 +2741,7 @@ bool UnwrappedLineParser::parseParens(TokenType AmpAmpTokenType,
     case tok::kw_requires:
       parseRequiresExpression();
       break;
+    case tok::amp:
     case tok::ampamp:
       if (AmpAmpTokenType != TT_Unknown)
         FormatTok->setFinalizedType(AmpAmpTokenType);
```

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


More information about the cfe-commits mailing list