================
@@ -1136,6 +1136,20 @@ void Parser::AnnotateExistingDecltypeSpecifier(const
DeclSpec &DS,
// make sure we have a token we can turn into an annotation token
if (PP.isBacktrackEnabled()) {
PP.RevertCachedTokens(1);
+ if (DS.getTypeSpecType() == TST_error && PP.hasCachedTokenLocation()) {
----------------
AaronBallman wrote:
Why are we calling the annotation function at all if we have an invalid
`DeclSpec`?
Have you tried fixing it from
https://github.com/llvm/llvm-project/blob/aab7e0b08d30ddca5858069a4c14c1ea3da042e6/clang/lib/Parse/ParseExprCXX.cpp#L175
so we emit the diagnostic but don't try to handle it as a nested name
specifier?
https://github.com/llvm/llvm-project/pull/211221
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits