summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-06-26 08:21:58 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-06-26 08:21:58 +0000
commit1e0498a92d6e09d01c791a7f32299de6c8e02cac (patch)
tree80b5da2548f93a8a8f193b07da7851a496adb24d /clang/lib/Parse/ParseOpenMP.cpp
parent07910d6ab548e7a57717af7e28d994cd652fd75d (diff)
downloadbcm5719-llvm-1e0498a92d6e09d01c791a7f32299de6c8e02cac.tar.gz
bcm5719-llvm-1e0498a92d6e09d01c791a7f32299de6c8e02cac.zip
[OPENMP] Initial parsing and sema analysis for 'section' directive.
llvm-svn: 211767
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r--clang/lib/Parse/ParseOpenMP.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp
index 7a3c05e96be..11e888efb40 100644
--- a/clang/lib/Parse/ParseOpenMP.cpp
+++ b/clang/lib/Parse/ParseOpenMP.cpp
@@ -64,6 +64,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() {
case OMPD_task:
case OMPD_for:
case OMPD_sections:
+ case OMPD_section:
Diag(Tok, diag::err_omp_unexpected_directive)
<< getOpenMPDirectiveName(DKind);
break;
@@ -79,8 +80,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() {
/// annot_pragma_openmp_end
///
/// executable-directive:
-/// annot_pragma_openmp 'parallel'|'simd'|'for'|'sections' {clause}
-/// annot_pragma_openmp_end
+/// annot_pragma_openmp 'parallel'|'simd'|'for'|'sections'|'section'
+/// {clause} annot_pragma_openmp_end
///
StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() {
assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!");
@@ -119,7 +120,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() {
case OMPD_parallel:
case OMPD_simd:
case OMPD_for:
- case OMPD_sections: {
+ case OMPD_sections:
+ case OMPD_section: {
ConsumeToken();
if (isOpenMPLoopDirective(DKind))
OpenPOWER on IntegriCloud