]> granicus.if.org Git - clang/commitdiff
Rename a variable to avoid shadowing function parameter. NFC.
authorBob Wilson <bob.wilson@apple.com>
Wed, 25 May 2016 05:42:00 +0000 (05:42 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 25 May 2016 05:42:00 +0000 (05:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270666 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/AnalysisBasedWarnings.cpp

index eb45315a31a9d24c04a537665af8e07fc469e5f0..a43513530e733306fd5ecd7125a18444da189af5 100644 (file)
@@ -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.