Fixed: https://github.com/llvm/llvm-project/issues/62122
This change pointer to add diagnose message for this code.
struct S { static int F(int n = 0 ? 0) { return 0; } };
For default parameter, we should set it as unparsed even if meeting
syntax error because it should be issued in real parser time instead of
set is as invalid directly without diagnose.
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.