[cfe-commits] r162927 - in /cfe/trunk: include/clang/Frontend/Analyses.def include/clang/Frontend/AnalyzerOptions.h include/clang/StaticAnalyzer/Analyses.def lib/Frontend/CompilerInvocation.cpp lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Ted Kremenek
kremenek at apple.com
Thu Aug 30 12:26:33 PDT 2012
Author: kremenek
Date: Thu Aug 30 14:26:33 2012
New Revision: 162927
URL: http://llvm.org/viewvc/llvm-project?rev=162927&view=rev
Log:
Move Analyses.def to include/clang/StaticAnalyzer.
Added:
cfe/trunk/include/clang/StaticAnalyzer/Analyses.def
- copied, changed from r162922, cfe/trunk/include/clang/Frontend/Analyses.def
Removed:
cfe/trunk/include/clang/Frontend/Analyses.def
Modified:
cfe/trunk/include/clang/Frontend/AnalyzerOptions.h
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
Removed: cfe/trunk/include/clang/Frontend/Analyses.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/Analyses.def?rev=162926&view=auto
==============================================================================
--- cfe/trunk/include/clang/Frontend/Analyses.def (original)
+++ cfe/trunk/include/clang/Frontend/Analyses.def (removed)
@@ -1,67 +0,0 @@
-//===-- Analyses.def - Metadata about Static Analyses -----------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the set of static analyses used by AnalysisConsumer.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef ANALYSIS_STORE
-#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)
-#endif
-
-ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store", CreateRegionStoreManager)
-
-#ifndef ANALYSIS_CONSTRAINTS
-#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)
-#endif
-
-ANALYSIS_CONSTRAINTS(RangeConstraints, "range", "Use constraint tracking of concrete value ranges", CreateRangeConstraintManager)
-
-#ifndef ANALYSIS_DIAGNOSTICS
-#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE)
-#endif
-
-ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", createHTMLDiagnosticConsumer, false)
-ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", createPlistDiagnosticConsumer, true)
-ANALYSIS_DIAGNOSTICS(PLIST_MULTI_FILE, "plist-multi-file", "Output analysis results using Plists (allowing for mult-file bugs)", createPlistMultiFileDiagnosticConsumer, true)
-ANALYSIS_DIAGNOSTICS(PLIST_HTML, "plist-html", "Output analysis results using HTML wrapped with Plists", createPlistHTMLDiagnosticConsumer, true)
-ANALYSIS_DIAGNOSTICS(TEXT, "text", "Text output of analysis results", createTextPathDiagnosticConsumer, true)
-
-#ifndef ANALYSIS_PURGE
-#define ANALYSIS_PURGE(NAME, CMDFLAG, DESC)
-#endif
-
-ANALYSIS_PURGE(PurgeStmt, "statement", "Purge symbols, bindings, and constraints before every statement")
-ANALYSIS_PURGE(PurgeBlock, "block", "Purge symbols, bindings, and constraints before every basic block")
-ANALYSIS_PURGE(PurgeNone, "none", "Do not purge symbols, bindings, or constraints")
-
-#ifndef ANALYSIS_IPA
-#define ANALYSIS_IPA(NAME, CMDFLAG, DESC)
-#endif
-
-ANALYSIS_IPA(None, "none", "Perform only intra-procedural analysis")
-ANALYSIS_IPA(BasicInlining, "basic-inlining", "Inline C functions and blocks when their definitions are available")
-ANALYSIS_IPA(Inlining, "inlining", "Inline callees when their definitions are available")
-ANALYSIS_IPA(DynamicDispatch, "dynamic", "Experimental: Enable inlining of dynamically dispatched methods")
-ANALYSIS_IPA(DynamicDispatchBifurcate, "dynamic-bifurcate", "Experimental: Enable inlining of dynamically dispatched methods, bifurcate paths when exact type info is unavailable")
-
-#ifndef ANALYSIS_INLINING_MODE
-#define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC)
-#endif
-
-ANALYSIS_INLINING_MODE(All, "all", "Analyze all functions in the order defined in the TU")
-ANALYSIS_INLINING_MODE(NoRedundancy, "noredundancy", "Do not analyze a function which has been previously inlined, use call graph to order")
-
-#undef ANALYSIS_STORE
-#undef ANALYSIS_CONSTRAINTS
-#undef ANALYSIS_DIAGNOSTICS
-#undef ANALYSIS_PURGE
-#undef ANALYSIS_INLINING_MODE
-#undef ANALYSIS_IPA
-
Modified: cfe/trunk/include/clang/Frontend/AnalyzerOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/AnalyzerOptions.h?rev=162927&r1=162926&r2=162927&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/AnalyzerOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/AnalyzerOptions.h Thu Aug 30 14:26:33 2012
@@ -28,21 +28,21 @@
/// 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 @@
/// 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
};
Copied: cfe/trunk/include/clang/StaticAnalyzer/Analyses.def (from r162922, cfe/trunk/include/clang/Frontend/Analyses.def)
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Analyses.def?p2=cfe/trunk/include/clang/StaticAnalyzer/Analyses.def&p1=cfe/trunk/include/clang/Frontend/Analyses.def&r1=162922&r2=162927&rev=162927&view=diff
==============================================================================
(empty)
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=162927&r1=162926&r2=162927&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Thu Aug 30 14:26:33 2012
@@ -51,7 +51,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
AnalysisStores Value = llvm::StringSwitch<AnalysisStores>(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 @@
AnalysisConstraints Value = llvm::StringSwitch<AnalysisConstraints>(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 @@
AnalysisDiagClients Value = llvm::StringSwitch<AnalysisDiagClients>(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 @@
AnalysisPurgeMode Value = llvm::StringSwitch<AnalysisPurgeMode>(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 @@
AnalysisIPAMode Value = llvm::StringSwitch<AnalysisIPAMode>(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 @@
AnalysisInliningMode Value = llvm::StringSwitch<AnalysisInliningMode>(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)
Modified: cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp?rev=162927&r1=162926&r2=162927&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp Thu Aug 30 14:26:33 2012
@@ -189,7 +189,7 @@
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 @@
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 @@
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"
}
}
More information about the cfe-commits
mailing list