diff options
author | erichkeane <ekeane@nvidia.com> | 2025-01-21 11:27:23 -0800 |
---|---|---|
committer | erichkeane <ekeane@nvidia.com> | 2025-03-03 07:48:29 -0800 |
commit | 5d7d66ba0d1ad6fcf1aefffd045eea88597f4614 (patch) | |
tree | 429d72a1b6237551fa964cbf16f910fb70373625 /clang/lib/AST/DeclBase.cpp | |
parent | ccf1bfc1d50a70260d200a9137ab7924dac029a8 (diff) | |
download | llvm-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/AST/DeclBase.cpp')
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index ab9d486..9d8eb07 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -21,6 +21,7 @@ #include "clang/AST/DeclContextInternals.h" #include "clang/AST/DeclFriend.h" #include "clang/AST/DeclObjC.h" +#include "clang/AST/DeclOpenACC.h" #include "clang/AST/DeclOpenMP.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/DependentDiagnostic.h" @@ -992,6 +993,7 @@ unsigned Decl::getIdentifierNamespaceForKind(Kind DeclKind) { case LifetimeExtendedTemporary: case RequiresExprBody: case ImplicitConceptSpecialization: + case OpenACCDeclare: // Never looked up by name. return 0; } |