Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 1 | //===-- 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 Kremenek | 95c7b00 | 2008-10-24 01:04:59 +0000 | [diff] [blame] | 14 | #ifndef ANALYSIS |
| 15 | #define ANALYSIS(NAME, CMDFLAG, DESC, SCOPE) |
| 16 | #endif |
| 17 | |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 18 | ANALYSIS(CFGDump, "cfg-dump", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 19 | "Display Control-Flow Graphs", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 20 | |
| 21 | ANALYSIS(CFGView, "cfg-view", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 22 | "View Control-Flow Graphs using GraphViz", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 23 | |
| 24 | ANALYSIS(DisplayLiveVariables, "dump-live-variables", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 25 | "Print results of live variable analysis", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 26 | |
| 27 | ANALYSIS(WarnDeadStores, "warn-dead-stores", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 28 | "Warn about stores to dead variables", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 29 | |
| 30 | ANALYSIS(WarnUninitVals, "warn-uninit-values", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 31 | "Warn about uses of uninitialized variables", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 32 | |
| 33 | ANALYSIS(WarnObjCMethSigs, "warn-objc-methodsigs", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 34 | "Warn about Objective-C method signatures with type incompatibilities", |
| 35 | ObjCImplementation) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 36 | |
| 37 | ANALYSIS(WarnObjCDealloc, "warn-objc-missing-dealloc", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 38 | "Warn about Objective-C classes that lack a correct implementation of -dealloc", |
| 39 | ObjCImplementation) |
Ted Kremenek | 395aaf2 | 2008-07-23 00:45:26 +0000 | [diff] [blame] | 40 | |
| 41 | ANALYSIS(WarnObjCUnusedIvars, "warn-objc-unused-ivars", |
| 42 | "Warn about private ivars that are never used", ObjCImplementation) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 43 | |
| 44 | ANALYSIS(CheckerSimple, "checker-simple", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 45 | "Perform simple path-sensitive checks.", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 46 | |
| 47 | ANALYSIS(CheckerCFRef, "checker-cfref", |
Ted Kremenek | f7f3c20 | 2008-07-15 00:46:02 +0000 | [diff] [blame] | 48 | "Run the [Core] Foundation reference count checker", Code) |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 49 | |
Ted Kremenek | 95c7b00 | 2008-10-24 01:04:59 +0000 | [diff] [blame] | 50 | |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 51 | #ifndef ANALYSIS_STORE |
Ted Kremenek | be1fe1e | 2009-02-17 04:27:41 +0000 | [diff] [blame] | 52 | #define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATFN) |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 53 | #endif |
| 54 | |
Ted Kremenek | be1fe1e | 2009-02-17 04:27:41 +0000 | [diff] [blame] | 55 | ANALYSIS_STORE(BasicStore, "basic", "Use basic analyzer store", CreateBasicStoreManager) |
| 56 | ANALYSIS_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 | |
| 62 | ANALYSIS_CONSTRAINTS(BasicConstraints, "basic", "Use basic constraint tracking", CreateBasicConstraintManager) |
Ted Kremenek | 9f4ecb3 | 2009-02-20 21:49:22 +0000 | [diff] [blame] | 63 | ANALYSIS_CONSTRAINTS(RangeConstraints, "range", "Use constraint tracking of concrete value ranges", CreateRangeConstraintManager) |
Ted Kremenek | 95c7b00 | 2008-10-24 01:04:59 +0000 | [diff] [blame] | 64 | |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 65 | #ifndef ANALYSIS_DIAGNOSTICS |
Ted Kremenek | c472d79 | 2009-01-23 20:06:20 +0000 | [diff] [blame] | 66 | #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE) |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 67 | #endif |
| 68 | |
Ted Kremenek | c472d79 | 2009-01-23 20:06:20 +0000 | [diff] [blame] | 69 | ANALYSIS_DIAGNOSTICS(HTML, "html", "Output analysis results using HTML", CreateHTMLDiagnosticClient, false) |
| 70 | ANALYSIS_DIAGNOSTICS(PLIST, "plist", "Output analysis results using Plists", CreatePlistDiagnosticClient, true) |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 71 | |
Ted Kremenek | fb9a48c | 2008-07-14 23:41:13 +0000 | [diff] [blame] | 72 | #undef ANALYSIS |
Ted Kremenek | 95c7b00 | 2008-10-24 01:04:59 +0000 | [diff] [blame] | 73 | #undef ANALYSIS_STORE |
Ted Kremenek | be1fe1e | 2009-02-17 04:27:41 +0000 | [diff] [blame] | 74 | #undef ANALYSIS_CONSTRAINTS |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 75 | #undef ANALYSIS_DIAGNOSTICS |
Ted Kremenek | be1fe1e | 2009-02-17 04:27:41 +0000 | [diff] [blame] | 76 | #undef ANALYSIS_STORE |
Ted Kremenek | 4fc82c8 | 2008-11-03 23:18:07 +0000 | [diff] [blame] | 77 | |