aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-05-19 00:56:53 +0000
committerTed Kremenek <kremenek@apple.com>2011-05-19 00:56:53 +0000
commit6e744db7c294f357e7e0af628275331f3a6c1b6b (patch)
tree364ad5f0dbc8b2c37ee4cd56da3113598555a144 /lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
parent0eb47fc01849a94bac7fda236134f9301eff688b (diff)
Teach static analyzer to analyze Objective-C methods in category implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131614 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp')
-rw-r--r--lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
index cd2cea47d7..b8dbb54504 100644
--- a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
+++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
@@ -200,18 +200,20 @@ void AnalysisConsumer::HandleDeclContext(ASTContext &C, DeclContext *dc) {
}
break;
}
-
+
+ case Decl::ObjCCategoryImpl:
case Decl::ObjCImplementation: {
- ObjCImplementationDecl* ID = cast<ObjCImplementationDecl>(*I);
+ ObjCImplDecl* ID = cast<ObjCImplDecl>(*I);
HandleCode(ID);
- for (ObjCImplementationDecl::method_iterator MI = ID->meth_begin(),
+ for (ObjCContainerDecl::method_iterator MI = ID->meth_begin(),
ME = ID->meth_end(); MI != ME; ++MI) {
checkerMgr->runCheckersOnASTDecl(*MI, *Mgr, BR);
if ((*MI)->isThisDeclarationADefinition()) {
if (!Opts.AnalyzeSpecificFunction.empty() &&
- Opts.AnalyzeSpecificFunction != (*MI)->getSelector().getAsString())
+ Opts.AnalyzeSpecificFunction !=
+ (*MI)->getSelector().getAsString())
break;
DisplayFunction(*MI);
HandleCode(*MI);