[clang] Perf/lexer faster slow get char and size (PR #70543)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 29 00:01:50 PDT 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff e00d32afb9d33a1eca48e2b041c9688436706c5b a20790e9e87d2ede14605b277184d2b8c5b0979f -- clang/include/clang/Lex/Lexer.h clang/lib/Lex/DependencyDirectivesScanner.cpp clang/lib/Lex/Lexer.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 26c7755fb6fd..1c5399752773 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -2092,7 +2092,8 @@ const char *Lexer::LexUDSuffix(Token &Result, const char *CurPtr,
unsigned Consumed = Size;
unsigned Chars = 1;
while (true) {
- auto [Next, NextSize] = getCharAndSizeNoWarn(CurPtr + Consumed, LangOpts);
+ auto [Next, NextSize] =
+ getCharAndSizeNoWarn(CurPtr + Consumed, LangOpts);
if (!isAsciiIdentifierContinue(Next)) {
// End of suffix. Check whether this is on the allowed list.
const StringRef CompleteSuffix(Buffer, Chars);
``````````
</details>
https://github.com/llvm/llvm-project/pull/70543
More information about the cfe-commits
mailing list