[clang] [clang][sema] Fix -Wunused-function on target_version'd file-scope Fn's (PR #81167)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 8 10:21:48 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 ff8c865838b46d0202963b816fbed50aaf96a7f4 96e3020eaa69f7f14b67617a250df3041cc1996b -- clang/include/clang/AST/Decl.h clang/lib/AST/Decl.cpp clang/lib/Sema/Sema.cpp clang/test/SemaCXX/warn-unused-filescoped.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 58cbcc30e0..cfb653e665 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1393,7 +1393,8 @@ void Sema::ActOnEndOfTranslationUnit() {
Diag(DiagD->getLocation(), diag::warn_unneeded_internal_decl)
<< /*function=*/0 << DiagD << DiagRange;
}
- } else if (!FD->isTargetMultiVersion() || FD->isTargetMultiVersionDefault()) {
+ } else if (!FD->isTargetMultiVersion() ||
+ FD->isTargetMultiVersionDefault()) {
if (FD->getDescribedFunctionTemplate())
Diag(DiagD->getLocation(), diag::warn_unused_template)
<< /*function=*/0 << DiagD << DiagRange;
``````````
</details>
https://github.com/llvm/llvm-project/pull/81167
More information about the cfe-commits
mailing list