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

Jack Styles via flang-commits flang-commits at lists.llvm.org
Tue Apr 28 02:01:06 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()) {
----------------
Stylie777 wrote:

I've made this an `else if` as then we can use the above `!sym` as the null check, it doesn't change the intended behaviour here as we need the symbol to compare the name. 

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


More information about the flang-commits mailing list