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

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 07:07:44 PST 2024


================
@@ -0,0 +1,68 @@
+//===----- 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 implements semantic analysis for OpenACC constructs and
+/// clauses.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_SEMA_SEMAOPENACC_H
+#define LLVM_CLANG_SEMA_SEMAOPENACC_H
+
+#include "clang/Basic/OpenACCKinds.h"
+#include "clang/Sema/Ownership.h"
+
+namespace clang {
+
+class Sema;
+
+class SemaOpenACC {
+public:
+  Sema &Sema;
+
+  /// Called after parsing an OpenACC Clause so that it can be checked.
+  bool ActOnOpenACCClause(OpenACCClauseKind ClauseKind,
----------------
erichkeane wrote:

```suggestion
  bool ActOnClause(OpenACCClauseKind ClauseKind,
```

And so forth throughout this patch?  WDYT?  Doesn't make sense to 'namespace' these anymore if we have to say `.OpenACC.<whatever>` every time.

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


More information about the cfe-commits mailing list