[flang-commits] [flang] [flang][cuda] Implicitly add DEVICE attribute in device/global functions (PR #119743)
via flang-commits
flang-commits at lists.llvm.org
Thu Dec 12 10:58:11 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 7ece560a50d09686bb384b309b8b05d8f63111e5 6e2c547ad7469d2bf13fdac9f0d006d69bae0cfe --extensions cpp -- flang/lib/Semantics/resolve-names.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp
index a38c86e683..aef2898919 100644
--- a/flang/lib/Semantics/resolve-names.cpp
+++ b/flang/lib/Semantics/resolve-names.cpp
@@ -8973,7 +8973,8 @@ void ResolveNamesVisitor::FinishSpecificationPart(
if (NeedsExplicitType(symbol)) {
ApplyImplicitRules(symbol);
}
- if (inDeviceSubprogram && IsDummy(symbol) && symbol.has<ObjectEntityDetails>()) {
+ if (inDeviceSubprogram && IsDummy(symbol) &&
+ symbol.has<ObjectEntityDetails>()) {
auto *dummy{symbol.detailsIf<ObjectEntityDetails>()};
if (!dummy->cudaDataAttr()) {
// Implicitly set device attribute if none is set in device context.
``````````
</details>
https://github.com/llvm/llvm-project/pull/119743
More information about the flang-commits
mailing list