Skip to content

Commit 075fc7d

Browse files
authored
Merge pull request #82709 from bnbarham/6.2-dangling-reference
[6.2][ClangImporter] Fix dangling reference
2 parents 305125d + 7df095f commit 075fc7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ClangImporter/ClangDerivedConformances.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,8 @@ instantiateTemplatedOperator(ClangImporter::Implementation &impl,
265265
classDecl->getLocation(), clang::OverloadCandidateSet::CSK_Operator,
266266
clang::OverloadCandidateSet::OperatorRewriteInfo(opKind,
267267
clang::SourceLocation(), false));
268-
clangSema.LookupOverloadedBinOp(candidateSet, opKind, ops, {arg, arg}, true);
268+
std::array<clang::Expr *, 2> args{arg, arg};
269+
clangSema.LookupOverloadedBinOp(candidateSet, opKind, ops, args, true);
269270

270271
clang::OverloadCandidateSet::iterator best;
271272
switch (candidateSet.BestViableFunction(clangSema, clang::SourceLocation(),

0 commit comments

Comments
 (0)