From: Ted Kremenek Date: Fri, 22 Oct 2010 22:08:29 +0000 (+0000) Subject: Fix '-analyzer-display-progress' for Objective-C methods. Also remove obsolete code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35fa76d0bb6fb8c86159a7506efd094a4fe376d2;p=clang Fix '-analyzer-display-progress' for Objective-C methods. Also remove obsolete code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117161 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/AnalysisConsumer.cpp b/lib/Checker/AnalysisConsumer.cpp index 94bce40c18..f902124613 100644 --- a/lib/Checker/AnalysisConsumer.cpp +++ b/lib/Checker/AnalysisConsumer.cpp @@ -153,6 +153,10 @@ public: llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:" << Loc.getColumn() << '\n'; } + else if (const ObjCMethodDecl *MD = dyn_cast(D)) { + Selector S = MD->getSelector(); + llvm::errs() << ' ' << S.getAsString(); + } } void addCodeAction(CodeAction action) { @@ -218,19 +222,6 @@ void AnalysisConsumer::HandleTranslationUnit(ASTContext &C) { break; } - case Decl::ObjCMethod: { - ObjCMethodDecl* MD = cast(D); - - if (MD->isThisDeclarationADefinition()) { - if (!Opts.AnalyzeSpecificFunction.empty() && - Opts.AnalyzeSpecificFunction != MD->getSelector().getAsString()) - break; - DisplayFunction(MD); - HandleCode(MD, ObjCMethodActions); - } - break; - } - case Decl::ObjCImplementation: { ObjCImplementationDecl* ID = cast(*I); HandleCode(ID, ObjCImplementationActions); @@ -241,6 +232,7 @@ void AnalysisConsumer::HandleTranslationUnit(ASTContext &C) { if (!Opts.AnalyzeSpecificFunction.empty() && Opts.AnalyzeSpecificFunction != (*MI)->getSelector().getAsString()) break; + DisplayFunction(*MI); HandleCode(*MI, ObjCMethodActions); } }