[clang] [FMV] Allow target version definitions in any order. (PR #83887)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 4 10:38:25 PST 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 bd7bce2c8465e9cb36a823846a52c9f553502575 5a717769aa20dfbbaa8edd4bcd3048ebedee20a2 -- clang/lib/Sema/SemaDecl.cpp clang/test/CodeGen/attr-target-version.c clang/test/Sema/attr-target-version.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 81c5a11c58..bd3235ea7e 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -11436,8 +11436,8 @@ static bool CheckTargetCausesMultiVersioning(Sema &S, FunctionDecl *OldFD,
// corresponding attribute to it.
if (OldFD->getMultiVersionKind() == MultiVersionKind::None &&
NewFD->getMultiVersionKind() == MultiVersionKind::TargetVersion)
- OldFD->addAttr(TargetVersionAttr::CreateImplicit(
- S.Context, "default", OldFD->getSourceRange()));
+ OldFD->addAttr(TargetVersionAttr::CreateImplicit(S.Context, "default",
+ OldFD->getSourceRange()));
const auto *NewTA = NewFD->getAttr<TargetAttr>();
const auto *NewTVA = NewFD->getAttr<TargetVersionAttr>();
``````````
</details>
https://github.com/llvm/llvm-project/pull/83887
More information about the cfe-commits
mailing list