summaryrefslogtreecommitdiff
path: root/clang/test/OpenMP/parallel_masked_taskloop_reduction_messages.cpp
AgeCommit message (Collapse)Author
2023-07-20[OpenMP][Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52Fazlay Rabbi
Currently, clang gives an incorrect reduction identifier error for the PLUS operator for OpenMP version > 52. But, PLUS operator is allowed in OpenMP version > 52. This revision fixes this issue and also modified the error messages to show the correct expected operators in the message based on the OpenMP version used (prior to OMP 6.0 and since OMP 6.0). Test Src: void foo() { int a = 0 ; #pragma omp parallel reduction(+:a) ; #pragma omp parallel reduction(-:a) ; } Before this revision: $ clang -fopenmp -fopenmp-version=60 test.c -c test.c:3:34: error: incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int' 3 | #pragma omp parallel reduction(+:a) | ^ test.c:5:34: error: incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int' 5 | #pragma omp parallel reduction(-:a) | ^ 2 errors generated. Wit this revision: $ clang -fopenmp -fopenmp-version=60 test.c -c test.c:5:34: error: incorrect reduction identifier, expected one of '+', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int' 5 | #pragma omp parallel reduction(-:a) | 1 error generated. Differential Revision: https://reviews.llvm.org/D155635
2023-05-18[OpenMP 5.2] Deprecate MINUS(-) operator on 'reduction' clauseFazlay Rabbi
2022-06-30[OpenMP] Initial parsing and sema support for 'parallel masked taskloop' ↵Fazlay Rabbi
construct This patch gives basic parsing and semantic support for "parallel masked taskloop" construct introduced in OpenMP 5.1 (section 2.16.9) Differential Revision: https://reviews.llvm.org/D128834