diff options
Diffstat (limited to 'clang/Driver')
| -rw-r--r-- | clang/Driver/Analyses.def | 20 | ||||
| -rw-r--r-- | clang/Driver/AnalysisConsumer.cpp | 4 | ||||
| -rw-r--r-- | clang/Driver/AnalysisConsumer.h | 2 | ||||
| -rw-r--r-- | clang/Driver/clang.cpp | 2 |
4 files changed, 15 insertions, 13 deletions
diff --git a/clang/Driver/Analyses.def b/clang/Driver/Analyses.def index 1e04c9a8414..623a2475d6b 100644 --- a/clang/Driver/Analyses.def +++ b/clang/Driver/Analyses.def @@ -12,30 +12,32 @@ //===----------------------------------------------------------------------===// ANALYSIS(CFGDump, "cfg-dump", - "Display Control-Flow Graphs") + "Display Control-Flow Graphs", Code) ANALYSIS(CFGView, "cfg-view", - "View Control-Flow Graphs using GraphViz") + "View Control-Flow Graphs using GraphViz", Code) ANALYSIS(DisplayLiveVariables, "dump-live-variables", - "Print results of live variable analysis") + "Print results of live variable analysis", Code) ANALYSIS(WarnDeadStores, "warn-dead-stores", - "Warn about stores to dead variables") + "Warn about stores to dead variables", Code) ANALYSIS(WarnUninitVals, "warn-uninit-values", - "Warn about uses of uninitialized variables") + "Warn about uses of uninitialized variables", Code) ANALYSIS(WarnObjCMethSigs, "warn-objc-methodsigs", -"Warn about Objective-C method signatures with type incompatibilities") + "Warn about Objective-C method signatures with type incompatibilities", + ObjCImplementation) ANALYSIS(WarnObjCDealloc, "warn-objc-missing-dealloc", -"Warn about Objective-C classes that lack a correct implementation of -dealloc") + "Warn about Objective-C classes that lack a correct implementation of -dealloc", + ObjCImplementation) ANALYSIS(CheckerSimple, "checker-simple", - "Perform simple path-sensitive checks.") + "Perform simple path-sensitive checks.", Code) ANALYSIS(CheckerCFRef, "checker-cfref", - "Run the [Core] Foundation reference count checker") + "Run the [Core] Foundation reference count checker", Code) #undef ANALYSIS diff --git a/clang/Driver/AnalysisConsumer.cpp b/clang/Driver/AnalysisConsumer.cpp index cd24e2efea4..45e0918ce08 100644 --- a/clang/Driver/AnalysisConsumer.cpp +++ b/clang/Driver/AnalysisConsumer.cpp @@ -414,9 +414,9 @@ ASTConsumer* clang::CreateAnalysisConsumer(Analyses* Beg, Analyses* End, 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; diff --git a/clang/Driver/AnalysisConsumer.h b/clang/Driver/AnalysisConsumer.h index dfabe79e56b..5a2550da43c 100644 --- a/clang/Driver/AnalysisConsumer.h +++ b/clang/Driver/AnalysisConsumer.h @@ -17,7 +17,7 @@ namespace clang { enum Analyses { -#define ANALYSIS(NAME, CMDFLAG, DESC) NAME, +#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME, #include "Analyses.def" NumAnalyses }; diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index 7ce730150e2..5e8f51cbc97 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -162,7 +162,7 @@ AnalyzeAll("checker-opt-analyze-headers", static llvm::cl::list<Analyses> AnalysisList(llvm::cl::desc("Available Source Code Analyses:"), llvm::cl::values( -#define ANALYSIS(NAME, CMDFLAG, DESC)\ +#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE)\ clEnumValN(NAME, CMDFLAG, DESC), #include "Analyses.def" clEnumValEnd)); |

