summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/CheckObjCInstMethSignature.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis/CheckObjCInstMethSignature.cpp')
-rw-r--r--clang/lib/Analysis/CheckObjCInstMethSignature.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Analysis/CheckObjCInstMethSignature.cpp b/clang/lib/Analysis/CheckObjCInstMethSignature.cpp
index 97e77cc50da..9fec7c1dc11 100644
--- a/clang/lib/Analysis/CheckObjCInstMethSignature.cpp
+++ b/clang/lib/Analysis/CheckObjCInstMethSignature.cpp
@@ -79,13 +79,15 @@ void clang::CheckObjCInstMethSignature(ObjCImplementationDecl* ID,
if (!C)
return;
+ ASTContext& Ctx = BR.getContext();
+
// Build a DenseMap of the methods for quick querying.
typedef llvm::DenseMap<Selector,ObjCMethodDecl*> MapTy;
MapTy IMeths;
unsigned NumMethods = 0;
- for (ObjCImplementationDecl::instmeth_iterator I=ID->instmeth_begin(),
- E=ID->instmeth_end(); I!=E; ++I) {
+ for (ObjCImplementationDecl::instmeth_iterator I=ID->instmeth_begin(Ctx),
+ E=ID->instmeth_end(Ctx); I!=E; ++I) {
ObjCMethodDecl* M = *I;
IMeths[M->getSelector()] = M;
@@ -94,8 +96,6 @@ void clang::CheckObjCInstMethSignature(ObjCImplementationDecl* ID,
// Now recurse the class hierarchy chain looking for methods with the
// same signatures.
- ASTContext& Ctx = BR.getContext();
-
while (C && NumMethods) {
for (ObjCInterfaceDecl::instmeth_iterator I=C->instmeth_begin(Ctx),
E=C->instmeth_end(Ctx); I!=E; ++I) {
OpenPOWER on IntegriCloud