clang
15.0.0git
include
clang
StaticAnalyzer
Core
PathSensitive
StoreRef.h
Go to the documentation of this file.
1
//===- StoreRef.h - Smart pointer for store objects -------------*- 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
// This file defined the type StoreRef.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_STOREREF_H
14
#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_STOREREF_H
15
16
#include <cassert>
17
18
namespace
clang
{
19
namespace
ento {
20
21
class
StoreManager;
22
23
/// Store - This opaque type encapsulates an immutable mapping from
24
/// locations to values. At a high-level, it represents the symbolic
25
/// memory model. Different subclasses of StoreManager may choose
26
/// different types to represent the locations and values.
27
using
Store
=
const
void
*;
28
29
class
StoreRef
{
30
Store
store;
31
StoreManager
&mgr;
32
33
public
:
34
StoreRef
(
Store
store,
StoreManager
&smgr);
35
StoreRef
(
const
StoreRef
&sr);
36
StoreRef
&
operator=
(
StoreRef
const
&newStore);
37
~StoreRef
();
38
39
bool
operator==
(
const
StoreRef
&
x
)
const
{
40
assert(&mgr == &
x
.mgr);
41
return
x
.store == store;
42
}
43
44
bool
operator!=
(
const
StoreRef
&
x
)
const
{
return
!
operator==
(
x
); }
45
46
Store
getStore
()
const
{
return
store; }
47
const
StoreManager
&
getStoreManager
()
const
{
return
mgr; }
48
};
49
50
}
// namespace ento
51
}
// namespace clang
52
53
#endif // LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_STOREREF_H
clang::ento::StoreRef::getStoreManager
const StoreManager & getStoreManager() const
Definition:
StoreRef.h:47
clang::ento::Store
const void * Store
Store - This opaque type encapsulates an immutable mapping from locations to values.
Definition:
StoreRef.h:27
clang::ento::StoreManager
Definition:
Store.h:53
clang::ento::StoreRef::getStore
Store getStore() const
Definition:
StoreRef.h:46
clang::ento::StoreRef
Definition:
StoreRef.h:29
x
IRgen optimization opportunities The common pattern of short x
Definition:
README.txt:7
clang::ento::StoreRef::StoreRef
StoreRef(Store store, StoreManager &smgr)
Definition:
Store.h:288
clang::ento::StoreRef::operator!=
bool operator!=(const StoreRef &x) const
Definition:
StoreRef.h:44
clang::ento::StoreRef::~StoreRef
~StoreRef()
Definition:
Store.h:301
clang::ento::StoreRef::operator=
StoreRef & operator=(StoreRef const &newStore)
Definition:
Store.h:306
clang
Definition:
CalledOnceCheck.h:17
clang::ento::StoreRef::operator==
bool operator==(const StoreRef &x) const
Definition:
StoreRef.h:39
Generated on Fri May 20 2022 02:00:44 for clang by
1.8.17