summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-05-24 01:35:07 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-05-24 01:35:07 +0000
commit8458c9ef42390b3042765c33b09b4ade0e9c22fc (patch)
tree9c9a4e9bebc65078ddc4e3173b22f4356997d906 /clang/lib/Sema/SemaOverload.cpp
parent1293de8b1733e85d13960c150b86a1fe3813ae3f (diff)
downloadbcm5719-llvm-8458c9ef42390b3042765c33b09b4ade0e9c22fc.tar.gz
bcm5719-llvm-8458c9ef42390b3042765c33b09b4ade0e9c22fc.zip
Factor out repeated code to build 'this' expressions and mark them
referenced. llvm-svn: 361588
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index eadc01e5efb..e5cbd1d0a81 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -13910,10 +13910,8 @@ Expr *Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found,
SourceLocation Loc = MemExpr->getMemberLoc();
if (MemExpr->getQualifier())
Loc = MemExpr->getQualifierLoc().getBeginLoc();
- CheckCXXThisCapture(Loc);
- Base = new (Context) CXXThisExpr(Loc,
- MemExpr->getBaseType(),
- /*isImplicit=*/true);
+ Base =
+ BuildCXXThisExpr(Loc, MemExpr->getBaseType(), /*isImplicit=*/true);
}
} else
Base = MemExpr->getBase();
OpenPOWER on IntegriCloud