Emit warnings for undefined control-flow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 20fd18c..e6a1ae4 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -505,6 +505,9 @@
if (!MD->getBody())
return;
+
+ if (FName.size() > 0 && FName != MD->getSelector().getName())
+ return;
if (printFuncDeclStart()) {
DeclPrinter().PrintObjCMethodDecl(MD);
@@ -649,11 +652,11 @@
void GRSimpleValsVisitor::VisitCFG(CFG& C, Decl& CD) {
SourceLocation Loc = CD.getLocation();
-
+
if (!Loc.isFileID() ||
Loc.getFileID() != Ctx->getSourceManager().getMainFileID())
return;
-
+
if (!Visualize) {
if (FunctionDecl *FD = dyn_cast<FunctionDecl>(&CD)) {
@@ -662,8 +665,8 @@
<< ' ';
}
else if (ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(&CD)) {
- llvm::cerr << "ANALYZE (ObjC Method): "
- << MD->getSelector().getName() << ' '
+ llvm::cerr << "ANALYZE (ObjC Method): '"
+ << MD->getSelector().getName() << "' "
<< Ctx->getSourceManager().getSourceName(MD->getLocation())
<< ' ';
}