History log of /llvm-project/clang/lib/Format/FormatTokenLexer.cpp (Results 1 – 25 of 119)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# fbef1f83 14-Jan-2025 sstwcw <su3e8a96kzlver@posteo.net>

[clang-format][NFC] Make formatting Verilog faster (#121139)

A regular expression was used in the lexing process. It made the program
take more than linear time with regards to the length of the in

[clang-format][NFC] Make formatting Verilog faster (#121139)

A regular expression was used in the lexing process. It made the program
take more than linear time with regards to the length of the input. It
looked like the entire buffer could be scanned for every token lexed.
Now the regular expression is replaced with code. Previously it took 20
minutes for the program to format 125 000 lines of code on my computer.
Now it takes 315 milliseconds.

show more ...


Revision tags: llvmorg-19.1.7
# 04610b90 05-Jan-2025 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Replace SmallVectorImpl with ArrayRef (#121621)


# 1a0d0ae2 02-Jan-2025 Owen Pan <owenpiano@gmail.com>

[clang-format] Add `VariableTemplates` option (#121318)

Closes #120148.


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3
# 786db636 24-Oct-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Add KeepFormFeed option (#113268)

Closes #113170.


Revision tags: llvmorg-19.1.2
# 688bc958 03-Oct-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Add TemplateNames option to help parse C++ angles (#109916)

Closes #109912.


Revision tags: llvmorg-19.1.1
# 7153a4bb 18-Sep-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Reimplement InsertNewlineAtEOF (#108513)

Fixes #108333.


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6
# 364f988d 14-May-2024 Owen Pan <owenpiano@gmail.com>

Reland "[clang-format] Fix FormatToken::isSimpleTypeSpecifier() (#91712)"

Remove FormatToken::isSimpleTypeSpecifier() and call
Token::isSimpleTypeSpecifier(LangOpts) instead.


# 1fadb2b0 13-May-2024 Owen Pan <owenpiano@gmail.com>

Revert "[clang-format] Fix FormatToken::isSimpleTypeSpecifier() (#91712)"

This reverts commits e62ce1f8842c, 5cd280433e8e, and de641e289269 due to
buildbot failures.


# e62ce1f8 11-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix FormatToken::isSimpleTypeSpecifier() (#91712)

Remove FormatToken::isSimpleTypeSpecifier() and call
Token::isSimpleTypeSpecifier(LangOpts) instead.


Revision tags: llvmorg-18.1.5, llvmorg-18.1.4
# 684f27d3 06-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Use `is` instead of `getType() ==`


Revision tags: llvmorg-18.1.3
# b2082a98 20-Mar-2024 Owen Pan <owenpiano@gmail.com>

Revert "[clang-format][NFC] Delete 100+ redundant #include lines in .cpp files"

This reverts commit b92d6dd704d789240685a336ad8b25a9f381b4cc. See
github.com/llvm/llvm-project/commit/b92d6dd704d7#com

Revert "[clang-format][NFC] Delete 100+ redundant #include lines in .cpp files"

This reverts commit b92d6dd704d789240685a336ad8b25a9f381b4cc. See
github.com/llvm/llvm-project/commit/b92d6dd704d7#commitcomment-139992444

We should use a tool like Visual Studio to clean up the headers.

show more ...


# 6f31cf51 20-Mar-2024 Owen Pan <owenpiano@gmail.com>

Revert "[clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)"

This reverts c3a1eb6207d8 (and the related commit f3c5278efa3b) which makes
cleanupAroundReplacements() no longer

Revert "[clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)"

This reverts c3a1eb6207d8 (and the related commit f3c5278efa3b) which makes
cleanupAroundReplacements() no longer thread-safe.

show more ...


Revision tags: llvmorg-18.1.2
# b92d6dd7 17-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Delete 100+ redundant #include lines in .cpp files


# c3a1eb62 15-Mar-2024 Owen Pan <owenpiano@gmail.com>

Reland [clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)

Initialize IsCpp in LeftRightQualifierAlignmentFixer ctor.


# b0d1e32c 15-Mar-2024 Mehdi Amini <joker.eph@gmail.com>

Revert "[clang-format][NFC] Eliminate the IsCpp parameter in all functions" (#85353)

Reverts llvm/llvm-project#84599

This broke the presubmit bot.


# 0c071029 15-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Eliminate the IsCpp parameter in all functions (#84599)


Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 61c83e94 14-Feb-2024 Owen Pan <owenpiano@gmail.com>

Revert "[clang-format][NFC] Make LangOpts global in namespace Format"

This reverts commit 32e65b0b8a743678974c7ca7913c1d6c41bb0772.

It seems to break some PowerPC bots.

See https://github.com/llvm

Revert "[clang-format][NFC] Make LangOpts global in namespace Format"

This reverts commit 32e65b0b8a743678974c7ca7913c1d6c41bb0772.

It seems to break some PowerPC bots.

See https://github.com/llvm/llvm-project/pull/81390#issuecomment-1941964803.

show more ...


# 6a471611 12-Feb-2024 Hirofumi Nakamura <k.nakamura.hirofumi@gmail.com>

[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 metho

[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.

show more ...


# 32e65b0b 12-Feb-2024 Owen Pan <owenpiano@gmail.com>

Reland "[clang-format][NFC] Make LangOpts global in namespace Format (#81390)"

Restore getFormattingLangOpts().


# 3dc8ef67 11-Feb-2024 Owen Pan <owenpiano@gmail.com>

Revert "[clang-format][NFC] Make LangOpts global in namespace Format (#81390)"

This reverts commit 03f571995b4f0c260254955afd16ec44d0764794.

We can't hide getFormattingLangOpts() as it's used by ot

Revert "[clang-format][NFC] Make LangOpts global in namespace Format (#81390)"

This reverts commit 03f571995b4f0c260254955afd16ec44d0764794.

We can't hide getFormattingLangOpts() as it's used by other tools.

show more ...


# 03f57199 11-Feb-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Make LangOpts global in namespace Format (#81390)


# 5609bd83 09-Feb-2024 Owen Pan <owenpiano@gmail.com>

Revert "[clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)"

This reverts commit 763139afc19ddf2e0f0265dc828ce8e5fbe92530.

It seems that LangOpts is not initialized before use.


# 763139af 09-Feb-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)

Now with a8279a8bc541, we can make the update.


Revision tags: llvmorg-18.1.0-rc2
# b67ce7e3 01-Feb-2024 Kazu Hirata <kazu@google.com>

[clang] Use StringRef::starts_with (NFC)


# 00582636 30-Jan-2024 Hirofumi Nakamura <k.nakamura.hirofumi@gmail.com>

[clang-format] Support of TableGen tokens with unary operator like form, bang operators and numeric literals. (#78996)

Adds the support for tokens that have forms like unary operators.
- bang opera

[clang-format] Support of TableGen tokens with unary operator like form, bang operators and numeric literals. (#78996)

Adds the support for tokens that have forms like unary operators.
- bang operators: `!name`
- cond operator: `!cond`
- numeric literals: `+1`, `-1`
cond operator are one of bang operators but is distinguished because it has very specific syntax.

show more ...


12345