[flang-commits] [flang] [flang] Follow up #192674 Add INLINEALWAYS Directive (PR #194313)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Mon Apr 27 05:51:16 PDT 2026


================
@@ -10492,11 +10492,12 @@ void ResolveNamesVisitor::Post(const parser::CompilerDirective &x) {
     Symbol *sym{currScope().symbol()};
     if (!sym || !sym->has<SubprogramDetails>()) {
       Say(x.source,
-          "!DIR$ INLINEALWAYS directive with name must appear in a subroutine or function"_err_en_US);
+          "!DIR$ INLINEALWAYS directive with name must appear in a subprogram"_err_en_US);
     }
     if (inlineAlways->v->ToString() != sym->name().ToString()) {
----------------
eugeneepshteyn wrote:

Note: there's `!sym` check above, but here there's no check for `sym` to be null. Maybe add a check for safety.

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


More information about the flang-commits mailing list