[clang] [clang-format] Prevent re-assigning type on finalized tokens (PR #210763)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 26 12:52:58 PDT 2026


https://github.com/HazardyKnusperkeks commented:

Also add a test:
```
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -22562,6 +22562,7 @@ TEST_F(FormatTest, DoNotCrashOnInvalidInput) {
   verifyNoCrash("[[ [a] ]]");
   verifyNoCrash(
       "#xxxx??x<xxxxxxx||??x<xxxxxxx and xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
+  verifyNoCrash("a &alias & =");
 }
```

Next time please also comment on the issue that you want to take it.

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


More information about the cfe-commits mailing list