rsmith added inline comments.
================ Comment at: clang/lib/Parse/ParseDecl.cpp:7385 if (!ConsumeAndStoreInitializer(*DefArgToks, CIK_DefaultArgument)) { DefArgToks.reset(); + Diag(ArgStartLoc, diag::err_expected) << "initializer"; ---------------- I think we should just remove this `reset` call. That way, the tokens we've accumulated will get parsed when we come to later process the default argument, and we can produce the proper error at that time, such as diagnosing a missing `:`. That's what we do for default member initializers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148372/new/ https://reviews.llvm.org/D148372 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits