diff --git a/clang/include/clang/Frontend/AnalyzerOptions.h b/clang/include/clang/Frontend/AnalyzerOptions.h index 5c508ecb2a1f..052a8706c660 100644 --- a/clang/include/clang/Frontend/AnalyzerOptions.h +++ b/clang/include/clang/Frontend/AnalyzerOptions.h @@ -28,21 +28,21 @@ class LangOptions; /// Analysis - Set of available source code analyses. enum Analyses { #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NumAnalyses }; /// AnalysisStores - Set of available analysis store models. enum AnalysisStores { #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) NAME##Model, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NumStores }; /// AnalysisConstraints - Set of available constraint models. enum AnalysisConstraints { #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) NAME##Model, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NumConstraints }; @@ -50,28 +50,28 @@ NumConstraints /// analysis results. enum AnalysisDiagClients { #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN, AUTOCREAT) PD_##NAME, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NUM_ANALYSIS_DIAG_CLIENTS }; /// AnalysisPurgeModes - Set of available strategies for dead symbol removal. enum AnalysisPurgeMode { #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) NAME, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NumPurgeModes }; /// AnalysisIPAMode - Set of inter-procedural modes. enum AnalysisIPAMode { #define ANALYSIS_IPA(NAME, CMDFLAG, DESC) NAME, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NumIPAModes }; /// AnalysisInlineFunctionSelection - Set of inlining function selection heuristics. enum AnalysisInliningMode { #define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) NAME, -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" NumInliningModes }; diff --git a/clang/include/clang/Frontend/Analyses.def b/clang/include/clang/StaticAnalyzer/Analyses.def similarity index 100% rename from clang/include/clang/Frontend/Analyses.def rename to clang/include/clang/StaticAnalyzer/Analyses.def diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 6f6ef42c6ff9..4f489fe5fc75 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -51,7 +51,7 @@ static const char *getAnalysisStoreName(AnalysisStores Kind) { llvm_unreachable("Unknown analysis store!"); #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) \ case NAME##Model: return CMDFLAG; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } @@ -61,7 +61,7 @@ static const char *getAnalysisConstraintName(AnalysisConstraints Kind) { llvm_unreachable("Unknown analysis constraints!"); #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) \ case NAME##Model: return CMDFLAG; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } @@ -71,7 +71,7 @@ static const char *getAnalysisDiagClientName(AnalysisDiagClients Kind) { llvm_unreachable("Unknown analysis client!"); #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN, AUTOCREATE) \ case PD_##NAME: return CMDFLAG; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } @@ -81,7 +81,7 @@ static const char *getAnalysisPurgeModeName(AnalysisPurgeMode Kind) { llvm_unreachable("Unknown analysis purge mode!"); #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) \ case NAME: return CMDFLAG; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } @@ -91,7 +91,7 @@ static const char *getAnalysisIPAModeName(AnalysisIPAMode Kind) { llvm_unreachable("Unknown analysis ipa mode!"); #define ANALYSIS_IPA(NAME, CMDFLAG, DESC) \ case NAME: return CMDFLAG; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } @@ -102,7 +102,7 @@ static const char * llvm_unreachable("Unknown analysis inlining mode!"); #define ANALYSIS_INLINE_SELECTION(NAME, CMDFLAG, DESC) \ case NAME: return CMDFLAG; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } @@ -1024,7 +1024,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, AnalysisStores Value = llvm::StringSwitch(Name) #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) \ .Case(CMDFLAG, NAME##Model) -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" .Default(NumStores); if (Value == NumStores) { Diags.Report(diag::err_drv_invalid_value) @@ -1040,7 +1040,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, AnalysisConstraints Value = llvm::StringSwitch(Name) #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) \ .Case(CMDFLAG, NAME##Model) -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" .Default(NumConstraints); if (Value == NumConstraints) { Diags.Report(diag::err_drv_invalid_value) @@ -1056,7 +1056,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, AnalysisDiagClients Value = llvm::StringSwitch(Name) #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN, AUTOCREAT) \ .Case(CMDFLAG, PD_##NAME) -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" .Default(NUM_ANALYSIS_DIAG_CLIENTS); if (Value == NUM_ANALYSIS_DIAG_CLIENTS) { Diags.Report(diag::err_drv_invalid_value) @@ -1072,7 +1072,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, AnalysisPurgeMode Value = llvm::StringSwitch(Name) #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC) \ .Case(CMDFLAG, NAME) -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" .Default(NumPurgeModes); if (Value == NumPurgeModes) { Diags.Report(diag::err_drv_invalid_value) @@ -1088,7 +1088,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, AnalysisIPAMode Value = llvm::StringSwitch(Name) #define ANALYSIS_IPA(NAME, CMDFLAG, DESC) \ .Case(CMDFLAG, NAME) -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" .Default(NumIPAModes); if (Value == NumIPAModes) { Diags.Report(diag::err_drv_invalid_value) @@ -1104,7 +1104,7 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, AnalysisInliningMode Value = llvm::StringSwitch(Name) #define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC) \ .Case(CMDFLAG, NAME) -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" .Default(NumInliningModes); if (Value == NumInliningModes) { Diags.Report(diag::err_drv_invalid_value) diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index b81ee7fc5986..814f5b4cf20f 100644 --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -189,7 +189,7 @@ public: default: #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE) \ case PD_##NAME: CREATEFN(PathConsumers, OutDir, PP); break; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } } else if (Opts.AnalysisDiagOpt == PD_TEXT) { // Create the text client even without a specified output file since @@ -203,7 +203,7 @@ public: llvm_unreachable("Unknown store manager."); #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATEFN) \ case NAME##Model: CreateStoreMgr = CREATEFN; break; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } switch (Opts.AnalysisConstraintsOpt) { @@ -211,7 +211,7 @@ public: llvm_unreachable("Unknown store manager."); #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATEFN) \ case NAME##Model: CreateConstraintMgr = CREATEFN; break; -#include "clang/Frontend/Analyses.def" +#include "clang/StaticAnalyzer/Analyses.def" } }