[flang] [llvm] [flang][OpenMP] Overhaul implementation of ATOMIC construct (PR #137852)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 16 07:18:33 PDT 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 HEAD~1 HEAD --extensions cpp,h -- flang/examples/FeatureList/FeatureList.cpp flang/examples/FlangOmpReport/FlangOmpReportVisitor.cpp flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/include/flang/Semantics/dump-expr.h flang/include/flang/Semantics/tools.h flang/lib/Lower/OpenMP/DataSharingProcessor.cpp flang/lib/Lower/OpenMP/OpenMP.cpp flang/lib/Parser/openmp-parsers.cpp flang/lib/Parser/parse-tree.cpp flang/lib/Parser/unparse.cpp flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/check-omp-structure.h flang/lib/Semantics/dump-expr.cpp flang/lib/Semantics/resolve-names.cpp flang/lib/Semantics/rewrite-directives.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/include/flang/Semantics/dump-expr.h b/flang/include/flang/Semantics/dump-expr.h
index 1553dac3b..c828a3440 100644
--- a/flang/include/flang/Semantics/dump-expr.h
+++ b/flang/include/flang/Semantics/dump-expr.h
@@ -39,13 +39,12 @@ public:
}
private:
- template <typename T>
- struct TypeOf {
+ template <typename T> struct TypeOf {
static constexpr std::string_view name{TypeOf<T>::get()};
static constexpr std::string_view get() {
std::string_view v(__PRETTY_FUNCTION__);
- v.remove_prefix(99); // Strip the part "... [with T = "
- v.remove_suffix(50); // Strip the ending "; string_view = ...]"
+ v.remove_prefix(99); // Strip the part "... [with T = "
+ v.remove_suffix(50); // Strip the ending "; string_view = ...]"
return v;
}
};
diff --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index 6977e209e..0f553541c 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2850,7 +2850,7 @@ genAtomicUpdate(lower::AbstractConverter &converter, mlir::Location loc,
builder.create<mlir::omp::YieldOp>(loc, converted);
converter.resetExprOverrides();
- builder.restoreInsertionPoint(postAt); // For naCtx cleanups
+ builder.restoreInsertionPoint(postAt); // For naCtx cleanups
return updateOp;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/137852
More information about the llvm-commits
mailing list