[flang] [llvm] [FLANG][OpenMP]Add frontend support for ASSUME and ASSUMES (PR #120770)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 1 12:52:57 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 eb0af4e48d0e039849c6bbf36e791610e7ef9a06 d8e85e018deaf1b258a7d7ee48d915a2bd8d8e08 --extensions cpp,h -- flang/examples/FlangOmpReport/FlangOmpReportVisitor.cpp flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/lib/Lower/OpenMP/OpenMP.cpp flang/lib/Parser/openmp-parsers.cpp flang/lib/Parser/unparse.cpp flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/check-omp-structure.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index b073bf67c3..d5573e47fa 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -1300,27 +1300,27 @@ TYPE_PARSER(sourced(construct<OpenMPDeclarativeAssumes>(
verbatim("ASSUMES"_tok), Parser<OmpClauseList>{})))
// Declarative constructs
-TYPE_PARSER(startOmpLine >>
- withMessage("expected OpenMP construct"_err_en_US,
- sourced(construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPDeclarativeAssumes>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPDeclareReductionConstruct>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPDeclareMapperConstruct>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPDeclareSimdConstruct>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPDeclareTargetConstruct>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPDeclarativeAllocate>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPRequiresConstruct>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPThreadprivate>{}) ||
- construct<OpenMPDeclarativeConstruct>(
- Parser<OpenMPUtilityConstruct>{})) /
- endOmpLine))
+TYPE_PARSER(
+ startOmpLine >> withMessage("expected OpenMP construct"_err_en_US,
+ sourced(construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPDeclarativeAssumes>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPDeclareReductionConstruct>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPDeclareMapperConstruct>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPDeclareSimdConstruct>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPDeclareTargetConstruct>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPDeclarativeAllocate>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPRequiresConstruct>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPThreadprivate>{}) ||
+ construct<OpenMPDeclarativeConstruct>(
+ Parser<OpenMPUtilityConstruct>{})) /
+ endOmpLine))
// Assume Construct
TYPE_PARSER(sourced(construct<OmpAssumeDirective>(
``````````
</details>
https://github.com/llvm/llvm-project/pull/120770
More information about the llvm-commits
mailing list