Parsing and sema support for device clause
Details
Diff Detail
Event Timeline
include/clang/AST/OpenMPClause.h | ||
---|---|---|
2375–2377 | Must be cast<Expr>, because it is known that this is an expression and it cannot be nullptr | |
2384 | return child_range(&Device, &Device + 1); | |
lib/AST/StmtProfile.cpp | ||
432 | I think device is always not nullptr | |
tools/libclang/CIndex.cpp | ||
2054 | Visitor->AddStmt(C->getDevice()); |
In ParseOpenMP.cpp, it failed the patch because OMPC_ordered was already added before OMPC_device. But it does not affect the patch if we add it after this.
Please produce a new patch with this update.
This has landed.
Commit
C:\llvmtrunk\tools\clang\include\clang\AST\DataRecursiveASTVisitor.h
C:\llvmtrunk\tools\clang\include\clang\AST\OpenMPClause.h
C:\llvmtrunk\tools\clang\include\clang\AST\RecursiveASTVisitor.h
C:\llvmtrunk\tools\clang\include\clang\Basic\OpenMPKinds.def
C:\llvmtrunk\tools\clang\include\clang\Sema\Sema.h
C:\llvmtrunk\tools\clang\lib\AST\StmtPrinter.cpp
C:\llvmtrunk\tools\clang\lib\AST\StmtProfile.cpp
C:\llvmtrunk\tools\clang\lib\Basic\OpenMPKinds.cpp
C:\llvmtrunk\tools\clang\lib\CodeGen\CGStmtOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Parse\ParseOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Sema\SemaOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Sema\TreeTransform.h
C:\llvmtrunk\tools\clang\lib\Serialization\ASTReaderStmt.cpp
C:\llvmtrunk\tools\clang\lib\Serialization\ASTWriterStmt.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_data_device_messages.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_device_messages.cpp
C:\llvmtrunk\tools\clang\tools\libclang\CIndex.cpp
C:\llvmtrunk\tools\clang\lib\Serialization\ASTReaderStmt.cpp
C:\llvmtrunk\tools\clang\lib\AST\StmtProfile.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_device_messages.cpp
C:\llvmtrunk\tools\clang\lib\Parse\ParseOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Basic\OpenMPKinds.cpp
C:\llvmtrunk\tools\clang\lib\Serialization\ASTWriterStmt.cpp
C:\llvmtrunk\tools\clang\tools\libclang\CIndex.cpp
C:\llvmtrunk\tools\clang\include\clang\Sema\Sema.h
C:\llvmtrunk\tools\clang\lib\AST\StmtPrinter.cpp
C:\llvmtrunk\tools\clang\lib\CodeGen\CGStmtOpenMP.cpp
C:\llvmtrunk\tools\clang\lib\Sema\TreeTransform.h
C:\llvmtrunk\tools\clang\include\clang\Basic\OpenMPKinds.def
C:\llvmtrunk\tools\clang\include\clang\AST\DataRecursiveASTVisitor.h
C:\llvmtrunk\tools\clang\include\clang\AST\OpenMPClause.h
C:\llvmtrunk\tools\clang\lib\Sema\SemaOpenMP.cpp
C:\llvmtrunk\tools\clang\test\OpenMP\target_data_device_messages.cpp
C:\llvmtrunk\tools\clang\include\clang\AST\RecursiveASTVisitor.h
At revision: 244325
Must be cast<Expr>, because it is known that this is an expression and it cannot be nullptr