================ @@ -15071,6 +15071,13 @@ ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc, T = Context.getLifetimeQualifiedType(T, lifetime); } + if (T->isFunctionType() && !T.isReferenceable()) { + Diag(NameLoc, diag::err_compound_qualified_function_type) + << 1 << true << T + << T->castAs<FunctionProtoType>()->getFunctionQualifiersAsString(); + return nullptr; + } + ---------------- cor3ntin wrote:
We have similar logic thorough this PR, having a function like `DiagnoseUnreferenceableFunctionTypes would be nice` https://github.com/llvm/llvm-project/pull/90353 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits