blob: 3492d09c10aa4b6c8d9b8b02aa2e982d634fc7db [file] [log] [blame]
Ted Kremenekfb9a48c2008-07-14 23:41:13 +00001//===-- Analyses.def - Metadata about Static Analyses -----------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the set of static analyses used by AnalysisConsumer.
11//
12//===----------------------------------------------------------------------===//
13
Ted Kremenek95c7b002008-10-24 01:04:59 +000014#ifndef ANALYSIS
15#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE)
16#endif
17
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000018ANALYSIS(CFGDump, "cfg-dump",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000019 "Display Control-Flow Graphs", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000020
21ANALYSIS(CFGView, "cfg-view",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000022 "View Control-Flow Graphs using GraphViz", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000023
24ANALYSIS(DisplayLiveVariables, "dump-live-variables",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000025 "Print results of live variable analysis", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000026
27ANALYSIS(WarnDeadStores, "warn-dead-stores",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000028 "Warn about stores to dead variables", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000029
30ANALYSIS(WarnUninitVals, "warn-uninit-values",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000031 "Warn about uses of uninitialized variables", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000032
33ANALYSIS(WarnObjCMethSigs, "warn-objc-methodsigs",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000034 "Warn about Objective-C method signatures with type incompatibilities",
35 ObjCImplementation)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000036
37ANALYSIS(WarnObjCDealloc, "warn-objc-missing-dealloc",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000038 "Warn about Objective-C classes that lack a correct implementation of -dealloc",
39 ObjCImplementation)
Ted Kremenek395aaf22008-07-23 00:45:26 +000040
41ANALYSIS(WarnObjCUnusedIvars, "warn-objc-unused-ivars",
42 "Warn about private ivars that are never used", ObjCImplementation)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000043
44ANALYSIS(CheckerSimple, "checker-simple",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000045 "Perform simple path-sensitive checks.", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000046
47ANALYSIS(CheckerCFRef, "checker-cfref",
Ted Kremenekf7f3c202008-07-15 00:46:02 +000048 "Run the [Core] Foundation reference count checker", Code)
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000049
Ted Kremenek95c7b002008-10-24 01:04:59 +000050
Ted Kremenek4fc82c82008-11-03 23:18:07 +000051#ifndef ANALYSIS_STORE
Ted Kremenekbe1fe1e2009-02-17 04:27:41 +000052#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN)
Ted Kremenek4fc82c82008-11-03 23:18:07 +000053#endif
54
Ted Kremenekbe1fe1e2009-02-17 04:27:41 +000055ANALYSIS_STORE(BasicStore, "basic", "Use basic analyzer store", CreateBasicStoreManager)
56ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store", CreateRegionStoreManager)
57
58#ifndef ANALYSIS_CONSTRAINTS
59#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATFN)
60#endif
61
62ANALYSIS_CONSTRAINTS(BasicConstraints, "basic", "Use basic constraint tracking", CreateBasicConstraintManager)
Ted Kremenek9f4ecb32009-02-20 21:49:22 +000063ANALYSIS_CONSTRAINTS(RangeConstraints, "range", "Use constraint tracking of concrete value ranges", CreateRangeConstraintManager)
Ted Kremenek95c7b002008-10-24 01:04:59 +000064
Ted Kremenek4fc82c82008-11-03 23:18:07 +000065#ifndef ANALYSIS_DIAGNOSTICS
Ted Kremenekc472d792009-01-23 20:06:20 +000066#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE)
Ted Kremenek4fc82c82008-11-03 23:18:07 +000067#endif
68
Ted Kremenekc472d792009-01-23 20:06:20 +000069ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", CreateHTMLDiagnosticClient, false)
70ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", CreatePlistDiagnosticClient, true)
Ted Kremenek4fc82c82008-11-03 23:18:07 +000071
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000072#undef ANALYSIS
Ted Kremenek95c7b002008-10-24 01:04:59 +000073#undef ANALYSIS_STORE
Ted Kremenekbe1fe1e2009-02-17 04:27:41 +000074#undef ANALYSIS_CONSTRAINTS
Ted Kremenek4fc82c82008-11-03 23:18:07 +000075#undef ANALYSIS_DIAGNOSTICS
Ted Kremenekbe1fe1e2009-02-17 04:27:41 +000076#undef ANALYSIS_STORE
Ted Kremenek4fc82c82008-11-03 23:18:07 +000077