AaronBallman wrote:

> @AaronBallman i have updated the test file as u said thanks for ur help 
> really appreciate that but it was failing let me know what is the problem 
> maybe putting the diag on one line can solve this problem ?

I don't have the bandwidth to debug it myself to know for sure, but what I 
*think* is happening is that we used to call `Commit()` but still try to parse 
the type id so we'd get behavior like https://godbolt.org/z/qv6e1Thj8 where we 
emit a source range which includes the subsequent type from the following line. 
In your test case there's no type there to parse so we get one of the "expected 
type" diagnostics. However, the new `Revert()` calls mean we revert the token 
stream back to before the tentative parse, so I think we're trying to parse the 
type name twice (hence the second diagnostic) and the source location we're 
looking for that type is still on the next line. So I think it's actually a bug 
with the patch that we're emitting the diagnostic twice, and some more 
investigation is needed.

https://github.com/llvm/llvm-project/pull/187370
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to