[flang-commits] [flang] [flang][cuda] Emit error when a device actual argument is used in host intrinsic (PR #174025)

via flang-commits flang-commits at lists.llvm.org
Tue Dec 30 13:52:20 PST 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 cpp -- flang/lib/Semantics/check-call.cpp flang/lib/Semantics/resolve-names.cpp --diff_from_common_commit
``````````

: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/flang/lib/Semantics/check-call.cpp b/flang/lib/Semantics/check-call.cpp
index 46cc35fcb..707ad8af2 100644
--- a/flang/lib/Semantics/check-call.cpp
+++ b/flang/lib/Semantics/check-call.cpp
@@ -347,8 +347,8 @@ static const llvm::StringSet<> cudaSkippedIntrinsics = {"__builtin_c_devloc",
     "__builtin_c_f_pointer", "__builtin_c_loc", "loc", "present"};
 // List of intrinsics that can have a device actual argument if it is an
 // allocatable or pointer.
-static const llvm::StringSet<> cudaAllowedIntrinsics = {"allocated",
-    "associated", "kind", "lbound", "shape", "size", "ubound"};
+static const llvm::StringSet<> cudaAllowedIntrinsics = {
+    "allocated", "associated", "kind", "lbound", "shape", "size", "ubound"};
 
 static void CheckExplicitDataArg(const characteristics::DummyDataObject &dummy,
     const std::string &dummyName, evaluate::Expr<evaluate::SomeType> &actual,

``````````

</details>


https://github.com/llvm/llvm-project/pull/174025


More information about the flang-commits mailing list