[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

Hirofumi Nakamura via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 1 07:13:07 PST 2024


================
@@ -816,7 +816,7 @@ void FormatTokenLexer::handleTableGenMultilineString() {
   auto CloseOffset = Lex->getBuffer().find("}]", OpenOffset);
   if (CloseOffset == StringRef::npos)
     return;
-  auto Text = Lex->getBuffer().substr(OpenOffset, CloseOffset + 2);
+  auto Text = Lex->getBuffer().substr(OpenOffset, CloseOffset - OpenOffset + 2);
----------------
hnakamura5 wrote:

This is actually a bug fix of https://github.com/llvm/llvm-project/pull/78032. I need this to run tests. If requested, I will split this change into single pull request.

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


More information about the cfe-commits mailing list