1 //===-- SVals.def - Metadata about SVal kinds -------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // The list of symbolic values (SVal kinds and sub-kinds) used in the Static
10 // Analyzer. The distinction between loc:: and nonloc:: SVal namespaces is
11 // currently hardcoded, because it is too peculiar and explicit to be handled
12 // uniformly. In order to use this information, users of this file must define
13 // one or more of the following macros:
15 // BASIC_SVAL(Id, Parent) - for specific SVal sub-kinds, which are
16 // neither in loc:: nor in nonloc:: namespace; these classes occupy
17 // their own base kind IdKind.
19 // ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are
20 // neither in loc:: nor in nonloc:: namespace,
22 // ABSTRACT_SVAL_WITH_KIND(Id, Parent) - for SVal classes which are also
23 // neither in loc:: nor in nonloc:: namespace, but occupy a whole base kind
24 // identifier IdKind, much like BASIC_SVALs.
26 // LOC_SVAL(Id, Parent) - for values in loc:: namespace, which occupy a sub-kind
29 // NONLOC_SVAL(Id, Parent) - for values in nonloc:: namespace, which occupy a
30 // sub-kind nonloc::IdKind.
32 //===----------------------------------------------------------------------===//
35 #define BASIC_SVAL(Id, Parent)
39 #define ABSTRACT_SVAL(Id, Parent)
42 #ifndef ABSTRACT_SVAL_WITH_KIND
43 #define ABSTRACT_SVAL_WITH_KIND(Id, Parent) ABSTRACT_SVAL(Id, Parent)
47 #define LOC_SVAL(Id, Parent)
51 #define NONLOC_SVAL(Id, Parent)
54 BASIC_SVAL(UndefinedVal, SVal)
55 ABSTRACT_SVAL(DefinedOrUnknownSVal, SVal)
56 BASIC_SVAL(UnknownVal, DefinedOrUnknownSVal)
57 ABSTRACT_SVAL(DefinedSVal, DefinedOrUnknownSVal)
58 ABSTRACT_SVAL_WITH_KIND(Loc, DefinedSVal)
59 LOC_SVAL(ConcreteInt, Loc)
60 LOC_SVAL(GotoLabel, Loc)
61 LOC_SVAL(MemRegionVal, Loc)
62 ABSTRACT_SVAL_WITH_KIND(NonLoc, DefinedSVal)
63 NONLOC_SVAL(CompoundVal, NonLoc)
64 NONLOC_SVAL(ConcreteInt, NonLoc)
65 NONLOC_SVAL(LazyCompoundVal, NonLoc)
66 NONLOC_SVAL(LocAsInteger, NonLoc)
67 NONLOC_SVAL(SymbolVal, NonLoc)
68 NONLOC_SVAL(PointerToMember, NonLoc)
72 #undef ABSTRACT_SVAL_WITH_KIND