Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/SemaObjCProperty.cpp
Show First 20 Lines • Show All 1,461 Lines • ▼ Show 20 Lines | if (getLangOpts().CPlusPlus && Synthesize && !CompleteTypeErr && | ||||
Expr *IvarRefExpr = | Expr *IvarRefExpr = | ||||
new (Context) ObjCIvarRefExpr(Ivar, | new (Context) ObjCIvarRefExpr(Ivar, | ||||
Ivar->getUsageType(SelfDecl->getType()), | Ivar->getUsageType(SelfDecl->getType()), | ||||
PropertyDiagLoc, | PropertyDiagLoc, | ||||
Ivar->getLocation(), | Ivar->getLocation(), | ||||
LoadSelfExpr, true, true); | LoadSelfExpr, true, true); | ||||
ExprResult Res = PerformCopyInitialization( | ExprResult Res = PerformCopyInitialization( | ||||
InitializedEntity::InitializeResult(PropertyDiagLoc, | InitializedEntity::InitializeResult(PropertyDiagLoc, | ||||
getterMethod->getReturnType(), | getterMethod->getReturnType()), | ||||
/*NRVO=*/false), | |||||
PropertyDiagLoc, IvarRefExpr); | PropertyDiagLoc, IvarRefExpr); | ||||
if (!Res.isInvalid()) { | if (!Res.isInvalid()) { | ||||
Expr *ResExpr = Res.getAs<Expr>(); | Expr *ResExpr = Res.getAs<Expr>(); | ||||
if (ResExpr) | if (ResExpr) | ||||
ResExpr = MaybeCreateExprWithCleanups(ResExpr); | ResExpr = MaybeCreateExprWithCleanups(ResExpr); | ||||
PIDecl->setGetterCXXConstructor(ResExpr); | PIDecl->setGetterCXXConstructor(ResExpr); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,345 Lines • Show Last 20 Lines |