Commit 584e431
authored
[Clang][Sema] Treat explicit specializations of static data member templates declared without 'static' as static data members when diagnosing uses of 'auto' (llvm#97425)
After llvm#93873 clang no longer permits declarations of explicit
specializations of static data member templates to use the `auto`
_placeholder-type-specifier_:
```
struct A {
template<int N>
static constexpr auto x = 0;
template<>
constexpr auto x<1> = 1; // error: 'auto' not allowed in non-static struct member
};
```
This patch fixes the issue.1 parent 3ab2247 commit 584e431
File tree
2 files changed
+13
-2
lines changed- clang
- lib/Sema
- test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3194 | 3194 | | |
3195 | 3195 | | |
3196 | 3196 | | |
3197 | | - | |
3198 | | - | |
| 3197 | + | |
3199 | 3198 | | |
3200 | 3199 | | |
3201 | 3200 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments