[flang-commits] [flang] [flang][OpenMP] Add structure checks for DECLARE VARIANT (PR #198799)

via flang-commits flang-commits at lists.llvm.org
Fri May 29 08:39:02 PDT 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 h,cpp -- flang/lib/Semantics/check-omp-metadirective.cpp flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/check-omp-structure.h --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-omp-metadirective.cpp b/flang/lib/Semantics/check-omp-metadirective.cpp
index 163252c57..d492f7e7e 100644
--- a/flang/lib/Semantics/check-omp-metadirective.cpp
+++ b/flang/lib/Semantics/check-omp-metadirective.cpp
@@ -705,8 +705,8 @@ void OmpStructureChecker::CheckOmpDeclareVariantDirective(
             variant = GetArgumentSymbol(arg);
             CheckProcedureSymbol(variant, arg.source);
             const Scope &containingScope{context_.FindScope(x.source)};
-            if (const Symbol *
-                host{GetProgramUnitContaining(containingScope).symbol()}) {
+            if (const Symbol *host{
+                    GetProgramUnitContaining(containingScope).symbol()}) {
               base = host;
             }
           },

``````````

</details>


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


More information about the flang-commits mailing list