[all-commits] [llvm/llvm-project] 3333e1: [clang] add diagnose when member function contains...
Congcong Cai via All-commits
all-commits at lists.llvm.org
Tue Apr 25 14:08:55 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3333e12753ed9c27fc25c73858a990081b0ceb11
https://github.com/llvm/llvm-project/commit/3333e12753ed9c27fc25c73858a990081b0ceb11
Author: Congcong Cai <congcongcai0907 at 163.com>
Date: 2023-04-25 (Tue, 25 Apr 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Parse/ParseDecl.cpp
M clang/test/Parser/cxx-member-initializers.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list