[llvm] [Option] Mark getLastArg(NoClaim) as noinline. (PR #157163)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 12:08:07 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 origin/main HEAD --extensions h -- llvm/include/llvm/Option/ArgList.h
``````````
: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/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h
index 1d3166330..3e8057435 100644
--- a/llvm/include/llvm/Option/ArgList.h
+++ b/llvm/include/llvm/Option/ArgList.h
@@ -253,8 +253,8 @@ public:
}
/// Return the last argument matching \p Id, or null.
- template<typename ...OptSpecifiers>
- LLVM_ATTRIBUTE_NOINLINE Arg * getLastArg(OptSpecifiers ...Ids) const {
+ template <typename... OptSpecifiers>
+ LLVM_ATTRIBUTE_NOINLINE Arg *getLastArg(OptSpecifiers... Ids) const {
Arg *Res = nullptr;
for (Arg *A : filtered(Ids...)) {
Res = A;
@@ -265,8 +265,8 @@ public:
/// Return the last argument matching \p Id, or null. Do not "claim" the
/// option (don't mark it as having been used).
- template<typename ...OptSpecifiers>
- LLVM_ATTRIBUTE_NOINLINE Arg * getLastArgNoClaim(OptSpecifiers ...Ids) const {
+ template <typename... OptSpecifiers>
+ LLVM_ATTRIBUTE_NOINLINE Arg *getLastArgNoClaim(OptSpecifiers... Ids) const {
for (Arg *A : filtered_reverse(Ids...))
return A;
return nullptr;
``````````
</details>
https://github.com/llvm/llvm-project/pull/157163
More information about the llvm-commits
mailing list