Commit 1cd7eb4
committed
[Clang] Fix an iterator invalidation bug in concept normalization cache
The NormalizationCache may be inserted recursively when normalizing
template arguments with non-dependent default arguments. Since the ADT
doesn't preserve iterator validity, this caused undefined behavior.
We convert it std::map where the insert operation doesn't invalidate
iterators.1 parent 76e2963 commit 1cd7eb4
File tree
2 files changed
+27
-1
lines changed- clang
- include/clang/Sema
- test/SemaTemplate
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14941 | 14941 | | |
14942 | 14942 | | |
14943 | 14943 | | |
14944 | | - | |
| 14944 | + | |
14945 | 14945 | | |
14946 | 14946 | | |
14947 | 14947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
0 commit comments