Author: aaronballman Date: Fri Sep 2 13:31:31 2016 New Revision: 280520 URL: http://llvm.org/viewvc/llvm-project?rev=280520&view=rev Log: Based on post-commit feedback over IRC with dblaikie, ideally, we should have a SmallVector constructor that accepts anything which can supply a range via ADL begin()/end() calls so that we can construct the SmallVector directly from anything range-like.
Since that doesn't exist right now, use a local variable instead of calling getAssocExprs() twice; NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=280520&r1=280519&r2=280520&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaOverload.cpp (original) +++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Sep 2 13:31:31 2016 @@ -12993,8 +12993,8 @@ Expr *Sema::FixOverloadedFunctionReferen // Replace the resulting type information before rebuilding the generic // selection expression. - SmallVector<Expr *, 4> AssocExprs(GSE->getAssocExprs().begin(), - GSE->getAssocExprs().end()); + ArrayRef<Expr *> A = GSE->getAssocExprs(); + SmallVector<Expr *, 4> AssocExprs(A.begin(), A.end()); unsigned ResultIdx = GSE->getResultIndex(); AssocExprs[ResultIdx] = SubExpr; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits