]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Regions.def
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / StaticAnalyzer / Core / PathSensitive / Regions.def
1 //===-- Regions.def - Metadata about MemRegion 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 regions (MemRegion sub-classes) used in the Static Analyzer.
11 // In order to use this information, users of this file must define one or more
12 // of the three macros:
13 //
14 // REGION(Id, Parent) - for specific MemRegion sub-classes, reserving
15 // enum value IdKind for their kind.
16 //
17 // ABSTRACT_REGION(Id, Parent) - for abstract region classes,
18 //
19 // REGION_RANGE(Id, First, Last) - for ranges of kind-enums,
20 // allowing to determine abstract class of a region
21 // based on the kind-enum value.
22 //
23 //===----------------------------------------------------------------------===//
24
25 #ifndef REGION
26 #define REGION(Id, Parent)
27 #endif
28
29 #ifndef ABSTRACT_REGION
30 #define ABSTRACT_REGION(Id, Parent)
31 #endif
32
33 #ifndef REGION_RANGE
34 #define REGION_RANGE(Id, First, Last)
35 #endif
36
37 ABSTRACT_REGION(MemSpaceRegion, MemRegion)
38   REGION(CodeSpaceRegion, MemSpaceRegion)
39   ABSTRACT_REGION(GlobalsSpaceRegion, MemSpaceRegion)
40     ABSTRACT_REGION(NonStaticGlobalSpaceRegion, GlobalsSpaceRegion)
41       REGION(GlobalImmutableSpaceRegion, NonStaticGlobalSpaceRegion)
42       REGION(GlobalInternalSpaceRegion, NonStaticGlobalSpaceRegion)
43       REGION(GlobalSystemSpaceRegion, NonStaticGlobalSpaceRegion)
44       REGION_RANGE(NON_STATIC_GLOBAL_MEMSPACES, GlobalImmutableSpaceRegionKind,
45                                                 GlobalSystemSpaceRegionKind)
46     REGION(StaticGlobalSpaceRegion, MemSpaceRegion)
47     REGION_RANGE(GLOBAL_MEMSPACES, GlobalImmutableSpaceRegionKind,
48                                    StaticGlobalSpaceRegionKind)
49   REGION(HeapSpaceRegion, MemSpaceRegion)
50   ABSTRACT_REGION(StackSpaceRegion, MemSpaceRegion)
51     REGION(StackArgumentsSpaceRegion, StackSpaceRegion)
52     REGION(StackLocalsSpaceRegion, StackSpaceRegion)
53     REGION_RANGE(STACK_MEMSPACES, StackArgumentsSpaceRegionKind,
54                                   StackLocalsSpaceRegionKind)
55   REGION(UnknownSpaceRegion, MemSpaceRegion)
56   REGION_RANGE(MEMSPACES, CodeSpaceRegionKind,
57                           UnknownSpaceRegionKind)
58 ABSTRACT_REGION(SubRegion, MemRegion)
59   REGION(AllocaRegion, SubRegion)
60   REGION(SymbolicRegion, SubRegion)
61   ABSTRACT_REGION(TypedRegion, SubRegion)
62     REGION(BlockDataRegion, TypedRegion)
63     ABSTRACT_REGION(CodeTextRegion, TypedRegion)
64       REGION(BlockCodeRegion, CodeTextRegion)
65       REGION(FunctionCodeRegion, CodeTextRegion)
66       REGION_RANGE(CODE_TEXT_REGIONS, BlockCodeRegionKind,
67                                       FunctionCodeRegionKind)
68     ABSTRACT_REGION(TypedValueRegion, TypedRegion)
69       REGION(CompoundLiteralRegion, TypedValueRegion)
70       REGION(CXXBaseObjectRegion, TypedValueRegion)
71       REGION(CXXDerivedObjectRegion, TypedValueRegion)
72       REGION(CXXTempObjectRegion, TypedValueRegion)
73       REGION(CXXThisRegion, TypedValueRegion)
74       ABSTRACT_REGION(DeclRegion, TypedValueRegion)
75         REGION(FieldRegion, DeclRegion)
76         REGION(ObjCIvarRegion, DeclRegion)
77         REGION(VarRegion, DeclRegion)
78         REGION_RANGE(DECL_REGIONS, FieldRegionKind,
79                                    VarRegionKind)
80       REGION(ElementRegion, TypedValueRegion)
81       REGION(ObjCStringRegion, TypedValueRegion)
82       REGION(StringRegion, TypedValueRegion)
83       REGION_RANGE(TYPED_VALUE_REGIONS, CompoundLiteralRegionKind,
84                                         StringRegionKind)
85     REGION_RANGE(TYPED_REGIONS, BlockDataRegionKind,
86                                 StringRegionKind)
87
88 #undef REGION_RANGE
89 #undef ABSTRACT_REGION
90 #undef REGION