diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2018-02-16 18:36:44 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-02-16 18:36:44 +0000 |
commit | f45c4ab9d7eac20e1cafbe9a4989c52758ac7652 (patch) | |
tree | ca150ab92d5915d17f7bb5e8f34c948a9115b360 /lib/Parse/ParseOpenMP.cpp | |
parent | f942b699bfe6d39030317dfa9a8831bf02ad1b50 (diff) | |
download | clang-f45c4ab9d7eac20e1cafbe9a4989c52758ac7652.tar.gz |
[OPENMP] Fix parsing of the directives with inner directives.
The parsing may lead to compiler hanging because of the incorrect
processing of inner OpenMP pragmas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325369 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | lib/Parse/ParseOpenMP.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseOpenMP.cpp b/lib/Parse/ParseOpenMP.cpp index e9f2029fb7..d34fad8fad 100644 --- a/lib/Parse/ParseOpenMP.cpp +++ b/lib/Parse/ParseOpenMP.cpp @@ -851,7 +851,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( case OMPD_target_teams_distribute_parallel_for_simd: case OMPD_target_teams_distribute_simd: Diag(Tok, diag::err_omp_unexpected_directive) - << getOpenMPDirectiveName(DKind); + << 1 << getOpenMPDirectiveName(DKind); break; } while (Tok.isNot(tok::annot_pragma_openmp_end)) @@ -1107,7 +1107,7 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( case OMPD_declare_target: case OMPD_end_declare_target: Diag(Tok, diag::err_omp_unexpected_directive) - << getOpenMPDirectiveName(DKind); + << 1 << getOpenMPDirectiveName(DKind); SkipUntil(tok::annot_pragma_openmp_end); break; case OMPD_unknown: |