Commit d4f0f43
authored
[Clang] Fix the access checking for non-aggregates in default arguments (llvm#141207)
We check the accessibility of constructors when initializing a default
argument whose type is not an aggregate.
Make sure the check is performed within the correct DeclContext.
Otherwise, it will be delayed until the end of the declaration, at which
point the context is mismatched.
Fixes llvm#62444
Fixes llvm#836081 parent 989aadf commit d4f0f43
File tree
3 files changed
+54
-7
lines changed- clang
- docs
- lib/Sema
- test/SemaCXX
3 files changed
+54
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| 797 | + | |
797 | 798 | | |
798 | 799 | | |
799 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3340 | 3340 | | |
3341 | 3341 | | |
3342 | 3342 | | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
3343 | 3348 | | |
3344 | | - | |
3345 | | - | |
3346 | | - | |
3347 | | - | |
3348 | | - | |
3349 | | - | |
| 3349 | + | |
3350 | 3350 | | |
3351 | 3351 | | |
3352 | 3352 | | |
3353 | 3353 | | |
3354 | 3354 | | |
3355 | 3355 | | |
3356 | 3356 | | |
3357 | | - | |
| 3357 | + | |
3358 | 3358 | | |
3359 | 3359 | | |
3360 | 3360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments