1 //===-- Analyses.def - Metadata about Static Analyses -----------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines the set of static analyses used by AnalysisConsumer.
11 //===----------------------------------------------------------------------===//
13 #ifndef ANALYSIS_STORE
14 #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)
17 ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store", CreateRegionStoreManager)
19 #ifndef ANALYSIS_CONSTRAINTS
20 #define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)
23 ANALYSIS_CONSTRAINTS(RangeConstraints, "range", "Use constraint tracking of concrete value ranges", CreateRangeConstraintManager)
24 ANALYSIS_CONSTRAINTS(Z3Constraints, "z3", "Use Z3 contraint solver", CreateZ3ConstraintManager)
26 #ifndef ANALYSIS_DIAGNOSTICS
27 #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)
30 ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", createHTMLDiagnosticConsumer)
31 ANALYSIS_DIAGNOSTICS(HTML_SINGLE_FILE, "html-single-file", "Output analysis results using HTML (not allowing for multi-file bugs)", createHTMLSingleFileDiagnosticConsumer)
32 ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", createPlistDiagnosticConsumer)
33 ANALYSIS_DIAGNOSTICS(PLIST_MULTI_FILE, "plist-multi-file", "Output analysis results using Plists (allowing for multi-file bugs)", createPlistMultiFileDiagnosticConsumer)
34 ANALYSIS_DIAGNOSTICS(PLIST_HTML, "plist-html", "Output analysis results using HTML wrapped with Plists", createPlistHTMLDiagnosticConsumer)
35 ANALYSIS_DIAGNOSTICS(SARIF, "sarif", "Output analysis results in a SARIF file", createSarifDiagnosticConsumer)
36 ANALYSIS_DIAGNOSTICS(TEXT, "text", "Text output of analysis results", createTextPathDiagnosticConsumer)
38 #ifndef ANALYSIS_PURGE
39 #define ANALYSIS_PURGE(NAME, CMDFLAG, DESC)
42 ANALYSIS_PURGE(PurgeStmt, "statement", "Purge symbols, bindings, and constraints before every statement")
43 ANALYSIS_PURGE(PurgeBlock, "block", "Purge symbols, bindings, and constraints before every basic block")
44 ANALYSIS_PURGE(PurgeNone, "none", "Do not purge symbols, bindings, or constraints")
46 #ifndef ANALYSIS_INLINING_MODE
47 #define ANALYSIS_INLINING_MODE(NAME, CMDFLAG, DESC)
50 ANALYSIS_INLINING_MODE(All, "all", "Analyze all functions as top level")
51 ANALYSIS_INLINING_MODE(NoRedundancy, "noredundancy", "Do not analyze a function which has been previously inlined")
54 #undef ANALYSIS_CONSTRAINTS
55 #undef ANALYSIS_DIAGNOSTICS
57 #undef ANALYSIS_INLINING_MODE