[flang-commits] [flang] [flang] Fix bad attributes on type parameter symbols (PR #174870)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Wed Jan 7 18:14:22 PST 2026


================
@@ -6534,6 +6534,9 @@ void DeclarationVisitor::Post(const parser::DerivedTypeStmt &x) {
   if (!paramNames.empty()) {
     set_inPDTDefinition(true);
   }
+  // Clear the attributes so that the attributes of the derived type
+  // (ABSTRACT, PUBLIC/PRIVATE, &c.) don't apply to the type's parameters.
+  EndAttrs(), BeginAttrs();
----------------
eugeneepshteyn wrote:

I'm curious, is there a benefit here to using comma operator, rather then separate calls separated by semicolons?

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


More information about the flang-commits mailing list