diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-09-02 18:31:31 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-09-02 18:31:31 +0000 |
commit | 8b871d96d780b23fd082e2df264a84e7c0cc9d63 (patch) | |
tree | cb6a7ec55d5e90f6b30897b4ab064d17304a63b6 | |
parent | 5c32d5ef0d6cdb92666f75fe7b44b8f74c362564 (diff) | |
download | bcm5719-llvm-8b871d96d780b23fd082e2df264a84e7c0cc9d63.tar.gz bcm5719-llvm-8b871d96d780b23fd082e2df264a84e7c0cc9d63.zip |
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.
llvm-svn: 280520
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 36643812b02..7b03a62be12 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/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<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; |