diff --git a/flang/include/flang/Optimizer/Support/InitFIR.h b/flang/include/flang/Optimizer/Support/InitFIR.h --- a/flang/include/flang/Optimizer/Support/InitFIR.h +++ b/flang/include/flang/Optimizer/Support/InitFIR.h @@ -13,6 +13,7 @@ #ifndef FORTRAN_OPTIMIZER_SUPPORT_INITFIR_H #define FORTRAN_OPTIMIZER_SUPPORT_INITFIR_H +#include "flang/Optimizer/CodeGen/CodeGen.h" #include "flang/Optimizer/Dialect/FIRDialect.h" #include "mlir/Conversion/Passes.h" #include "mlir/Dialect/Affine/Passes.h" @@ -21,7 +22,6 @@ #include "mlir/Pass/PassRegistry.h" #include "mlir/Transforms/LocationSnapshot.h" #include "mlir/Transforms/Passes.h" -#include "flang/Optimizer/CodeGen/CodeGen.h" namespace fir::support { diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h --- a/flang/include/flang/Parser/parse-tree.h +++ b/flang/include/flang/Parser/parse-tree.h @@ -3733,7 +3733,6 @@ std::tuple> t; }; - // 2.17.8 flush -> FLUSH [memory-order-clause] [(variable-name-list)] struct OpenMPFlushConstruct { TUPLE_CLASS_BOILERPLATE(OpenMPFlushConstruct); diff --git a/flang/lib/Evaluate/characteristics.cpp b/flang/lib/Evaluate/characteristics.cpp --- a/flang/lib/Evaluate/characteristics.cpp +++ b/flang/lib/Evaluate/characteristics.cpp @@ -84,7 +84,7 @@ } }, [&](const semantics::ProcEntityDetails &proc) { - const semantics::ProcInterface &interface{proc.interface()}; + const semantics::ProcInterface &interface { proc.interface() }; if (interface.type()) { return Characterize(*interface.type(), context); } else if (interface.symbol()) { @@ -420,7 +420,7 @@ return context.intrinsics().IsSpecificIntrinsicFunction( symbol.name().ToString()); } - const semantics::ProcInterface &interface{proc.interface()}; + const semantics::ProcInterface &interface { proc.interface() }; if (const semantics::Symbol * interfaceSymbol{interface.symbol()}) { return CharacterizeProcedure( *interfaceSymbol, context, seenProcs); diff --git a/flang/lib/Optimizer/Dialect/FIRAttr.cpp b/flang/lib/Optimizer/Dialect/FIRAttr.cpp --- a/flang/lib/Optimizer/Dialect/FIRAttr.cpp +++ b/flang/lib/Optimizer/Dialect/FIRAttr.cpp @@ -14,8 +14,8 @@ #include "flang/Optimizer/Dialect/FIRDialect.h" #include "flang/Optimizer/Support/KindMapping.h" #include "mlir/IR/AttributeSupport.h" -#include "mlir/IR/DialectImplementation.h" #include "mlir/IR/BuiltinTypes.h" +#include "mlir/IR/DialectImplementation.h" #include "llvm/ADT/SmallString.h" using namespace fir; diff --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp --- a/flang/lib/Optimizer/Dialect/FIROps.cpp +++ b/flang/lib/Optimizer/Dialect/FIROps.cpp @@ -398,8 +398,7 @@ //===----------------------------------------------------------------------===// void fir::ConvertOp::getCanonicalizationPatterns( - OwningRewritePatternList &results, MLIRContext *context) { -} + OwningRewritePatternList &results, MLIRContext *context) {} mlir::OpFoldResult fir::ConvertOp::fold(llvm::ArrayRef opnds) { if (value().getType() == getType()) @@ -1334,7 +1333,7 @@ template static A getSubOperands(unsigned pos, A allArgs, mlir::DenseIntElementsAttr ranges, - AdditionalArgs &&... additionalArgs) { + AdditionalArgs &&...additionalArgs) { unsigned start = 0; for (unsigned i = 0; i < pos; ++i) start += (*(ranges.begin() + i)).getZExtValue(); diff --git a/flang/lib/Semantics/check-acc-structure.h b/flang/lib/Semantics/check-acc-structure.h --- a/flang/lib/Semantics/check-acc-structure.h +++ b/flang/lib/Semantics/check-acc-structure.h @@ -70,7 +70,6 @@ #include "llvm/Frontend/OpenACC/ACC.inc" private: - bool CheckAllowedModifier(llvm::acc::Clause clause); bool IsComputeConstruct(llvm::acc::Directive directive) const; bool IsInsideComputeConstruct() const; diff --git a/flang/lib/Semantics/check-call.cpp b/flang/lib/Semantics/check-call.cpp --- a/flang/lib/Semantics/check-call.cpp +++ b/flang/lib/Semantics/check-call.cpp @@ -501,7 +501,7 @@ const characteristics::DummyProcedure &proc, const std::string &dummyName, evaluate::FoldingContext &context) { parser::ContextualMessages &messages{context.messages()}; - const characteristics::Procedure &interface{proc.procedure.value()}; + const characteristics::Procedure &interface { proc.procedure.value() }; if (const auto *expr{arg.UnwrapExpr()}) { bool dummyIsPointer{ proc.attrs.test(characteristics::DummyProcedure::Attr::Pointer)}; diff --git a/flang/lib/Semantics/check-declarations.cpp b/flang/lib/Semantics/check-declarations.cpp --- a/flang/lib/Semantics/check-declarations.cpp +++ b/flang/lib/Semantics/check-declarations.cpp @@ -657,7 +657,7 @@ " may not have an INTENT attribute"_err_en_US); } - const Symbol *interface{details.interface().symbol()}; + const Symbol *interface { details.interface().symbol() }; if (!symbol.attrs().test(Attr::INTRINSIC) && (symbol.attrs().test(Attr::ELEMENTAL) || (interface && !interface->attrs().test(Attr::INTRINSIC) && diff --git a/flang/lib/Semantics/expression.cpp b/flang/lib/Semantics/expression.cpp --- a/flang/lib/Semantics/expression.cpp +++ b/flang/lib/Semantics/expression.cpp @@ -1737,7 +1737,7 @@ static int GetPassIndex(const Symbol &proc) { CHECK(!proc.attrs().test(semantics::Attr::NOPASS)); std::optional passName{GetPassName(proc)}; - const auto *interface{semantics::FindInterface(proc)}; + const auto *interface { semantics::FindInterface(proc) }; if (!passName || !interface) { return 0; // first argument is passed-object } diff --git a/flang/lib/Semantics/mod-file.cpp b/flang/lib/Semantics/mod-file.cpp --- a/flang/lib/Semantics/mod-file.cpp +++ b/flang/lib/Semantics/mod-file.cpp @@ -567,7 +567,7 @@ return; } const auto &details{symbol.get()}; - const ProcInterface &interface{details.interface()}; + const ProcInterface &interface { details.interface() }; Attrs attrs{symbol.attrs()}; if (details.passName()) { attrs.reset(Attr::PASS); diff --git a/flang/lib/Semantics/resolve-names.cpp b/flang/lib/Semantics/resolve-names.cpp --- a/flang/lib/Semantics/resolve-names.cpp +++ b/flang/lib/Semantics/resolve-names.cpp @@ -681,9 +681,7 @@ bool isAbstract() const; protected: - Symbol &GetGenericSymbol() { - return DEREF(genericInfo_.top().symbol); - } + Symbol &GetGenericSymbol() { return DEREF(genericInfo_.top().symbol); } // Add to generic the symbol for the subprogram with the same name void CheckGenericProcedures(Symbol &); diff --git a/flang/lib/Semantics/type.cpp b/flang/lib/Semantics/type.cpp --- a/flang/lib/Semantics/type.cpp +++ b/flang/lib/Semantics/type.cpp @@ -384,7 +384,7 @@ } else if (auto *procDetails{newSymbol.detailsIf()}) { // We have a procedure pointer. Instantiate its return type if (const DeclTypeSpec * returnType{InstantiateType(newSymbol)}) { - ProcInterface &interface{procDetails->interface()}; + ProcInterface &interface { procDetails->interface() }; if (!interface.symbol()) { // Don't change the type for interfaces based on symbols interface.set_type(*returnType);