1//===-- Analyses.def - Metadata about Static Analyses -----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the set of static analyses used by AnalysisConsumer.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef ANALYSIS_STORE
14#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)
15#endif
16
17ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store", CreateRegionStoreManager)
18
19#ifndef ANALYSIS_CONSTRAINTS
20#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)
21#endif
22
23ANALYSIS_CONSTRAINTS(RangeConstraints, "range", "Use constraint tracking of concrete value ranges", CreateRangeConstraintManager)
24ANALYSIS_CONSTRAINTS(Z3Constraints, "z3", "Use Z3 contraint solver", CreateZ3ConstraintManager)
25
26#ifndef ANALYSIS_DIAGNOSTICS
27#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)
28#endif
29
30ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", createHTMLDiagnosticConsumer)
31ANALYSIS_DIAGNOSTICS(HTML_SINGLE_FILE, "html-single-file", "Output analysis results using HTML (not allowing for multi-file bugs)", createHTMLSingleFileDiagnosticConsumer)
32ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", createPlistDiagnosticConsumer)
33ANALYSIS_DIAGNOSTICS(PLIST_MULTI_FILE, "plist-multi-file", "Output analysis results using Plists (allowing for multi-file bugs)", createPlistMultiFileDiagnosticConsumer)
34ANALYSIS_DIAGNOSTICS(PLIST_HTML, "plist-html", "Output analysis results using HTML wrapped with Plists", createPlistHTMLDiagnosticConsumer)
35ANALYSIS_DIAGNOSTICS(SARIF, "sarif", "Output analysis results in a SARIF file", createSarifDiagnosticConsumer)
36ANALYSIS_DIAGNOSTICS(TEXT, "text", "Text output of analysis results", createTextPathDiagnosticConsumer)
37
38#ifndef ANALYSIS_PURGE
39#define ANALYSIS_PURGE(NAME, CMDFLAG, DESC)
40#endif
41
42ANALYSIS_PURGE(PurgeStmt, "statement", "Purge symbols, bindings, and constraints before every statement")
43ANALYSIS_PURGE(PurgeBlock, "block", "Purge symbols, bindings, and constraints before every basic block")
44ANALYSIS_PURGE(PurgeNone, "none", "Do not purge symbols, bindings, or constraints")
45
46#ifndef ANALYSIS_INLINING_MODE
47#define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC)
48#endif
49
50ANALYSIS_INLINING_MODE(All, "all", "Analyze all functions as top level")
51ANALYSIS_INLINING_MODE(NoRedundancy, "noredundancy", "Do not analyze a function which has been previously inlined")
52
53#undef ANALYSIS_STORE
54#undef ANALYSIS_CONSTRAINTS
55#undef ANALYSIS_DIAGNOSTICS
56#undef ANALYSIS_PURGE
57#undef ANALYSIS_INLINING_MODE
58#undef ANALYSIS_IPA
59
60