aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-02-05 19:37:40 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-02-05 19:37:40 +0000
commitb3090384227bf61f889b6aaf4230eccaacc85514 (patch)
tree6d36474d5d489e49c094ba806b8b9a65309592bc /lib/Sema/TreeTransform.h
parent123063377428540752bad91c7fbd536a762e31bd (diff)
downloadsrc-b3090384227bf61f889b6aaf4230eccaacc85514.tar.gz
src-b3090384227bf61f889b6aaf4230eccaacc85514.zip
Vendor import of clang release_40 branch r294123:vendor/clang/clang-release_40-r294123
Notes
Notes: svn path=/vendor/clang/dist/; revision=313291 svn path=/vendor/clang/clang-release_40-r294123/; revision=313292; tag=vendor/clang/clang-release_40-r294123
Diffstat (limited to 'lib/Sema/TreeTransform.h')
-rw-r--r--lib/Sema/TreeTransform.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 4388ad34e21b..f8e65a119c3c 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -2932,16 +2932,17 @@ public:
ExprResult RebuildObjCIvarRefExpr(Expr *BaseArg, ObjCIvarDecl *Ivar,
SourceLocation IvarLoc,
bool IsArrow, bool IsFreeIvar) {
- // FIXME: We lose track of the IsFreeIvar bit.
CXXScopeSpec SS;
DeclarationNameInfo NameInfo(Ivar->getDeclName(), IvarLoc);
- return getSema().BuildMemberReferenceExpr(BaseArg, BaseArg->getType(),
- /*FIXME:*/IvarLoc, IsArrow,
- SS, SourceLocation(),
- /*FirstQualifierInScope=*/nullptr,
- NameInfo,
- /*TemplateArgs=*/nullptr,
- /*S=*/nullptr);
+ ExprResult Result = getSema().BuildMemberReferenceExpr(
+ BaseArg, BaseArg->getType(),
+ /*FIXME:*/ IvarLoc, IsArrow, SS, SourceLocation(),
+ /*FirstQualifierInScope=*/nullptr, NameInfo,
+ /*TemplateArgs=*/nullptr,
+ /*S=*/nullptr);
+ if (IsFreeIvar && Result.isUsable())
+ cast<ObjCIvarRefExpr>(Result.get())->setIsFreeIvar(IsFreeIvar);
+ return Result;
}
/// \brief Build a new Objective-C property reference expression.