Commit 1f6727c
committed
[clang] OpenMP: fix variant template mismatch crash
This ammends the fix commited in https://reviews.llvm.org/D109770 /
6cf6fa6
Comparing the number of template parameter lists with the number of
template parameters is obviously wrong.
Even then, the number of parameters being the same doesn't mean
the templates are compatible.
This change compares if the template parameters are actually equivalent.
This fixes the crash, but I am not sure what is the design and intention
here, this openmp template support looks too fragile.
The added test case still doesn't work, but at least we don't crash now.1 parent 63ca2fd commit 1f6727c
File tree
2 files changed
+15
-1
lines changed- clang
- lib/Sema
- test/SemaOpenMP
2 files changed
+15
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7246 | 7246 | | |
7247 | 7247 | | |
7248 | 7248 | | |
7249 | | - | |
| 7249 | + | |
| 7250 | + | |
| 7251 | + | |
7250 | 7252 | | |
7251 | 7253 | | |
7252 | 7254 | | |
| |||
Lines changed: 12 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 | + | |
0 commit comments