From cc305ee2225ab972d7f867aabd79d47b11758582 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 2 Sep 2016 18:31:31 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280520 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaOverload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 36643812b0..7b03a62be1 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -12993,8 +12993,8 @@ Expr *Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found, // Replace the resulting type information before rebuilding the generic // selection expression. - SmallVector AssocExprs(GSE->getAssocExprs().begin(), - GSE->getAssocExprs().end()); + ArrayRef A = GSE->getAssocExprs(); + SmallVector AssocExprs(A.begin(), A.end()); unsigned ResultIdx = GSE->getResultIndex(); AssocExprs[ResultIdx] = SubExpr; -- 2.40.0