[all-commits] [llvm/llvm-project] 5d7d66: [OpenACC] Implement 'declare' construct AST/Sema

Erich Keane via All-commits all-commits at lists.llvm.org
Mon Mar 3 07:48:53 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d7d66ba0d1ad6fcf1aefffd045eea88597f4614
      https://github.com/llvm/llvm-project/commit/5d7d66ba0d1ad6fcf1aefffd045eea88597f4614
  Author: erichkeane <ekeane at nvidia.com>
  Date:   2025-03-03 (Mon, 03 Mar 2025)

  Changed paths:
    A clang/include/clang/AST/DeclOpenACC.h
    M clang/include/clang/AST/DeclVisitor.h
    M clang/include/clang/AST/JSONNodeDumper.h
    M clang/include/clang/AST/OpenACCClause.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/AST/TextNodeDumper.h
    M clang/include/clang/Basic/DeclNodes.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/OpenACCClauses.def
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/SemaBase.h
    M clang/include/clang/Sema/SemaOpenACC.h
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/include/clang/Serialization/ASTRecordReader.h
    M clang/lib/AST/ASTStructuralEquivalence.cpp
    M clang/lib/AST/CMakeLists.txt
    M clang/lib/AST/DeclBase.cpp
    A clang/lib/AST/DeclOpenACC.cpp
    M clang/lib/AST/DeclPrinter.cpp
    M clang/lib/AST/JSONNodeDumper.cpp
    M clang/lib/AST/OpenACCClause.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/CodeGen/CGDecl.cpp
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/Parse/ParseOpenACC.cpp
    M clang/lib/Sema/SemaBase.cpp
    M clang/lib/Sema/SemaOpenACC.cpp
    M clang/lib/Sema/SemaOpenACCClause.cpp
    M clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTCommon.cpp
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderDecl.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterDecl.cpp
    A clang/test/AST/ast-print-openacc-declare-construct.cpp
    M clang/test/ParserOpenACC/parse-clauses.c
    M clang/test/ParserOpenACC/parse-constructs.c
    M clang/test/SemaOpenACC/combined-construct-auto_seq_independent-clauses.c
    M clang/test/SemaOpenACC/combined-construct-device_type-clause.c
    M clang/test/SemaOpenACC/compute-construct-device_type-clause.c
    M clang/test/SemaOpenACC/data-construct.cpp
    A clang/test/SemaOpenACC/declare-construct-ast.cpp
    A clang/test/SemaOpenACC/declare-construct.cpp
    M clang/test/SemaOpenACC/loop-construct-auto_seq_independent-clauses.c
    M clang/test/SemaOpenACC/loop-construct-device_type-clause.c
    M clang/test/SemaOpenACC/unimplemented-construct.c
    M clang/tools/libclang/CIndex.cpp

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list