1//===-- SVals.def - Metadata about SVal kinds -------------------*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9// The list of symbolic values (SVal kinds) used in the Static Analyzer.
10// 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:
14//
15// BASIC_SVAL(Id, Parent) - for specific SVal kinds, which are
16// neither in `loc::` nor in `nonloc::` namespace.
17//
18// ABSTRACT_SVAL(Id, Parent) - for abstract SVal classes which are
19// neither in `loc::` nor in `nonloc::` namespace,
20//
21// LOC_SVAL(Id, Parent) - for values in `loc::` namespace.
22//
23// NONLOC_SVAL(Id, Parent) - for values in `nonloc::` namespace.
24//
25// SVAL_RANGE(Id, First, Last) - for defining range of subtypes of
26// the abstract class `Id`.
27//
28//===----------------------------------------------------------------------===//
29
30#ifndef BASIC_SVAL
31#define BASIC_SVAL(Id, Parent)
32#endif
33
34#ifndef ABSTRACT_SVAL
35#define ABSTRACT_SVAL(Id, Parent)
36#endif
37
38#ifndef LOC_SVAL
39#define LOC_SVAL(Id, Parent)
40#endif
41
42#ifndef NONLOC_SVAL
43#define NONLOC_SVAL(Id, Parent)
44#endif
45
46#ifndef SVAL_RANGE
47#define SVAL_RANGE(Id, First, Last)
48#endif
49
50BASIC_SVAL(UndefinedVal, SVal)
51ABSTRACT_SVAL(DefinedOrUnknownSVal, SVal)
52 BASIC_SVAL(UnknownVal, DefinedOrUnknownSVal)
53 ABSTRACT_SVAL(DefinedSVal, DefinedOrUnknownSVal)
54 ABSTRACT_SVAL(Loc, DefinedSVal)
55 LOC_SVAL(ConcreteInt, Loc)
56 LOC_SVAL(GotoLabel, Loc)
57 LOC_SVAL(MemRegionVal, Loc)
58 SVAL_RANGE(Loc, ConcreteInt, MemRegionVal)
59 ABSTRACT_SVAL(NonLoc, DefinedSVal)
60 NONLOC_SVAL(CompoundVal, NonLoc)
61 NONLOC_SVAL(ConcreteInt, NonLoc)
62 NONLOC_SVAL(LazyCompoundVal, NonLoc)
63 NONLOC_SVAL(LocAsInteger, NonLoc)
64 NONLOC_SVAL(SymbolVal, NonLoc)
65 NONLOC_SVAL(PointerToMember, NonLoc)
66 SVAL_RANGE(NonLoc, CompoundVal, PointerToMember)
67
68#undef SVAL_RANGE
69#undef NONLOC_SVAL
70#undef LOC_SVAL
71#undef ABSTRACT_SVAL
72#undef BASIC_SVAL
73

source code of clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.def