adamcz added inline comments.
================ Comment at: clang/lib/Parse/ParseDeclCXX.cpp:2987 + if (ThisDecl) + ThisDecl->setInvalidDecl(); SkipUntil(tok::comma, StopAtSemi | StopBeforeMatch); ---------------- hokein wrote: > it seems to me calling `Sema::ActOnInitializerError(ThisDecl)` is a better > fit, rather than invalidating the decl once the initializer is failed to > parse, for example `static const int Member = ;` we want to keep the decl > valid. Amusingly, this change led me to discover https://bugs.llvm.org/show_bug.cgi?id=36064, which seems like the same issue, only solved for a very specific example. I had to update the test for that, since now we solve it more generically and thus error messages are different. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105478/new/ https://reviews.llvm.org/D105478 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits