hokein wrote:

> @pranavk see #98613.
> 
> edit: sorry, the error recovery that is currently performed will not detect 
> cases where the template argument list does not contain a a type. i can look 
> into this monday.

Some analysis:

given the example `this->StorageT<I>` where `I` is an `int`, the error recovery 
mechanism uses `isTemplateArgumentList` 
[here](https://github.com/llvm/llvm-project/blob/main/clang/lib/Parse/ParseExprCXX.cpp#L563)
 to check if the current token sequence `< I >` forms a `< 
template-argument-list >`. However, since `I` is an expression, this becomes an 
ambiguous caseā€”it could be interpreted as a less than comparison. Consequently, 
the error recovery doesn't activate for this case, and a hard error is emitted.

We might be able to tweak or improve the heuristic, but I don't have a good 
idea for an easy fix.

https://github.com/llvm/llvm-project/pull/98547
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to