summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r--clang/lib/Parse/ParseOpenMP.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index b3a1063ed23..caa8d8f782c 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -105,8 +105,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() {
///
/// executable-directive:
/// annot_pragma_openmp 'parallel' | 'simd' | 'for' | 'sections' |
-/// 'section' | 'single' | 'parallel for' | 'parallel sections' {clause}
-/// annot_pragma_openmp_end
+/// 'section' | 'single' | 'parallel for' | 'parallel sections' | 'task'
+/// {clause} annot_pragma_openmp_end
///
StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() {
assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!");
@@ -147,7 +147,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() {
case OMPD_single:
case OMPD_section:
case OMPD_parallel_for:
- case OMPD_parallel_sections: {
+ case OMPD_parallel_sections:
+ case OMPD_task: {
ConsumeToken();
if (isOpenMPLoopDirective(DKind))
@@ -209,11 +210,6 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() {
Diag(Tok, diag::err_omp_unknown_directive);
SkipUntil(tok::annot_pragma_openmp_end);
break;
- case OMPD_task:
- Diag(Tok, diag::err_omp_unexpected_directive)
- << getOpenMPDirectiveName(DKind);
- SkipUntil(tok::annot_pragma_openmp_end);
- break;
}
return Directive;
}
OpenPOWER on IntegriCloud