diff options
author | Congcong Cai <congcongcai0907@163.com> | 2023-04-25 23:08:28 +0200 |
---|---|---|
committer | Congcong Cai <congcongcai0907@163.com> | 2023-04-25 23:08:30 +0200 |
commit | 3333e12753ed9c27fc25c73858a990081b0ceb11 (patch) | |
tree | d16e458a677c3fd828efc5102cb7d9e0d4d49ada /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | f34ecb50e2c03e27b5785576545aab07b3b19a94 (diff) | |
download | llvm-3333e12753ed9c27fc25c73858a990081b0ceb11.zip llvm-3333e12753ed9c27fc25c73858a990081b0ceb11.tar.gz llvm-3333e12753ed9c27fc25c73858a990081b0ceb11.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions