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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 26 09:09:19 PDT 2024


================
@@ -0,0 +1,74 @@
+//===----- SemaOpenACC.h - Semantic Analysis for OpenACC constructs -------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+/// \file
+/// This file declares semantic analysis for OpenACC constructs and
+/// clauses.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_SEMA_SEMAOPENACC_H
+#define LLVM_CLANG_SEMA_SEMAOPENACC_H
+
+#include "clang/AST/DeclGroup.h"
+#include "clang/Basic/OpenACCKinds.h"
+#include "clang/Basic/SourceLocation.h"
+#include "clang/Sema/Ownership.h"
+
+namespace clang {
+
+class ASTContext;
+class DiagnosticEngine;
+class LangOptions;
+class Sema;
+
+class SemaOpenACC {
+public:
+  SemaOpenACC(Sema &S);
+
+  ASTContext &getASTContext() const;
+  DiagnosticsEngine &getDiagnostics() const;
+  const LangOptions &getLangOpts() const;
+
+  Sema &SemaRef;
----------------
AaronBallman wrote:

I think this work needs to be done at some point, but I don't think it needs to be in this commit if you'd prefer to do it as a follow-up when you go to add another sema "sub" class. Then we can argue about things like "protected access?" and the like without distracting from the incremental progress in this PR.

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


More information about the cfe-commits mailing list