[cfe-commits] r117161 - /cfe/trunk/lib/Checker/AnalysisConsumer.cpp
Ted Kremenek
kremenek at apple.com
Fri Oct 22 15:08:30 PDT 2010
Author: kremenek
Date: Fri Oct 22 17:08:29 2010
New Revision: 117161
URL: http://llvm.org/viewvc/llvm-project?rev=117161&view=rev
Log:
Fix '-analyzer-display-progress' for Objective-C methods. Also remove obsolete code.
Modified:
cfe/trunk/lib/Checker/AnalysisConsumer.cpp
Modified: cfe/trunk/lib/Checker/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/AnalysisConsumer.cpp?rev=117161&r1=117160&r2=117161&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Checker/AnalysisConsumer.cpp Fri Oct 22 17:08:29 2010
@@ -153,6 +153,10 @@
llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:"
<< Loc.getColumn() << '\n';
}
+ else if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
+ Selector S = MD->getSelector();
+ llvm::errs() << ' ' << S.getAsString();
+ }
}
void addCodeAction(CodeAction action) {
@@ -218,19 +222,6 @@
break;
}
- case Decl::ObjCMethod: {
- ObjCMethodDecl* MD = cast<ObjCMethodDecl>(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<ObjCImplementationDecl>(*I);
HandleCode(ID, ObjCImplementationActions);
@@ -241,6 +232,7 @@
if (!Opts.AnalyzeSpecificFunction.empty() &&
Opts.AnalyzeSpecificFunction != (*MI)->getSelector().getAsString())
break;
+ DisplayFunction(*MI);
HandleCode(*MI, ObjCMethodActions);
}
}
More information about the cfe-commits
mailing list