blob: 1f702cc0e9c252064f8dd2a4926f1c8a1ebffe01 [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
52#define ANALYSIS_STORE(NAME, CMDFLAG, DESC)
53#endif
54
Ted Kremenek95c7b002008-10-24 01:04:59 +000055ANALYSIS_STORE(BasicStore, "basic", "Use basic analyzer store")
56ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store")
57
Ted Kremenek4fc82c82008-11-03 23:18:07 +000058#ifndef ANALYSIS_DIAGNOSTICS
59#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)
60#endif
61
62ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", CreateHTMLDiagnosticClient)
63ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", CreatePlistDiagnosticClient)
64
Ted Kremenekfb9a48c2008-07-14 23:41:13 +000065#undef ANALYSIS
Ted Kremenek95c7b002008-10-24 01:04:59 +000066#undef ANALYSIS_STORE
Ted Kremenek4fc82c82008-11-03 23:18:07 +000067#undef ANALYSIS_DIAGNOSTICS
68
69