1 //===-- SVals.def - Metadata about SVal kinds -------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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:
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.
20 // ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are
21 // neither in loc:: nor in nonloc:: namespace,
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.
27 // LOC_SVAL(Id, Parent) - for values in loc:: namespace, which occupy a sub-kind
30 // NONLOC_SVAL(Id, Parent) - for values in nonloc:: namespace, which occupy a
31 // sub-kind nonloc::IdKind.
33 //===----------------------------------------------------------------------===//
36 #define BASIC_SVAL(Id, Parent)
40 #define ABSTRACT_SVAL(Id, Parent)
43 #ifndef ABSTRACT_SVAL_WITH_KIND
44 #define ABSTRACT_SVAL_WITH_KIND(Id, Parent) ABSTRACT_SVAL(Id, Parent)
48 #define LOC_SVAL(Id, Parent)
52 #define NONLOC_SVAL(Id, Parent)
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)
72 #undef ABSTRACT_SVAL_WITH_KIND