[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-28 Thread Dawid Jurczak 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 rGa64d3c602fb7: [NFC][Lexer] Make Lexer::LangOpts const reference (authored by yurai007). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-28 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added a comment. All comments were addressed. Since broken libarcher/libomp/libomptarget UT are seen on others patches too I think it has nothing to do with this particular change. There is no speed degradation in comparison to LangOptionsBase approach so I believe now change is mature

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-28 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 updated this revision to Diff 411770. yurai007 edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120334/new/ https://reviews.llvm.org/D120334 Files: clang/include/clang/Lex/Lexer.h clang/lib/Format/Forma

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-25 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added inline comments. Comment at: clang/include/clang/Lex/Lexer.h:94 + // LangOpts enabled by this language. + const LangOptions &LangOpts; + cor3ntin wrote: > Should we add a comment to explain why this is a reference? Good idea. It will be added.

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-25 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added a comment. In D120334#3340639 , @cor3ntin wrote: > I like this approach. it seems a lot easier to maintain as people don't have > to remember to use LangOptionsBase to not degrade performance I like it either but we need to be careful abo

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-25 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added a comment. Unfortunately after change there is lifetime issue in FormatTokenLexer because LangOpts received from getFormattingLangOpts has automatic storage duration and Lexer gets reference to it. Fix issue and poke CI to make sure clang-tools-extra tests on CI are passing. For

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-25 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 updated this revision to Diff 411368. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120334/new/ https://reviews.llvm.org/D120334 Files: clang/include/clang/Lex/Lexer.h clang/lib/Format/FormatTokenLexer.cpp clang/lib/Format/FormatToken

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. LGTM too if the performance remains the same as with the original revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120334/new/ https://reviews.llvm.org/D120334 _

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-24 Thread Nikita Popov via Phabricator via cfe-commits
nikic accepted this revision. nikic added a comment. This revision is now accepted and ready to land. Looks reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120334/new/ https://reviews.llvm.org/D120334 __

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. I like this approach. it seems a lot easier to maintain as people don't have to remember to use LangOptionsBase to not degrade performance Comment at: clang/include/clang/Lex/Lexer.h:94 + // LangOpts enabled by this language. + const LangOptions &La

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-23 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added a comment. Use simpler approach with const LangOptions reference + rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120334/new/ https://reviews.llvm.org/D120334 ___ cfe-commits mailin

[PATCH] D120334: [NFC][Lexer] Make Lexer::LangOpts const reference

2022-02-23 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 updated this revision to Diff 410801. yurai007 retitled this revision from "[NFC][Lexer] Use more appropriate LangOptionsBase type for Lexer::LangOpts" to "[NFC][Lexer] Make Lexer::LangOpts const reference". yurai007 edited the summary of this revision. Repository: rG LLVM Github Mono