[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 12 11:29:50 PDT 2025
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 ab22f652a4dfcaf5b6884a85e498d7ca077937ca ba82162bbc75ab6838f2c1aa0ad89cfe585a578f --extensions c,h,cpp -- clang/include/clang/Lex/LiteralSupport.h clang/lib/Lex/LiteralSupport.cpp clang/lib/Sema/SemaExpr.cpp clang/test/Lexer/ms-extensions.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp
index 8a2f181a15..69dc057d0d 100644
--- a/clang/lib/Lex/LiteralSupport.cpp
+++ b/clang/lib/Lex/LiteralSupport.cpp
@@ -1087,8 +1087,8 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling,
if (s + 2 < ThisTokEnd && s[2] == '6') { // i16 suffix
Bits = 16;
ToSkip = 3;
- } else if (s + 3 < ThisTokEnd &&
- s[2] == '2' && s[3] == '8') { // i128 suffix
+ } else if (s + 3 < ThisTokEnd && s[2] == '2' &&
+ s[3] == '8') { // i128 suffix
Bits = 128;
ToSkip = 4;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/130993
More information about the cfe-commits
mailing list