[llvm] [NFC][ADT/Support] Add {} for else when if body has {} (PR #140758)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 20 09:35:17 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 HEAD~1 HEAD --extensions c,h,cpp,inc -- llvm/include/llvm/ADT/IntervalMap.h llvm/include/llvm/ADT/STLExtras.h llvm/include/llvm/ADT/SmallBitVector.h llvm/include/llvm/ADT/Twine.h llvm/include/llvm/Support/Error.h llvm/include/llvm/Support/GenericLoopInfoImpl.h llvm/include/llvm/Support/GraphWriter.h llvm/include/llvm/Support/YAMLParser.h llvm/lib/Support/APFixedPoint.cpp llvm/lib/Support/APFloat.cpp llvm/lib/Support/APInt.cpp llvm/lib/Support/CommandLine.cpp llvm/lib/Support/Mustache.cpp llvm/lib/Support/PrettyStackTrace.cpp llvm/lib/Support/ScaledNumber.cpp llvm/lib/Support/Unix/Path.inc llvm/lib/Support/Windows/Path.inc llvm/lib/Support/YAMLParser.cpp llvm/lib/Support/regcomp.c llvm/utils/TableGen/AsmMatcherEmitter.cpp llvm/utils/TableGen/CodeEmitterGen.cpp llvm/utils/TableGen/Common/AsmWriterInst.cpp llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp llvm/utils/TableGen/Common/CodeGenDAGPatterns.h llvm/utils/TableGen/Common/CodeGenInstruction.cpp llvm/utils/TableGen/Common/CodeGenInstruction.h llvm/utils/TableGen/Common/DAGISelMatcher.h llvm/utils/TableGen/DAGISelMatcherGen.cpp llvm/utils/TableGen/DecoderEmitter.cpp llvm/utils/TableGen/GlobalISelEmitter.cpp
``````````
</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 ab0b581c6..5b7b8fd95 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/lib/Support/regcomp.c
@@ -316,7 +316,7 @@ llvm_regcomp(llvm_regex_t *preg, const char *pattern, int cflags)
}
/* do the mallocs early so failure handling is easy */
- g = (struct re_guts *)malloc(sizeof(struct re_guts) +
+ g = (struct re_guts *)malloc(sizeof(struct re_guts) +
(NC-1)*sizeof(cat_t));
if (g == NULL)
return(REG_ESPACE);
@@ -733,7 +733,7 @@ p_simp_re(struct parse *p,
SETERROR(REG_ESUBREG);
}
p->g->backrefs = 1;
- break;
+ break;
case '*':
REQUIRE(starordinary, REG_BADRPT);
LLVM_FALLTHROUGH;
``````````
</details>
https://github.com/llvm/llvm-project/pull/140758
More information about the llvm-commits
mailing list