Skip to content
Commit 3333e127 authored by Congcong Cai's avatar Congcong Cai
Browse files

[clang] add diagnose when member function contains invalid default argument

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.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D148372
parent f34ecb50
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment