Commit 29785cc
committed
[Clang] Don't retain template FoundDecl for conversion function calls
In consteval calls rewriting, we expect an instantiated AST to remain
untouched. However, this was not true when rebuilding a MemberExpr in
TreeTransform, as it relies on FoundDecl to build a resolved member
call expression. This is due to the fact that the instantiated
CXXMemberCallExpr still holds a template declaration as FoundDecl,
leading to a non-dependent-to-dependent transform.
I don't think it makes much sense to preserve a template in FoundDecl.
FoundDecl should primarily distinguish declarations whose
getUnderlyingDecl() points elsewhere, like UsingShadowDecl.1 parent 91edbe2 commit 29785cc
File tree
3 files changed
+36
-1
lines changed- clang
- docs
- lib/Sema
- test/SemaCXX
3 files changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
548 | 549 | | |
549 | 550 | | |
550 | 551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3977 | 3977 | | |
3978 | 3978 | | |
3979 | 3979 | | |
3980 | | - | |
| 3980 | + | |
3981 | 3981 | | |
3982 | 3982 | | |
3983 | 3983 | | |
| |||
14750 | 14750 | | |
14751 | 14751 | | |
14752 | 14752 | | |
| 14753 | + | |
| 14754 | + | |
| 14755 | + | |
| 14756 | + | |
| 14757 | + | |
| 14758 | + | |
14753 | 14759 | | |
14754 | 14760 | | |
14755 | 14761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1272 | 1272 | | |
1273 | 1273 | | |
1274 | 1274 | | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
0 commit comments