[all-commits] [llvm/llvm-project] 6a4716: [clang-format] Support of TableGen value annotatio...

Hirofumi Nakamura via All-commits all-commits at lists.llvm.org
Mon Feb 12 06:27:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a471611a4b98396abb0680229aa0694ffe88a43
      https://github.com/llvm/llvm-project/commit/6a471611a4b98396abb0680229aa0694ffe88a43
  Author: Hirofumi Nakamura <k.nakamura.hirofumi at gmail.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    M clang/lib/Format/FormatToken.h
    M clang/lib/Format/FormatTokenLexer.cpp
    M clang/lib/Format/TokenAnnotator.cpp
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/TokenAnnotatorTest.cpp

  Log Message:
  -----------
  [clang-format] Support of TableGen value annotations. (#80299)

This implements the annotation of the values in TableGen.
The main changes are,

- parseTableGenValue(), the simplified parser method for the syntax of
values.
- modified consumeToken() to parseTableGenValue in 'if', 'assert' and
after '='.
- modified parseParens() to call parseTableGenValue inside.
- modified parseSquare() to to call parseTableGenValue inside, with
skipping separator tokens.
- modified parseAngle() to call parseTableGenValue inside, with skipping
separator tokens.




More information about the All-commits mailing list