summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2016-05-25 05:42:00 +0000
committerBob Wilson <bob.wilson@apple.com>2016-05-25 05:42:00 +0000
commit34cc8eb307d7f03dc508390b53146c387dc5e0be (patch)
treedbc759bfd01ba00a69560f98b80af4678ec34eae
parentf4f54e3178661e1cd352ac47fcd92b835ad0ed96 (diff)
downloadbcm5719-llvm-34cc8eb307d7f03dc508390b53146c387dc5e0be.tar.gz
bcm5719-llvm-34cc8eb307d7f03dc508390b53146c387dc5e0be.zip
Rename a variable to avoid shadowing function parameter. NFC.
llvm-svn: 270666
-rw-r--r--clang/lib/Sema/AnalysisBasedWarnings.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Sema/AnalysisBasedWarnings.cpp b/clang/lib/Sema/AnalysisBasedWarnings.cpp
index eb45315a31a..a43513530e7 100644
--- a/clang/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/clang/lib/Sema/AnalysisBasedWarnings.cpp
@@ -1322,27 +1322,27 @@ static void diagnoseRepeatedUseOfWeak(Sema &S,
Ivar
} ObjectKind;
- const NamedDecl *D = Key.getProperty();
- if (isa<VarDecl>(D))
+ const NamedDecl *KeyProp = Key.getProperty();
+ if (isa<VarDecl>(KeyProp))
ObjectKind = Variable;
- else if (isa<ObjCPropertyDecl>(D))
+ else if (isa<ObjCPropertyDecl>(KeyProp))
ObjectKind = Property;
- else if (isa<ObjCMethodDecl>(D))
+ else if (isa<ObjCMethodDecl>(KeyProp))
ObjectKind = ImplicitProperty;
- else if (isa<ObjCIvarDecl>(D))
+ else if (isa<ObjCIvarDecl>(KeyProp))
ObjectKind = Ivar;
else
llvm_unreachable("Unexpected weak object kind!");
// Do not warn about IBOutlet weak property receivers being set to null
// 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>())
continue;
// Show the first time the object was read.
S.Diag(FirstRead->getLocStart(), DiagKind)
- << int(ObjectKind) << D << int(FunctionKind)
+ << int(ObjectKind) << KeyProp << int(FunctionKind)
<< FirstRead->getSourceRange();
// Print all the other accesses as notes.
OpenPOWER on IntegriCloud