[flang-commits] [flang] 34cf8bb - [flang][OpenMP] Use parser::UnwrapRef instead of thing/value, NFC (#164087)
via flang-commits
flang-commits at lists.llvm.org
Tue Oct 21 04:17:52 PDT 2025
Author: Krzysztof Parzyszek
Date: 2025-10-21T06:17:48-05:00
New Revision: 34cf8bb413a6e083954a099796f234c3b6e459af
URL: https://github.com/llvm/llvm-project/commit/34cf8bb413a6e083954a099796f234c3b6e459af
DIFF: https://github.com/llvm/llvm-project/commit/34cf8bb413a6e083954a099796f234c3b6e459af.diff
LOG: [flang][OpenMP] Use parser::UnwrapRef instead of thing/value, NFC (#164087)
Added:
Modified:
flang/lib/Semantics/check-omp-atomic.cpp
flang/lib/Semantics/resolve-directives.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/check-omp-atomic.cpp b/flang/lib/Semantics/check-omp-atomic.cpp
index 515121af04d56..2707921ca1dfa 100644
--- a/flang/lib/Semantics/check-omp-atomic.cpp
+++ b/flang/lib/Semantics/check-omp-atomic.cpp
@@ -286,7 +286,7 @@ static std::optional<AnalyzedCondStmt> AnalyzeConditionalStmt(
// Extract the evaluate::Expr from ScalarLogicalExpr.
auto getFromLogical{[](const parser::ScalarLogicalExpr &logical) {
// ScalarLogicalExpr is Scalar<Logical<common::Indirection<Expr>>>
- const parser::Expr &expr{logical.thing.thing.value()};
+ auto &expr{parser::UnwrapRef<parser::Expr>(logical)};
return GetEvaluateExpr(expr);
}};
diff --git a/flang/lib/Semantics/resolve-directives.cpp b/flang/lib/Semantics/resolve-directives.cpp
index 3bb586c51c58f..33e9ea5a89efd 100644
--- a/flang/lib/Semantics/resolve-directives.cpp
+++ b/flang/lib/Semantics/resolve-directives.cpp
@@ -560,7 +560,7 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
auto getArgument{[&](auto &&maybeClause) {
if (maybeClause) {
// Scalar<Logical<Constant<common::Indirection<Expr>>>>
- auto &parserExpr{maybeClause->v.thing.thing.thing.value()};
+ auto &parserExpr{parser::UnwrapRef<parser::Expr>(*maybeClause)};
evaluate::ExpressionAnalyzer ea{context_};
if (auto &&maybeExpr{ea.Analyze(parserExpr)}) {
if (auto v{omp::GetLogicalValue(*maybeExpr)}) {
More information about the flang-commits
mailing list