This repository was archived by the owner on Nov 1, 2021. It is now read-only.
File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4061,19 +4061,22 @@ bool Sema::GatherArgumentsForCall(SourceLocation CallLoc,
4061
4061
Param = FDecl->getParamDecl(i);
4062
4062
4063
4063
// Strip the unbridged-cast placeholder expression off, if applicable.
4064
+ bool CFAudited = false;
4064
4065
if (Arg->getType() == Context.ARCUnbridgedCastTy &&
4065
4066
FDecl && FDecl->hasAttr<CFAuditedTransferAttr>() &&
4066
4067
(!Param || !Param->hasAttr<CFConsumedAttr>()))
4067
4068
Arg = stripARCUnbridgedCast(Arg);
4069
+ else if (FDecl && FDecl->hasAttr<CFAuditedTransferAttr>() &&
4070
+ (!Param || !Param->hasAttr<CFConsumedAttr>()))
4071
+ CFAudited = true;
4068
4072
4069
4073
InitializedEntity Entity = Param ?
4070
4074
InitializedEntity::InitializeParameter(Context, Param, ProtoArgType)
4071
4075
: InitializedEntity::InitializeParameter(Context, ProtoArgType,
4072
4076
Proto->isArgConsumed(i));
4073
4077
4074
4078
// Remember that parameter belongs to a CF audited API.
4075
- if (FDecl && FDecl->hasAttr<CFAuditedTransferAttr>() &&
4076
- (!Param || !Param->hasAttr<CFConsumedAttr>()))
4079
+ if (CFAudited)
4077
4080
Entity.setParameterCFAudited();
4078
4081
4079
4082
ExprResult ArgE = PerformCopyInitialization(Entity,
You can’t perform that action at this time.
0 commit comments