[clang] [clang-format] Fix crash in TokenAnnotator (PR #82349)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 20 22:20:29 PST 2024


================
@@ -13503,6 +13503,9 @@ TEST_F(FormatTest, IncorrectCodeUnbalancedBraces) {
   verifyFormat("{");
   verifyFormat("#})");
   verifyNoCrash("(/**/[:!] ?[).");
+  verifyNoCrash("struct X{"
+                "  operator iunt("
----------------
owenca wrote:

```suggestion
  verifyNoCrash("struct X {\n"
                "  operator iunt(\n"
```

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


More information about the cfe-commits mailing list