[libc-commits] [libc] [libc] Add regex AST and ExprPool (PR #198728)

via libc-commits libc-commits at lists.llvm.org
Fri May 22 10:27:32 PDT 2026


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 origin/main HEAD --extensions cpp,h -- libc/src/__support/regex/regex_ast.h libc/src/__support/regex/regex_expr_pool.cpp libc/src/__support/regex/regex_expr_pool.h libc/test/src/__support/regex/expr_test.cpp libc/hdr/regex_macros.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/test/src/__support/regex/expr_test.cpp b/libc/test/src/__support/regex/expr_test.cpp
index efaf7f4fd..48349851a 100644
--- a/libc/test/src/__support/regex/expr_test.cpp
+++ b/libc/test/src/__support/regex/expr_test.cpp
@@ -6,14 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "src/__support/regex/regex_expr_pool.h"
-#include "src/__support/regex/regex_ast.h"
 #include "hdr/regex_macros.h"
+#include "src/__support/regex/regex_ast.h"
+#include "src/__support/regex/regex_expr_pool.h"
 #include "test/UnitTest/Test.h"
 
 using LIBC_NAMESPACE::Expr;
-using LIBC_NAMESPACE::ExprPool;
 using LIBC_NAMESPACE::ExprKind;
+using LIBC_NAMESPACE::ExprPool;
 
 TEST(LlvmLibcRegexExprTest, Interning) {
   ExprPool pool;
@@ -69,9 +69,9 @@ TEST(LlvmLibcRegexExprTest, MemoryLimits) {
   ExprPool pool;
   // MAX_NODES is 10000. Let's try to exceed it.
   // We can't easily create 10001 unique literals, so we can use composites.
-  // Actually, make_lit('a') + i might work if we have enough chars? 
+  // Actually, make_lit('a') + i might work if we have enough chars?
   // Wait, there are only 256 chars.
-  
+
   // We can create unique concatenations.
   auto lit_a = pool.make_lit('a').value();
   auto current = lit_a;

``````````

</details>


https://github.com/llvm/llvm-project/pull/198728


More information about the libc-commits mailing list