awarzynski added a comment.

I think that this patch does a great job demonstrating the use of frontend 
actions and how _action_ compiler flags map to them. Given how 
`Fortran::semantics::Semantics` are defined and created, I think that adding 
_semantics_ as a member variable to `PrescanAndSemaAction` makes a lot of sense.

Btw, I also think that it would be worth exploring what Clang does. Ideally 
we'd have some `Sema` API that would be a member of `CompilerInstance`. 
However, that's outside the scope of this patch :)

Apart from one comment this looks good to me. Thank you for submitting this 
@FarisRehman !



================
Comment at: flang/include/flang/Frontend/FrontendActions.h:54
+public:
+  std::unique_ptr<Fortran::semantics::Semantics> semantics_;
 };
----------------
Do we need to expose it? Shouldn't this be private?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96716/new/

https://reviews.llvm.org/D96716

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to