================ @@ -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; + SemaRef.Diag(StartLoc, diag::warn_acc_construct_unimplemented) << K; ---------------- sam-mccall wrote:
Agreed. Is there a better way than this? ``` class SemaComponent { Sema &S; protected: SemaComponent(Sema &S) : S(S) {} Sema& sema() { return S; } SemaDiagnosticBuilder Diag(...) { return sema().Diag(...); } // ... }; class SemaOpenACC : public SemaComponent { public: using SemaComponent::SemaComponent; ... } ``` Accessing `sema()` would be a marker of crossing component boundaries, which is worthy of some scrutiny. This requires some agreement on what common functionality is. On the other hand it forces some discussion/review of this definition which seems useful. It requires SemaOpenACC.h to depend on Sema.h (which personally I think is reasonable, based on what clients will do). It also requires a bunch of boilerplate, which is sad. https://github.com/llvm/llvm-project/pull/84184 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits