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 | 96dae81d7fe7570f97d8fbe03c02e145173f801c (patch) | |
| tree | 1caa8ac5978d8d350fe3429c2acadba676947b3a /clang/lib/Parse/ParseOpenMP.cpp | |
| parent | 79bd39db8098b4092b83931b1ee2cb58dc30499c (diff) | |
| download | bcm5719-llvm-96dae81d7fe7570f97d8fbe03c02e145173f801c.tar.gz bcm5719-llvm-96dae81d7fe7570f97d8fbe03c02e145173f801c.zip | |
[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.
llvm-svn: 325369
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index e9f2029fb70..d34fad8fad2 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/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: |

