[flang-commits] [flang] [flang][cuda] Resolve generic tie‑breaks using per‑arg CUDA distance (PR #181038)

via flang-commits flang-commits at lists.llvm.org
Thu Feb 12 18:49:36 PST 2026


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/expression.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/expression.cpp b/flang/lib/Semantics/expression.cpp
index a4b32e467..81603b8c2 100644
--- a/flang/lib/Semantics/expression.cpp
+++ b/flang/lib/Semantics/expression.cpp
@@ -2804,10 +2804,11 @@ struct CudaMatchingDistance {
   bool isInfinite{false};
 };
 
-// Compare CUDA matching distances using lexicographical comparison of per-argument
-// distances. This is needed to differentiate procedures that would have similar
-// total distance when summing the per-argument weights, allowing the compiler to
-// select the best match based on argument-by-argument comparison.
+// Compare CUDA matching distances using lexicographical comparison of
+// per-argument distances. This is needed to differentiate procedures that would
+// have similar total distance when summing the per-argument weights, allowing
+// the compiler to select the best match based on argument-by-argument
+// comparison.
 static int CompareCudaMatchingDistance(
     const CudaMatchingDistance &x, const CudaMatchingDistance &y) {
   if (x.isInfinite != y.isInfinite) {

``````````

</details>


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


More information about the flang-commits mailing list