================
@@ -2963,8 +2964,10 @@ bool Parser::ParseOpenMPSimpleVarList(
bool IsCorrect = true;
bool NoIdentIsFound = true;
- // Read tokens while ')' or annot_pragma_openmp_end is not found.
- while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end)) {
+ // Read tokens while ')' or annot_pragma_openmp_end is not found. Stop at
+ // eof if code completion cut off parsing to avoid an infinite loop.
+ while (Tok.isNot(tok::r_paren) && Tok.isNot(tok::annot_pragma_openmp_end) &&
+ Tok.isNot(tok::eof)) {
----------------
zyn0217 wrote:
I'm surprised we're not checking 'tok::code_completion'?
https://github.com/llvm/llvm-project/pull/234586
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits