From 196dbb027d5f706cd28bf0d623e332bd642a649b Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Wed, 25 May 2016 05:42:00 +0000 Subject: [PATCH] Rename a variable to avoid shadowing function parameter. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270666 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/AnalysisBasedWarnings.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp index eb45315a31..a43513530e 100644 --- a/lib/Sema/AnalysisBasedWarnings.cpp +++ b/lib/Sema/AnalysisBasedWarnings.cpp @@ -1322,27 +1322,27 @@ static void diagnoseRepeatedUseOfWeak(Sema &S, Ivar } ObjectKind; - const NamedDecl *D = Key.getProperty(); - if (isa(D)) + const NamedDecl *KeyProp = Key.getProperty(); + if (isa(KeyProp)) ObjectKind = Variable; - else if (isa(D)) + else if (isa(KeyProp)) ObjectKind = Property; - else if (isa(D)) + else if (isa(KeyProp)) ObjectKind = ImplicitProperty; - else if (isa(D)) + else if (isa(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(D)) + if (const ObjCPropertyDecl *Prop = dyn_cast(KeyProp)) if (Prop->hasAttr()) 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. -- 2.40.0