[flang-commits] [flang] [flang] Format rewrite-parse-tree.cpp, NFC (PR #196813)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Sun May 10 07:50:28 PDT 2026
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/196813
It's a 4-line change that makes the file invariant under clang-format.
>From 8272f19e0a4bc294dd5d3b840769c027224d19f0 Mon Sep 17 00:00:00 2001
From: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
Date: Sun, 10 May 2026 09:48:37 -0500
Subject: [PATCH] [flang] Format rewrite-parse-tree.cpp, NFC
It's a 4-line change that makes the file invariant under clang-format.
---
flang/lib/Semantics/rewrite-parse-tree.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/flang/lib/Semantics/rewrite-parse-tree.cpp b/flang/lib/Semantics/rewrite-parse-tree.cpp
index f71a1be50172e..7352c2a324616 100644
--- a/flang/lib/Semantics/rewrite-parse-tree.cpp
+++ b/flang/lib/Semantics/rewrite-parse-tree.cpp
@@ -105,7 +105,7 @@ void RewriteMutator::Post(parser::Name &name) {
}
static bool ReturnsDataPointer(const Symbol &symbol) {
- if (const Symbol * funcRes{FindFunctionResult(symbol)}) {
+ if (const Symbol *funcRes{FindFunctionResult(symbol)}) {
return IsPointer(*funcRes) && !IsProcedure(*funcRes);
} else if (const auto *generic{symbol.detailsIf<GenericDetails>()}) {
for (auto ref : generic->specificProcs()) {
@@ -257,8 +257,8 @@ void RewriteMutator::FixMisparsedStmtFuncs(
if (auto *stmt{std::get_if<
parser::Statement<common::Indirection<parser::StmtFunctionStmt>>>(
&it->u)}) {
- if (const Symbol *
- symbol{std::get<parser::Name>(stmt->statement.value().t).symbol}) {
+ if (const Symbol *symbol{
+ std::get<parser::Name>(stmt->statement.value().t).symbol}) {
const Symbol &ultimate{symbol->GetUltimate()};
convert =
ultimate.has<ObjectEntityDetails>() || ReturnsDataPointer(ultimate);
@@ -461,7 +461,7 @@ template <typename READ_OR_WRITE>
void FixMisparsedUntaggedNamelistName(READ_OR_WRITE &x) {
if (x.iounit && x.format &&
std::holds_alternative<parser::Expr>(x.format->u)) {
- if (const parser::Name * name{parser::Unwrap<parser::Name>(x.format)}) {
+ if (const parser::Name *name{parser::Unwrap<parser::Name>(x.format)}) {
if (name->symbol && name->symbol->GetUltimate().has<NamelistDetails>()) {
x.controls.emplace_front(parser::IoControlSpec{std::move(*name)});
x.format.reset();
More information about the flang-commits
mailing list