llvm-project
83d3770d - [Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (#150592)

Commit
143 days ago
[Clang][AArch64] Remove unwarranted 'cannot be used in non-streaming mode' diagnostic. (#150592) 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`. This is loosely related to #94976 which removed a `FD->hasBody()` check in the same place, because `hasBody()` may incorrectly return `false` when Clang is still processing a function.
Author
Parents
Loading