aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Serialization/ASTCommon.cpp
diff options
context:
space:
mode:
authorerichkeane <ekeane@nvidia.com>2025-01-21 11:27:23 -0800
committererichkeane <ekeane@nvidia.com>2025-03-03 07:48:29 -0800
commit5d7d66ba0d1ad6fcf1aefffd045eea88597f4614 (patch)
tree429d72a1b6237551fa964cbf16f910fb70373625 /clang/lib/Serialization/ASTCommon.cpp
parentccf1bfc1d50a70260d200a9137ab7924dac029a8 (diff)
downloadllvm-5d7d66ba0d1ad6fcf1aefffd045eea88597f4614.zip
llvm-5d7d66ba0d1ad6fcf1aefffd045eea88597f4614.tar.gz
llvm-5d7d66ba0d1ad6fcf1aefffd045eea88597f4614.tar.bz2
[OpenACC] Implement 'declare' construct AST/Sema
The 'declare' construct is the first of two 'declaration' level constructs, so it is legal in any place a declaration is, including as a statement, which this accomplishes by wrapping it in a DeclStmt. All clauses on this have a 'same scope' requirement, which this enforces as declaration context instead, which makes it possible to implement these as a template. The 'link' and 'device_resident' clauses are also added, which have some similar/small restrictions, but are otherwise pretty rote. This patch implements all of the above.
Diffstat (limited to 'clang/lib/Serialization/ASTCommon.cpp')
-rw-r--r--clang/lib/Serialization/ASTCommon.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTCommon.cpp b/clang/lib/Serialization/ASTCommon.cpp
index 3a62c4e..ae8d0a6 100644
--- a/clang/lib/Serialization/ASTCommon.cpp
+++ b/clang/lib/Serialization/ASTCommon.cpp
@@ -458,6 +458,7 @@ bool serialization::isRedeclarableDeclKind(unsigned Kind) {
case Decl::RequiresExprBody:
case Decl::UnresolvedUsingIfExists:
case Decl::HLSLBuffer:
+ case Decl::OpenACCDeclare:
return false;
// These indirectly derive from Redeclarable<T> but are not actually