blob: 3beaa73bcb7322bb0af9ae78782cfc95244ec64d [file] [log] [blame]
Ted Kremenek8ce61b32008-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 Kremenekc3803992008-10-24 01:04:59 +000014#ifndef ANALYSIS
15#define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE)
16#endif
17
Ted Kremenek8ce61b32008-07-14 23:41:13 +000018ANALYSIS(CFGDump, "cfg-dump",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000019 "Display Control-Flow Graphs", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000020
21ANALYSIS(CFGView, "cfg-view",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000022 "View Control-Flow Graphs using GraphViz", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000023
24ANALYSIS(DisplayLiveVariables, "dump-live-variables",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000025 "Print results of live variable analysis", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000026
27ANALYSIS(WarnDeadStores, "warn-dead-stores",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000028 "Warn about stores to dead variables", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000029
30ANALYSIS(WarnUninitVals, "warn-uninit-values",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000031 "Warn about uses of uninitialized variables", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000032
33ANALYSIS(WarnObjCMethSigs, "warn-objc-methodsigs",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000034 "Warn about Objective-C method signatures with type incompatibilities",
35 ObjCImplementation)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000036
37ANALYSIS(WarnObjCDealloc, "warn-objc-missing-dealloc",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000038 "Warn about Objective-C classes that lack a correct implementation of -dealloc",
39 ObjCImplementation)
Ted Kremenek69ea7852008-07-23 00:45:26 +000040
41ANALYSIS(WarnObjCUnusedIvars, "warn-objc-unused-ivars",
42 "Warn about private ivars that are never used", ObjCImplementation)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000043
44ANALYSIS(CheckerSimple, "checker-simple",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000045 "Perform simple path-sensitive checks.", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000046
47ANALYSIS(CheckerCFRef, "checker-cfref",
Ted Kremenekfbda0ef2008-07-15 00:46:02 +000048 "Run the [Core] Foundation reference count checker", Code)
Ted Kremenek8ce61b32008-07-14 23:41:13 +000049
Ted Kremenekc3803992008-10-24 01:04:59 +000050
Ted Kremeneka3f825e2008-11-03 23:18:07 +000051#ifndef ANALYSIS_STORE
52#define ANALYSIS_STORE(NAME, CMDFLAG, DESC)
53#endif
54
Ted Kremenekc3803992008-10-24 01:04:59 +000055ANALYSIS_STORE(BasicStore, "basic", "Use basic analyzer store")
56ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store")
57
Ted Kremeneka3f825e2008-11-03 23:18:07 +000058#ifndef ANALYSIS_DIAGNOSTICS
Ted Kremenekdd485cb2009-01-23 20:06:20 +000059#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE)
Ted Kremeneka3f825e2008-11-03 23:18:07 +000060#endif
61
Ted Kremenekdd485cb2009-01-23 20:06:20 +000062ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", CreateHTMLDiagnosticClient, false)
63ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", CreatePlistDiagnosticClient, true)
Ted Kremeneka3f825e2008-11-03 23:18:07 +000064
Ted Kremenek8ce61b32008-07-14 23:41:13 +000065#undef ANALYSIS
Ted Kremenekc3803992008-10-24 01:04:59 +000066#undef ANALYSIS_STORE
Ted Kremeneka3f825e2008-11-03 23:18:07 +000067#undef ANALYSIS_DIAGNOSTICS
68
69