forked from OSchip/llvm-project
Rename a variable to avoid shadowing function parameter. NFC.
llvm-svn: 270666
This commit is contained in:
parent
f4f54e3178
commit
34cc8eb307
|
@ -1322,27 +1322,27 @@ static void diagnoseRepeatedUseOfWeak(Sema &S,
|
||||||
Ivar
|
Ivar
|
||||||
} ObjectKind;
|
} ObjectKind;
|
||||||
|
|
||||||
const NamedDecl *D = Key.getProperty();
|
const NamedDecl *KeyProp = Key.getProperty();
|
||||||
if (isa<VarDecl>(D))
|
if (isa<VarDecl>(KeyProp))
|
||||||
ObjectKind = Variable;
|
ObjectKind = Variable;
|
||||||
else if (isa<ObjCPropertyDecl>(D))
|
else if (isa<ObjCPropertyDecl>(KeyProp))
|
||||||
ObjectKind = Property;
|
ObjectKind = Property;
|
||||||
else if (isa<ObjCMethodDecl>(D))
|
else if (isa<ObjCMethodDecl>(KeyProp))
|
||||||
ObjectKind = ImplicitProperty;
|
ObjectKind = ImplicitProperty;
|
||||||
else if (isa<ObjCIvarDecl>(D))
|
else if (isa<ObjCIvarDecl>(KeyProp))
|
||||||
ObjectKind = Ivar;
|
ObjectKind = Ivar;
|
||||||
else
|
else
|
||||||
llvm_unreachable("Unexpected weak object kind!");
|
llvm_unreachable("Unexpected weak object kind!");
|
||||||
|
|
||||||
// Do not warn about IBOutlet weak property receivers being set to null
|
// Do not warn about IBOutlet weak property receivers being set to null
|
||||||
// since they are typically only used from the main thread.
|
// since they are typically only used from the main thread.
|
||||||
if (const ObjCPropertyDecl *Prop = dyn_cast<ObjCPropertyDecl>(D))
|
if (const ObjCPropertyDecl *Prop = dyn_cast<ObjCPropertyDecl>(KeyProp))
|
||||||
if (Prop->hasAttr<IBOutletAttr>())
|
if (Prop->hasAttr<IBOutletAttr>())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Show the first time the object was read.
|
// Show the first time the object was read.
|
||||||
S.Diag(FirstRead->getLocStart(), DiagKind)
|
S.Diag(FirstRead->getLocStart(), DiagKind)
|
||||||
<< int(ObjectKind) << D << int(FunctionKind)
|
<< int(ObjectKind) << KeyProp << int(FunctionKind)
|
||||||
<< FirstRead->getSourceRange();
|
<< FirstRead->getSourceRange();
|
||||||
|
|
||||||
// Print all the other accesses as notes.
|
// Print all the other accesses as notes.
|
||||||
|
|
Loading…
Reference in New Issue