================ @@ -738,16 +738,47 @@ Parser::DeclGroupPtrTy Parser::ParseUsingDeclaration( return nullptr; } - if (!Tok.is(tok::identifier)) { + Decl *UED = nullptr; + + if (Tok.is(tok::identifier)) { ---------------- cor3ntin wrote:
This assumes that only 2 scenario will occur: * Either there is an already annotated template * Or the identifier is not part of a simple-template-id I am not sure that is correct. ie there is scenario where we find a `tok::less` after the identifier. I'd like to understand exactly what happens, in particular: * Whether that scenario can ever happen (and we should assert otherwise) * What's the difference between this code and `ParseBaseTypeSpecifier`: Either we can remove a lot of code from `ParseBaseTypeSpecifier`, or factorize both functions Afaict, we always get an annotation because `ParseOptionalCXXScopeSpecifier` annotates. but that should be the case in `ParseBaseTypeSpecifier` too/ https://github.com/llvm/llvm-project/pull/95399 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits