Commit e0be589
committed
[clang] Fix issue with FoldingSet and DependentTemplateSpecializationType
PR llvm#118288 fixed a re-entrancy issue with the usage of `FoldingSet`
and `AutoType`. The following test case (reduced with `creduce` by
@Fznamznon):
```
template <typename C, typename S1, int rbits>
typename C::A Bar(const S1& x, const C& c = C()) {
using T = typename C::A;
T result;
using PreC = typename C::template boop<T::p + rbits>;
using ExactC = typename C::template bap<PreC::p + 2>;
using D = typename ExactC::A;
return result;
}
```
shows a similar non-deterministic recursion with the use of
`FoldingSet` but with `DependentTemplateSepcializationType`.
A nearly identical fix is needed here too.1 parent fd8f69d commit e0be589
File tree
4 files changed
+29
-16
lines changed- clang
- include/clang/AST
- lib/AST
- test/Parser
4 files changed
+29
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7276 | 7276 | | |
7277 | 7277 | | |
7278 | 7278 | | |
7279 | | - | |
7280 | | - | |
| 7279 | + | |
7281 | 7280 | | |
7282 | 7281 | | |
7283 | 7282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
944 | 943 | | |
945 | 944 | | |
946 | 945 | | |
| |||
5979 | 5978 | | |
5980 | 5979 | | |
5981 | 5980 | | |
5982 | | - | |
5983 | | - | |
5984 | | - | |
5985 | | - | |
| 5981 | + | |
| 5982 | + | |
| 5983 | + | |
5986 | 5984 | | |
5987 | 5985 | | |
5988 | 5986 | | |
| |||
6001 | 5999 | | |
6002 | 6000 | | |
6003 | 6001 | | |
6004 | | - | |
6005 | | - | |
6006 | | - | |
6007 | | - | |
6008 | | - | |
6009 | 6002 | | |
6010 | 6003 | | |
6011 | 6004 | | |
| |||
6021 | 6014 | | |
6022 | 6015 | | |
6023 | 6016 | | |
| 6017 | + | |
| 6018 | + | |
| 6019 | + | |
| 6020 | + | |
| 6021 | + | |
6024 | 6022 | | |
6025 | | - | |
| 6023 | + | |
6026 | 6024 | | |
6027 | 6025 | | |
6028 | 6026 | | |
| |||
| 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 | + | |
0 commit comments