]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.def
Merge ^/head r304537 through r304699.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / StaticAnalyzer / Core / PathSensitive / SVals.def
1 //===-- SVals.def - Metadata about SVal kinds -------------------*- 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 // The list of symbolic values (SVal kinds and sub-kinds) used in the Static
11 // Analyzer. The distinction between loc:: and nonloc:: SVal namespaces is
12 // currently hardcoded, because it is too peculiar and explicit to be handled
13 // uniformly. In order to use this information, users of this file must define
14 // one or more of the following macros:
15 //
16 // BASIC_SVAL(Id, Parent) - for specific SVal sub-kinds, which are
17 // neither in loc:: nor in nonloc:: namespace; these classes occupy
18 // their own base kind IdKind.
19 //
20 // ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are
21 // neither in loc:: nor in nonloc:: namespace,
22 //
23 // ABSTRACT_SVAL_WITH_KIND(Id, Parent) - for SVal classes which are also
24 // neither in loc:: nor in nonloc:: namespace, but occupy a whole base kind
25 // identifier IdKind, much like BASIC_SVALs.
26 //
27 // LOC_SVAL(Id, Parent) - for values in loc:: namespace, which occupy a sub-kind
28 // loc::IdKind.
29 //
30 // NONLOC_SVAL(Id, Parent) - for values in nonloc:: namespace, which occupy a
31 // sub-kind nonloc::IdKind.
32 //
33 //===----------------------------------------------------------------------===//
34
35 #ifndef BASIC_SVAL
36 #define BASIC_SVAL(Id, Parent)
37 #endif
38
39 #ifndef ABSTRACT_SVAL
40 #define ABSTRACT_SVAL(Id, Parent)
41 #endif
42
43 #ifndef ABSTRACT_SVAL_WITH_KIND
44 #define ABSTRACT_SVAL_WITH_KIND(Id, Parent) ABSTRACT_SVAL(Id, Parent)
45 #endif
46
47 #ifndef LOC_SVAL
48 #define LOC_SVAL(Id, Parent)
49 #endif
50
51 #ifndef NONLOC_SVAL
52 #define NONLOC_SVAL(Id, Parent)
53 #endif
54
55 BASIC_SVAL(UndefinedVal, SVal)
56 ABSTRACT_SVAL(DefinedOrUnknownSVal, SVal)
57   BASIC_SVAL(UnknownVal, DefinedOrUnknownSVal)
58   ABSTRACT_SVAL(DefinedSVal, DefinedOrUnknownSVal)
59     ABSTRACT_SVAL_WITH_KIND(Loc, DefinedSVal)
60       LOC_SVAL(ConcreteInt, Loc)
61       LOC_SVAL(GotoLabel, Loc)
62       LOC_SVAL(MemRegionVal, Loc)
63     ABSTRACT_SVAL_WITH_KIND(NonLoc, DefinedSVal)
64       NONLOC_SVAL(CompoundVal, NonLoc)
65       NONLOC_SVAL(ConcreteInt, NonLoc)
66       NONLOC_SVAL(LazyCompoundVal, NonLoc)
67       NONLOC_SVAL(LocAsInteger, NonLoc)
68       NONLOC_SVAL(SymbolVal, NonLoc)
69
70 #undef NONLOC_SVAL
71 #undef LOC_SVAL
72 #undef ABSTRACT_SVAL_WITH_KIND
73 #undef ABSTRACT_SVAL
74 #undef BASIC_SVAL