[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1995d4424505: [clang-format] Enable FormatTokenSource to insert tokens. (authored by klimek). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.h:287 // owned outside of and handed into the UnwrappedLineParser. + // FIXME: The above fixme doesn't work if we need to create tokens while + // parsing. sammccall wrote: > I'm

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 497637. klimek marked an inline comment as done. klimek added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143070/new/ https://reviews.llvm.org/D143070 Files: clang/lib/Fo

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Format/FormatTokenSource.h:74 public: - IndexedTokenSource(ArrayRef Tokens) + IndexedTokenSource(SmallVectorImpl &Tokens) : Tokens(T

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 497416. klimek added a comment. Undo changes to ownership of initial set of FormatTokens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143070/new/ https://reviews.llvm.org/D143070 Files: clang/lib/Format/For

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/lib/Format/FormatTokenSource.h:74 public: - IndexedTokenSource(ArrayRef Tokens) + IndexedTokenSource(SmallVectorImpl &Tokens) : Tokens(Tokens), Position(-1) {} sammccall wrote: > As I understand it, this p

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-14 Thread Manuel Klimek via Phabricator via cfe-commits
klimek updated this revision to Diff 497415. klimek marked 3 inline comments as done. klimek added a comment. Address reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143070/new/ https://reviews.llvm.org/D143070 Files: clang/lib/

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Only serious concern is `getPreviousToken()`. Comment at: clang/lib/Format/FormatTokenSource.h:74 public: - IndexedTokenSource(ArrayRef Tokens) + IndexedTokenSource(SmallVectorImpl &Tokens) : Tokens(Tokens), Position(-1) {}

[PATCH] D143070: [clang-format] Enable FormatTokenSource to insert tokens.

2023-02-01 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: sammccall. Herald added a project: All. klimek requested review of this revision. Herald added a project: clang. In preparation for configured macro replacements in formatting, add the ability to insert tokens to FormatTokenSource, and impleme