[OPENMP] Fix for http://llvm.org/PR25221: Infinite loop while parsing OpenMP directive

Clang skipped annot_pragma_openmp token, while it should be considered as a stop token while skipping tokens.

llvm-svn: 250684
This commit is contained in:
Alexey Bataev
2015-10-19 06:40:17 +00:00
parent d0a7d6e4ee
commit 1d97d2a3d2
2 changed files with 16 additions and 0 deletions

View File

@@ -282,6 +282,7 @@ bool Parser::SkipUntil(ArrayRef<tok::TokenKind> Toks, SkipUntilFlags Flags) {
// Ran out of tokens.
return false;
case tok::annot_pragma_openmp:
case tok::annot_pragma_openmp_end:
// Stop before an OpenMP pragma boundary.
case tok::annot_module_begin: