Provide an "Analysis Scope" for Analyses so checks can either be run on code declarations (bodies) or Objective-C @implementation blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53584 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/AnalysisConsumer.cpp b/Driver/AnalysisConsumer.cpp
index cd24e2e..45e0918 100644
--- a/Driver/AnalysisConsumer.cpp
+++ b/Driver/AnalysisConsumer.cpp
@@ -414,9 +414,9 @@
for ( ; Beg != End ; ++Beg)
switch (*Beg) {
-#define ANALYSIS(NAME, CMD, DESC)\
+#define ANALYSIS(NAME, CMD, DESC, SCOPE)\
case NAME:\
- C->addCodeAction(&Action ## NAME);\
+ C->add ## SCOPE ## Action(&Action ## NAME);\
break;
#include "Analyses.def"
default: break;