HomePhabricator

[analyzer] Fix SVal/SymExpr/MemRegion class and enum names for consistency.

Description

[analyzer] Fix SVal/SymExpr/MemRegion class and enum names for consistency.

The purpose of these changes is to simplify introduction of definition files
for the three hierarchies.

  1. For every sub-class C of these classes, its kind in the relevant enumeration

is changed to "CKind" (or C##Kind in preprocessor-ish terms), eg:

MemRegionKind   -> MemRegionValKind
RegionValueKind -> SymbolRegionValueKind
CastSymbolKind  -> SymbolCastKind
SymIntKind      -> SymIntExprKind
  1. MemSpaceRegion used to be inconsistently used as both an abstract base and

a particular region. This region class is now an abstract base and no longer
occupies GenericMemSpaceRegionKind. Instead, a new class, CodeSpaceRegion,
is introduced for handling the unique use case for MemSpaceRegion as
"the generic memory space" (when it represents a memory space that holds all
executable code).

  1. BEG_ prefixes in memory region kind ranges are renamed to BEGIN_ for

consisitency with symbol kind ranges.

  1. FunctionTextRegion and BlockTextRegion are renamed to FunctionCodeRegion and

BlockCodeRegion, respectively. The term 'code' is less jargony than 'text' and
we already refer to BlockTextRegion as a 'code region' in BlockDataRegion.

Differential Revision: http://reviews.llvm.org/D16062

Details

Committed
NoQJan 13 2016, 5:49 AM
Differential Revision
D16062: [analyzer] Rename kind-enumeration values of SVal, SymExpr, MemRegion classes, for consistency.
Branches
Unknown
Tags
Unknown