[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 07:59:43 PST 2024


================
@@ -63,17 +67,17 @@ void Sema::ActOnOpenACCConstruct(OpenACCDirectiveKind K,
     // here as these constructs do not take any arguments.
     break;
   default:
-    Diag(StartLoc, diag::warn_acc_construct_unimplemented) << K;
+    Sema.Diag(StartLoc, diag::warn_acc_construct_unimplemented) << K;
----------------
Endilll wrote:

We can do that, but that's far from the only piece of "common infrastructure" in `Sema`. Do we also want `LangOpts`, `ASTContext`, `SourceMgr`, etc. in `Sema` components? If so, where do we stop?

Obviously, this is going to cost us some memory to store those references, and some boilerplate in constructors of components to initialize them.

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


More information about the cfe-commits mailing list