From 1d97d2a3d20e1490a72d3275c37ad57df3ede45c Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Mon, 19 Oct 2015 06:40:17 +0000 Subject: [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 --- clang/lib/Parse/Parser.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Parse/Parser.cpp') diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 5b0704658a2..26dc3998ad8 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -282,6 +282,7 @@ bool Parser::SkipUntil(ArrayRef 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: -- cgit v1.2.3