diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:21:42 +0000 |
commit | 1928da94b55683957759d5c5ff4593a118773394 (patch) | |
tree | 48b44512b5db8ced345df4a1a56b5065cf2a14d9 /include/clang/Frontend/AnalyzerOptions.h | |
parent | 53992adde3eda3ccf9da63bc7e45673f043de18f (diff) | |
download | FreeBSD-src-1928da94b55683957759d5c5ff4593a118773394.zip FreeBSD-src-1928da94b55683957759d5c5ff4593a118773394.tar.gz |
Update clang to r108243.
Diffstat (limited to 'include/clang/Frontend/AnalyzerOptions.h')
-rw-r--r-- | include/clang/Frontend/AnalyzerOptions.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/include/clang/Frontend/AnalyzerOptions.h b/include/clang/Frontend/AnalyzerOptions.h new file mode 100644 index 0000000..ab4aed9 --- /dev/null +++ b/include/clang/Frontend/AnalyzerOptions.h @@ -0,0 +1,98 @@ +//===--- AnalyzerOptions.h - Analysis Engine Options ------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This header contains the structures necessary for a front-end to specify +// various analyses. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_FRONTEND_ANALYZEROPTIONS_H +#define LLVM_CLANG_FRONTEND_ANALYZEROPTIONS_H + +#include <string> +#include <vector> + +namespace clang { +class ASTConsumer; +class Diagnostic; +class Preprocessor; +class LangOptions; + +/// Analysis - Set of available source code analyses. +enum Analyses { +#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) NAME, +#include "clang/Frontend/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" +NumStores +}; + +/// AnalysisConstraints - Set of available constraint models. +enum AnalysisConstraints { +#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN) NAME##Model, +#include "clang/Frontend/Analyses.def" +NumConstraints +}; + +/// AnalysisDiagClients - Set of available diagnostic clients for rendering +/// analysis results. +enum AnalysisDiagClients { +#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATFN, AUTOCREAT) PD_##NAME, +#include "clang/Frontend/Analyses.def" +NUM_ANALYSIS_DIAG_CLIENTS +}; + +class AnalyzerOptions { +public: + std::vector<Analyses> AnalysisList; + AnalysisStores AnalysisStoreOpt; + AnalysisConstraints AnalysisConstraintsOpt; + AnalysisDiagClients AnalysisDiagOpt; + std::string AnalyzeSpecificFunction; + unsigned MaxNodes; + unsigned MaxLoop; + unsigned AnalyzeAll : 1; + unsigned AnalyzerDisplayProgress : 1; + unsigned AnalyzeNestedBlocks : 1; + unsigned EagerlyAssume : 1; + unsigned PurgeDead : 1; + unsigned TrimGraph : 1; + unsigned VisualizeEGDot : 1; + unsigned VisualizeEGUbi : 1; + unsigned EnableExperimentalChecks : 1; + unsigned EnableExperimentalInternalChecks : 1; + unsigned EnableIdempotentOperationChecker : 1; + unsigned InlineCall : 1; + +public: + AnalyzerOptions() { + AnalysisStoreOpt = BasicStoreModel; + AnalysisConstraintsOpt = RangeConstraintsModel; + AnalysisDiagOpt = PD_HTML; + AnalyzeAll = 0; + AnalyzerDisplayProgress = 0; + AnalyzeNestedBlocks = 0; + EagerlyAssume = 0; + PurgeDead = 1; + TrimGraph = 0; + VisualizeEGDot = 0; + VisualizeEGUbi = 0; + EnableExperimentalChecks = 0; + EnableExperimentalInternalChecks = 0; + } +}; + +} + +#endif |