summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-07-11 11:25:16 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-07-11 11:25:16 +0000
commit9c2e8ee72fe8c99a016a204a2f2b167cd17e188a (patch)
tree813773957814bc63d730a1a0476cb5fa60cf8d2f /clang/lib/Parse/ParseOpenMP.cpp
parent83442bb8b2e5284276d3eb5a97457401ed61d3f7 (diff)
downloadbcm5719-llvm-9c2e8ee72fe8c99a016a204a2f2b167cd17e188a.tar.gz
bcm5719-llvm-9c2e8ee72fe8c99a016a204a2f2b167cd17e188a.zip
[OPENMP] Parsing and sema analysis for 'omp task' directive.
llvm-svn: 212804
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