8 #include <hilti/ast/attribute.h> 9 #include <hilti/ast/id.h> 10 #include <hilti/ast/type.h> 22 :
DeclarationBase(nodes(std::move(
id), std::move(type), std::move(attrs)), std::move(m)), _linkage(
linkage) {}
24 const auto& type()
const {
return child<hilti::Type>(1); }
28 bool isOnHeap()
const {
29 if (
auto x = attributes() )
30 return x->find(
"&on-heap").has_value();
44 void setType(const ::hilti::Type& t) {
children()[1] = t; }
46 bool operator==(
const Type& other)
const {
return id() == other.
id() && type() == other.type(); }
54 const ID&
id()
const {
return child<ID>(0); }
56 Linkage
linkage()
const {
return _linkage; }
Definition: declaration.h:53
bool isConstant() const
Definition: type.h:52
const Node none
Definition: node.cc:14
const ID & id() const
Definition: type.h:54
auto typeID() const
Definition: type.h:36
const auto & children() const
Definition: node.h:471
auto isEqual(const Declaration &other) const
Definition: type.h:60
auto properties() const
Definition: type.h:63
Definition: attribute.h:174
Definition: declaration.h:87
auto cxxID() const
Definition: type.h:39
auto resolvedID() const
Definition: type.h:42
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:97
Definition: node-ref.h:45
Definition: declaration.h:18
Linkage linkage() const
Definition: type.h:56
std::string displayName() const
Definition: type.h:58