================
@@ -3455,9 +3454,12 @@ void
Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
if (Func->getNumParams() == Params.size()) {
llvm::SmallVector<QualType, 3> FuncParams;
for (auto *P : Func->parameters())
- FuncParams.push_back(
- Context.getCanonicalType(P->getType().getUnqualifiedType()));
- if (llvm::ArrayRef(FuncParams) == Params) {
+ FuncParams.push_back(P->getType().getUnqualifiedType());
+ if (std::equal(FuncParams.begin(), FuncParams.end(), Params.begin(),
+ Params.end(), [&](auto <, auto &RT) {
+ return Context.getCanonicalType(LT) ==
+ Context.getCanonicalType(RT);
+ })) {
----------------
mizvekov wrote:
QualType is a pointer sized trivially copyable type, we avoid passing such
lightweight types as references.
https://github.com/llvm/llvm-project/pull/143653
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits