[llvm] [NFC][llvm][support] rename INFINITY in regcomp (PR #101758)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 15:00:23 PDT 2024
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 12e3a06cb7615fbd91031420f3dec2a85d7877d6 0f5f0bacd3ec4942af000f75b02c49fc8d0a19ce --extensions c -- llvm/lib/Support/regcomp.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/regcomp.c b/llvm/lib/Support/regcomp.c
index daa41eb491..9a30425c47 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/lib/Support/regcomp.c
@@ -582,8 +582,8 @@ p_ere_exp(struct parse *p)
count2 = p_count(p);
REQUIRE(count <= count2, REG_BADBR);
} else /* single number with comma */
- count2 = REGINFINITY;
- } else /* just a single number */
+ count2 = REGINFINITY;
+ } else /* just a single number */
count2 = count;
repeat(p, pos, count, count2);
if (!EAT('}')) { /* error heuristics */
@@ -753,8 +753,8 @@ p_simp_re(struct parse *p,
count2 = p_count(p);
REQUIRE(count <= count2, REG_BADBR);
} else /* single number with comma */
- count2 = REGINFINITY;
- } else /* just a single number */
+ count2 = REGINFINITY;
+ } else /* just a single number */
count2 = count;
repeat(p, pos, count, count2);
if (!EATTWO('\\', '}')) { /* error heuristics */
@@ -1115,8 +1115,8 @@ repeat(struct parse *p,
# define N 2
# define INF 3
# define REP(f, t) ((f)*8 + (t))
-# define MAP(n) (((n) <= 1) ? (n) : ((n) == REGINFINITY) ? INF : N)
- sopno copy;
+#define MAP(n) (((n) <= 1) ? (n) : ((n) == REGINFINITY) ? INF : N)
+ sopno copy;
if (p->error != 0) /* head off possible runaway recursion */
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/101758
More information about the llvm-commits
mailing list