Remove 'AnalysisContext::setDecl()', as we the Decl associated with an
AnalysisContext should never change. Along the way, propagate some constness
around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79701 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CheckObjCInstMethSignature.cpp b/lib/Analysis/CheckObjCInstMethSignature.cpp
index c208a7c..aae1e1d 100644
--- a/lib/Analysis/CheckObjCInstMethSignature.cpp
+++ b/lib/Analysis/CheckObjCInstMethSignature.cpp
@@ -36,10 +36,10 @@
return C.typesAreCompatible(Derived, Ancestor);
}
-static void CompareReturnTypes(ObjCMethodDecl* MethDerived,
- ObjCMethodDecl* MethAncestor,
- BugReporter& BR, ASTContext& Ctx,
- ObjCImplementationDecl* ID) {
+static void CompareReturnTypes(const ObjCMethodDecl *MethDerived,
+ const ObjCMethodDecl *MethAncestor,
+ BugReporter &BR, ASTContext &Ctx,
+ const ObjCImplementationDecl *ID) {
QualType ResDerived = MethDerived->getResultType();
QualType ResAncestor = MethAncestor->getResultType();
@@ -69,11 +69,11 @@
}
}
-void clang::CheckObjCInstMethSignature(ObjCImplementationDecl* ID,
+void clang::CheckObjCInstMethSignature(const ObjCImplementationDecl* ID,
BugReporter& BR) {
- ObjCInterfaceDecl* D = ID->getClassInterface();
- ObjCInterfaceDecl* C = D->getSuperClass();
+ const ObjCInterfaceDecl* D = ID->getClassInterface();
+ const ObjCInterfaceDecl* C = D->getSuperClass();
if (!C)
return;