Commit cc1b666
committed
[Clang] Fix member lookup so that we don't ignore ambiguous lookups in some cases
There are some cases during member lookup we are aggressively suppressing
diagnostics when we should just be suppressing access control diagnostic.
In this PR I add the ability to simply suppress access diagnostics while not
suppressing ambiguous lookup diagnostics.
Fixes: llvm#22413
llvm#29942
llvm#35574
llvm#27224
Differential Revision: https://reviews.llvm.org/D1553871 parent 63f8922 commit cc1b666
File tree
7 files changed
+113
-38
lines changed- clang
- docs
- include/clang/Sema
- lib/Sema
- test
- CXX/class.derived/class.member.lookup
- SemaCXX
7 files changed
+113
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
158 | | - | |
159 | | - | |
| 159 | + | |
| 160 | + | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | | - | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | | - | |
| 197 | + | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
200 | | - | |
| 203 | + | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
| |||
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
218 | | - | |
| 222 | + | |
| 223 | + | |
219 | 224 | | |
220 | 225 | | |
221 | 226 | | |
222 | 227 | | |
223 | | - | |
| 228 | + | |
| 229 | + | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
228 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
229 | 238 | | |
230 | 239 | | |
231 | 240 | | |
| |||
607 | 616 | | |
608 | 617 | | |
609 | 618 | | |
610 | | - | |
| 619 | + | |
| 620 | + | |
611 | 621 | | |
612 | 622 | | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
617 | 633 | | |
618 | 634 | | |
619 | 635 | | |
| |||
726 | 742 | | |
727 | 743 | | |
728 | 744 | | |
729 | | - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
730 | 751 | | |
731 | 752 | | |
732 | | - | |
733 | | - | |
734 | 753 | | |
735 | 754 | | |
736 | 755 | | |
| |||
776 | 795 | | |
777 | 796 | | |
778 | 797 | | |
779 | | - | |
| 798 | + | |
| 799 | + | |
780 | 800 | | |
781 | 801 | | |
782 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
953 | | - | |
| 953 | + | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| |||
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
964 | | - | |
| 964 | + | |
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
| |||
7987 | 7987 | | |
7988 | 7988 | | |
7989 | 7989 | | |
7990 | | - | |
| 7990 | + | |
7991 | 7991 | | |
7992 | 7992 | | |
7993 | 7993 | | |
| |||
14983 | 14983 | | |
14984 | 14984 | | |
14985 | 14985 | | |
14986 | | - | |
| 14986 | + | |
14987 | 14987 | | |
14988 | 14988 | | |
14989 | 14989 | | |
| |||
15080 | 15080 | | |
15081 | 15081 | | |
15082 | 15082 | | |
15083 | | - | |
15084 | | - | |
15085 | | - | |
15086 | | - | |
15087 | | - | |
15088 | | - | |
| 15083 | + | |
| 15084 | + | |
| 15085 | + | |
| 15086 | + | |
| 15087 | + | |
| 15088 | + | |
| 15089 | + | |
15089 | 15090 | | |
15090 | 15091 | | |
15091 | 15092 | | |
| |||
15248 | 15249 | | |
15249 | 15250 | | |
15250 | 15251 | | |
15251 | | - | |
| 15252 | + | |
15252 | 15253 | | |
15253 | 15254 | | |
15254 | 15255 | | |
| |||
15289 | 15290 | | |
15290 | 15291 | | |
15291 | 15292 | | |
15292 | | - | |
15293 | | - | |
15294 | | - | |
15295 | | - | |
15296 | | - | |
| 15293 | + | |
| 15294 | + | |
| 15295 | + | |
| 15296 | + | |
| 15297 | + | |
| 15298 | + | |
15297 | 15299 | | |
15298 | 15300 | | |
15299 | 15301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| |||
Lines changed: 19 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 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
0 commit comments