Commit e8aa8ab
committed
[Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic.
Previously Clang would give an unwarranted error on the capture of '&a'
in the function below, even though the parent function and the lambda
are both `__arm_streaming` functions, when the target is compiled with
+sme only.
void test_both_streaming(int32_t *out) __arm_streaming {
svint32_t a;
[&a, &out]() __arm_streaming {
^
error: SVE vector type 'svint32_t' (aka '__SVInt32_t') cannot be used in a non-streaming function
a = svdup_s32(1);
svst1(svptrue_b32(), out, a);
}();
}
That seems to happen because when `checkTypeSupport` is called
the `FunctionDecl` context of the lambda isn't yet complete and
`FD->getType()` returns a Null `QualTy`.1 parent deced28 commit e8aa8ab
File tree
3 files changed
+36
-8
lines changed- clang
- lib
- AST
- Sema
- test/Sema
3 files changed
+36
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5988 | 5988 | | |
5989 | 5989 | | |
5990 | 5990 | | |
5991 | | - | |
5992 | | - | |
5993 | | - | |
5994 | | - | |
5995 | | - | |
| 5991 | + | |
| 5992 | + | |
| 5993 | + | |
5996 | 5994 | | |
5997 | 5995 | | |
5998 | 5996 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2251 | 2251 | | |
2252 | 2252 | | |
2253 | 2253 | | |
2254 | | - | |
| 2254 | + | |
2255 | 2255 | | |
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
2259 | 2259 | | |
2260 | 2260 | | |
2261 | | - | |
| 2261 | + | |
2262 | 2262 | | |
2263 | | - | |
2264 | 2263 | | |
2265 | 2264 | | |
2266 | 2265 | | |
| |||
| 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 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments