summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-06-04 21:29:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-06-04 21:29:28 +0000
commitc32ef4bc0b17f79d96b672143d5e5fba9e39ea8d (patch)
treea0036f1fb40d62d882f4a7f7ab7b1bdb882a5375 /clang/lib/Sema/SemaExprCXX.cpp
parent8362518c6e51476a97f429477949c6d60d12d9bb (diff)
downloadbcm5719-llvm-c32ef4bc0b17f79d96b672143d5e5fba9e39ea8d.tar.gz
bcm5719-llvm-c32ef4bc0b17f79d96b672143d5e5fba9e39ea8d.zip
Convert MemberExpr creation and serialization to work the same way as
most / all other Expr subclasses. llvm-svn: 362551
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 1eb6a7114ff..c42d272a345 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -7189,9 +7189,12 @@ ExprResult Sema::BuildCXXMemberCallExpr(Expr *E, NamedDecl *FoundDecl,
}
}
- MemberExpr *ME = new (Context) MemberExpr(
- Exp.get(), /*IsArrow=*/false, SourceLocation(), Method, SourceLocation(),
- Context.BoundMemberTy, VK_RValue, OK_Ordinary);
+ MemberExpr *ME = MemberExpr::Create(
+ Context, Exp.get(), /*IsArrow=*/false, SourceLocation(),
+ NestedNameSpecifierLoc(), SourceLocation(), Method,
+ DeclAccessPair::make(FoundDecl, FoundDecl->getAccess()),
+ DeclarationNameInfo(), /*TemplateArgs=*/nullptr, Context.BoundMemberTy,
+ VK_RValue, OK_Ordinary);
if (HadMultipleCandidates)
ME->setHadMultipleCandidates(true);
MarkMemberReferenced(ME);
OpenPOWER on IntegriCloud