[flang-commits] [flang] [flang] Add parser support for explicit-shape-bounds-spec (PR #188447)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Wed Apr 15 15:55:05 PDT 2026


================
@@ -237,7 +238,67 @@ ArraySpec ArraySpecAnalyzer::Analyze(const parser::ComponentArraySpec &x) {
   CHECK(!arraySpec_.empty());
   return arraySpec_;
 }
+
+static bool shouldRewriteShapeSpecListToExplicitBounds(
+    SemanticsContext &context, const parser::ArraySpec &x) {
+  auto &explicitShapeSpecList{std::get<std::list<parser::ExplicitShapeSpec>>(
+      const_cast<parser::ArraySpec &>(x).u)};
----------------
eugeneepshteyn wrote:

Is `const_cast` here necessary? `shouldRewriteShapeSpecListToExplicitBounds()` doesn't seem to modify anything, just read information.

https://github.com/llvm/llvm-project/pull/188447


More information about the flang-commits mailing list