summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/declare_target_ast_print.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make output of -ast-print a valid C++ code.Serge Pavlov2016-11-101-6/+6
| | | | | | | | | | | | | | | | | | | Output generated by option -ast-print looks like C/C++ code, and it really is for plain C. For C++ the produced output was not valid C++ code, but the differences were small. With this change the output is fixed and can be compiled. Tests are changed so that output produced by -ast-print is compiled again with the same flags and both outputs are compared. Option -ast-print is extensively used in clang tests but it itself was tested poorly, existing tests only checked that compiler did not crash. There are unit tests in file DeclPrinterTest.cpp, but they test only terse output mode. Differential Revision: https://reviews.llvm.org/D26452 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286439 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Parse+Sema for '#pragma omp declare target' syntax version 4.5Dmitry Polukhin2016-05-091-0/+45
| | | | | | | | | | | | | | | | | Support OpenMP version 4.5 syntax for #pragma omp declare target. Syntax: #pragma omp declare target (extended-list) new-line or #pragma omp declare target clause[ [,] clause ... ] new-line Where clause is one of the following: to(extended-list) link(list) Differential Revision: http://reviews.llvm.org/D20011 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268925 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Parsing and Sema support for 'omp declare target' directiveDmitry Polukhin2016-04-061-0/+93
Add parsing, sema analysis for 'declare target' construct for OpenMP 4.0 (4.5 support will be added in separate patch). The declare target directive specifies that variables, functions (C, C++ and Fortran), and subroutines (Fortran) are mapped to a device. The declare target directive is a declarative directive. In Clang declare target is implemented as implicit attribute for the declaration. The syntax of the declare target directive is as follows: #pragma omp declare target declarations-definition-seq #pragma omp end declare target Based on patch from Michael Wong http://reviews.llvm.org/D15321 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265530 91177308-0d34-0410-b5e6-96231b3b80d8