Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | //===--- Decl.cpp - Declaration AST Node Implementation -------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 0bc735f | 2007-12-29 19:59:25 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
Argyrios Kyrtzidis | e184bae | 2008-06-04 13:04:04 +0000 | [diff] [blame] | 10 | // This file implements the Decl subclasses. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "clang/AST/Decl.h" |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 15 | #include "clang/AST/ASTContext.h" |
Daniel Dunbar | e91593e | 2008-08-11 04:54:23 +0000 | [diff] [blame] | 16 | #include "clang/AST/Stmt.h" |
| 17 | #include "clang/Basic/IdentifierTable.h" |
Ted Kremenek | 27f8a28 | 2008-05-20 00:43:19 +0000 | [diff] [blame] | 18 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 19 | using namespace clang; |
| 20 | |
Chris Lattner | d3b9065 | 2008-03-15 05:43:15 +0000 | [diff] [blame] | 21 | //===----------------------------------------------------------------------===// |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 22 | // Decl Allocation/Deallocation Method Implementations |
| 23 | //===----------------------------------------------------------------------===// |
Argyrios Kyrtzidis | 2d1c5d3 | 2008-04-27 13:50:30 +0000 | [diff] [blame] | 24 | |
Argyrios Kyrtzidis | ef17782 | 2008-04-17 14:40:12 +0000 | [diff] [blame] | 25 | TranslationUnitDecl *TranslationUnitDecl::Create(ASTContext &C) { |
| 26 | void *Mem = C.getAllocator().Allocate<TranslationUnitDecl>(); |
| 27 | return new (Mem) TranslationUnitDecl(); |
| 28 | } |
| 29 | |
Argyrios Kyrtzidis | 2d1c5d3 | 2008-04-27 13:50:30 +0000 | [diff] [blame] | 30 | NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC, |
| 31 | SourceLocation L, IdentifierInfo *Id) { |
| 32 | void *Mem = C.getAllocator().Allocate<NamespaceDecl>(); |
| 33 | return new (Mem) NamespaceDecl(DC, L, Id); |
| 34 | } |
| 35 | |
Ted Kremenek | d1ac17a | 2008-05-20 04:49:55 +0000 | [diff] [blame] | 36 | void NamespaceDecl::Destroy(ASTContext& C) { |
| 37 | // NamespaceDecl uses "NextDeclarator" to chain namespace declarations |
| 38 | // together. They are all top-level Decls. |
| 39 | |
Ted Kremenek | ebf27b1 | 2008-05-24 15:09:56 +0000 | [diff] [blame] | 40 | this->~NamespaceDecl(); |
Ted Kremenek | d1ac17a | 2008-05-20 04:49:55 +0000 | [diff] [blame] | 41 | C.getAllocator().Deallocate((void *)this); |
| 42 | } |
| 43 | |
| 44 | |
Chris Lattner | 4111024 | 2008-06-17 18:05:57 +0000 | [diff] [blame] | 45 | ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC, |
| 46 | SourceLocation L, IdentifierInfo *Id, QualType T, ScopedDecl *PrevDecl) { |
| 47 | void *Mem = C.getAllocator().Allocate<ImplicitParamDecl>(); |
| 48 | return new (Mem) ImplicitParamDecl(ImplicitParam, DC, L, Id, T, PrevDecl); |
| 49 | } |
| 50 | |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 51 | VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC, |
Steve Naroff | 248a753 | 2008-04-15 22:42:06 +0000 | [diff] [blame] | 52 | SourceLocation L, |
| 53 | IdentifierInfo *Id, QualType T, |
| 54 | StorageClass S, ScopedDecl *PrevDecl) { |
| 55 | void *Mem = C.getAllocator().Allocate<VarDecl>(); |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 56 | return new (Mem) VarDecl(Var, DC, L, Id, T, S, PrevDecl); |
Chris Lattner | 9e151e1 | 2008-03-15 21:10:16 +0000 | [diff] [blame] | 57 | } |
| 58 | |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 59 | ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC, |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 60 | SourceLocation L, IdentifierInfo *Id, |
| 61 | QualType T, StorageClass S, |
Chris Lattner | 0442108 | 2008-04-08 04:40:51 +0000 | [diff] [blame] | 62 | Expr *DefArg, ScopedDecl *PrevDecl) { |
Chris Lattner | 9e151e1 | 2008-03-15 21:10:16 +0000 | [diff] [blame] | 63 | void *Mem = C.getAllocator().Allocate<ParmVarDecl>(); |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 64 | return new (Mem) ParmVarDecl(DC, L, Id, T, S, DefArg, PrevDecl); |
Chris Lattner | 9e151e1 | 2008-03-15 21:10:16 +0000 | [diff] [blame] | 65 | } |
| 66 | |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 67 | FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC, |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 68 | SourceLocation L, |
Chris Lattner | a98e58d | 2008-03-15 21:24:04 +0000 | [diff] [blame] | 69 | IdentifierInfo *Id, QualType T, |
| 70 | StorageClass S, bool isInline, |
| 71 | ScopedDecl *PrevDecl) { |
| 72 | void *Mem = C.getAllocator().Allocate<FunctionDecl>(); |
Argyrios Kyrtzidis | d3bb44f | 2008-06-09 21:05:31 +0000 | [diff] [blame] | 73 | return new (Mem) FunctionDecl(Function, DC, L, Id, T, S, isInline, PrevDecl); |
Chris Lattner | a98e58d | 2008-03-15 21:24:04 +0000 | [diff] [blame] | 74 | } |
| 75 | |
Chris Lattner | b048c98 | 2008-04-06 04:47:34 +0000 | [diff] [blame] | 76 | FieldDecl *FieldDecl::Create(ASTContext &C, SourceLocation L, |
Chris Lattner | 8e25d86 | 2008-03-16 00:16:02 +0000 | [diff] [blame] | 77 | IdentifierInfo *Id, QualType T, Expr *BW) { |
| 78 | void *Mem = C.getAllocator().Allocate<FieldDecl>(); |
Chris Lattner | b048c98 | 2008-04-06 04:47:34 +0000 | [diff] [blame] | 79 | return new (Mem) FieldDecl(L, Id, T, BW); |
Chris Lattner | 8e25d86 | 2008-03-16 00:16:02 +0000 | [diff] [blame] | 80 | } |
| 81 | |
Chris Lattner | a98e58d | 2008-03-15 21:24:04 +0000 | [diff] [blame] | 82 | |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 83 | EnumConstantDecl *EnumConstantDecl::Create(ASTContext &C, EnumDecl *CD, |
| 84 | SourceLocation L, |
Chris Lattner | c63e660 | 2008-03-15 21:32:50 +0000 | [diff] [blame] | 85 | IdentifierInfo *Id, QualType T, |
| 86 | Expr *E, const llvm::APSInt &V, |
| 87 | ScopedDecl *PrevDecl){ |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 88 | void *Mem = C.getAllocator().Allocate<EnumConstantDecl>(); |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 89 | return new (Mem) EnumConstantDecl(CD, L, Id, T, E, V, PrevDecl); |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 90 | } |
| 91 | |
Ted Kremenek | d1ac17a | 2008-05-20 04:49:55 +0000 | [diff] [blame] | 92 | void EnumConstantDecl::Destroy(ASTContext& C) { |
| 93 | if (Init) Init->Destroy(C); |
| 94 | Decl::Destroy(C); |
| 95 | } |
| 96 | |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 97 | TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC, |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 98 | SourceLocation L, |
Chris Lattner | c63e660 | 2008-03-15 21:32:50 +0000 | [diff] [blame] | 99 | IdentifierInfo *Id, QualType T, |
| 100 | ScopedDecl *PD) { |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 101 | void *Mem = C.getAllocator().Allocate<TypedefDecl>(); |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 102 | return new (Mem) TypedefDecl(DC, L, Id, T, PD); |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 103 | } |
| 104 | |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 105 | EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 106 | IdentifierInfo *Id, |
Chris Lattner | c63e660 | 2008-03-15 21:32:50 +0000 | [diff] [blame] | 107 | ScopedDecl *PrevDecl) { |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 108 | void *Mem = C.getAllocator().Allocate<EnumDecl>(); |
Chris Lattner | 9fdf9c6 | 2008-04-22 18:39:57 +0000 | [diff] [blame] | 109 | return new (Mem) EnumDecl(DC, L, Id, PrevDecl); |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 110 | } |
| 111 | |
Ted Kremenek | df91eca | 2008-09-02 20:13:32 +0000 | [diff] [blame] | 112 | void EnumDecl::Destroy(ASTContext& C) { |
| 113 | if (getEnumConstantList()) getEnumConstantList()->Destroy(C); |
| 114 | Decl::Destroy(C); |
| 115 | } |
| 116 | |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 117 | FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, |
| 118 | SourceLocation L, |
Chris Lattner | 8e25d86 | 2008-03-16 00:16:02 +0000 | [diff] [blame] | 119 | StringLiteral *Str) { |
| 120 | void *Mem = C.getAllocator().Allocate<FileScopeAsmDecl>(); |
| 121 | return new (Mem) FileScopeAsmDecl(L, Str); |
| 122 | } |
| 123 | |
Chris Lattner | 0ed844b | 2008-04-04 06:12:32 +0000 | [diff] [blame] | 124 | LinkageSpecDecl *LinkageSpecDecl::Create(ASTContext &C, |
| 125 | SourceLocation L, |
Chris Lattner | 8e25d86 | 2008-03-16 00:16:02 +0000 | [diff] [blame] | 126 | LanguageIDs Lang, Decl *D) { |
| 127 | void *Mem = C.getAllocator().Allocate<LinkageSpecDecl>(); |
| 128 | return new (Mem) LinkageSpecDecl(L, Lang, D); |
| 129 | } |
Chris Lattner | 6c2b6eb | 2008-03-15 06:12:44 +0000 | [diff] [blame] | 130 | |
| 131 | //===----------------------------------------------------------------------===// |
Chris Lattner | 8a93423 | 2008-03-31 00:36:02 +0000 | [diff] [blame] | 132 | // NamedDecl Implementation |
| 133 | //===----------------------------------------------------------------------===// |
| 134 | |
Chris Lattner | fd5de47 | 2007-10-06 22:53:46 +0000 | [diff] [blame] | 135 | const char *NamedDecl::getName() const { |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 136 | if (const IdentifierInfo *II = getIdentifier()) |
| 137 | return II->getName(); |
| 138 | return ""; |
| 139 | } |
| 140 | |
Chris Lattner | 8a93423 | 2008-03-31 00:36:02 +0000 | [diff] [blame] | 141 | //===----------------------------------------------------------------------===// |
Chris Lattner | 8a93423 | 2008-03-31 00:36:02 +0000 | [diff] [blame] | 142 | // FunctionDecl Implementation |
| 143 | //===----------------------------------------------------------------------===// |
| 144 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 145 | FunctionDecl::~FunctionDecl() { |
| 146 | delete[] ParamInfo; |
Douglas Gregor | f009795 | 2008-04-21 02:02:58 +0000 | [diff] [blame] | 147 | } |
| 148 | |
Ted Kremenek | 27f8a28 | 2008-05-20 00:43:19 +0000 | [diff] [blame] | 149 | void FunctionDecl::Destroy(ASTContext& C) { |
Ted Kremenek | b65cf41 | 2008-05-20 03:56:00 +0000 | [diff] [blame] | 150 | if (Body) |
| 151 | Body->Destroy(C); |
| 152 | |
| 153 | for (param_iterator I=param_begin(), E=param_end(); I!=E; ++I) |
| 154 | (*I)->Destroy(C); |
| 155 | |
Ted Kremenek | 27f8a28 | 2008-05-20 00:43:19 +0000 | [diff] [blame] | 156 | Decl::Destroy(C); |
| 157 | } |
| 158 | |
| 159 | |
Douglas Gregor | f009795 | 2008-04-21 02:02:58 +0000 | [diff] [blame] | 160 | Stmt *FunctionDecl::getBody(const FunctionDecl *&Definition) const { |
| 161 | for (const FunctionDecl *FD = this; FD != 0; FD = FD->PreviousDeclaration) { |
| 162 | if (FD->Body) { |
| 163 | Definition = FD; |
| 164 | return FD->Body; |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | return 0; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | unsigned FunctionDecl::getNumParams() const { |
Chris Lattner | d8bdba5 | 2008-04-06 23:09:52 +0000 | [diff] [blame] | 172 | const FunctionType *FT = getType()->getAsFunctionType(); |
| 173 | if (isa<FunctionTypeNoProto>(FT)) |
Chris Lattner | d3b9065 | 2008-03-15 05:43:15 +0000 | [diff] [blame] | 174 | return 0; |
Chris Lattner | d8bdba5 | 2008-04-06 23:09:52 +0000 | [diff] [blame] | 175 | return cast<FunctionTypeProto>(FT)->getNumArgs(); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | void FunctionDecl::setParams(ParmVarDecl **NewParamInfo, unsigned NumParams) { |
| 179 | assert(ParamInfo == 0 && "Already has param info!"); |
| 180 | assert(NumParams == getNumParams() && "Parameter count mismatch!"); |
| 181 | |
| 182 | // Zero params -> null pointer. |
| 183 | if (NumParams) { |
| 184 | ParamInfo = new ParmVarDecl*[NumParams]; |
| 185 | memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams); |
| 186 | } |
| 187 | } |
| 188 | |
Chris Lattner | 8123a95 | 2008-04-10 02:22:51 +0000 | [diff] [blame] | 189 | /// getMinRequiredArguments - Returns the minimum number of arguments |
| 190 | /// needed to call this function. This may be fewer than the number of |
| 191 | /// function parameters, if some of the parameters have default |
Chris Lattner | 9e97955 | 2008-04-12 23:52:44 +0000 | [diff] [blame] | 192 | /// arguments (in C++). |
Chris Lattner | 8123a95 | 2008-04-10 02:22:51 +0000 | [diff] [blame] | 193 | unsigned FunctionDecl::getMinRequiredArguments() const { |
| 194 | unsigned NumRequiredArgs = getNumParams(); |
| 195 | while (NumRequiredArgs > 0 |
| 196 | && getParamDecl(NumRequiredArgs-1)->getDefaultArg()) |
| 197 | --NumRequiredArgs; |
| 198 | |
| 199 | return NumRequiredArgs; |
| 200 | } |
| 201 | |
Chris Lattner | 8a93423 | 2008-03-31 00:36:02 +0000 | [diff] [blame] | 202 | //===----------------------------------------------------------------------===// |
| 203 | // RecordDecl Implementation |
| 204 | //===----------------------------------------------------------------------===// |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 205 | |
Ted Kremenek | 6359792 | 2008-09-02 21:12:32 +0000 | [diff] [blame^] | 206 | RecordDecl::RecordDecl(Kind DK, DeclContext *DC, SourceLocation L, |
| 207 | IdentifierInfo *Id, RecordDecl *PrevDecl) |
| 208 | : TagDecl(DK, DC, L, Id, 0), NextDecl(0) { |
| 209 | |
| 210 | HasFlexibleArrayMember = false; |
| 211 | assert(classof(static_cast<Decl*>(this)) && "Invalid Kind!"); |
| 212 | Members = 0; |
| 213 | NumMembers = -1; |
| 214 | |
| 215 | // Hook up the RecordDecl chain. |
| 216 | if (PrevDecl) { |
| 217 | RecordDecl* Tmp = PrevDecl->NextDecl; |
| 218 | // 'Tmp' might be non-NULL if it is the RecordDecl that provides the |
| 219 | // definition of the struct/union. By construction, the last RecordDecl |
| 220 | // in the chain is the 'defining' RecordDecl. |
| 221 | if (Tmp) { |
| 222 | assert (Tmp->NextDecl == 0); |
| 223 | assert (Tmp->isDefinition() |
| 224 | && "Previous RecordDecl has a NextDecl that is " |
| 225 | "not the 'defining' RecordDecl"); |
| 226 | |
| 227 | NextDecl = Tmp; |
| 228 | } |
| 229 | |
| 230 | PrevDecl->NextDecl = this; |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | RecordDecl *RecordDecl::Create(ASTContext &C, TagKind TK, DeclContext *DC, |
| 235 | SourceLocation L, IdentifierInfo *Id, |
| 236 | RecordDecl *PrevDecl) { |
| 237 | void *Mem = C.getAllocator().Allocate<RecordDecl>(); |
| 238 | Kind DK; |
| 239 | switch (TK) { |
| 240 | default: assert(0 && "Invalid TagKind!"); |
| 241 | case TK_enum: assert(0 && "Enum TagKind passed for Record!"); |
| 242 | case TK_struct: DK = Struct; break; |
| 243 | case TK_union: DK = Union; break; |
| 244 | case TK_class: DK = Class; break; |
| 245 | } |
| 246 | return new (Mem) RecordDecl(DK, DC, L, Id, PrevDecl); |
| 247 | } |
| 248 | |
Argyrios Kyrtzidis | 997b6c6 | 2008-08-08 14:08:55 +0000 | [diff] [blame] | 249 | RecordDecl::~RecordDecl() { |
| 250 | delete[] Members; |
| 251 | } |
| 252 | |
| 253 | void RecordDecl::Destroy(ASTContext& C) { |
| 254 | if (isDefinition()) |
| 255 | for (field_iterator I=field_begin(), E=field_end(); I!=E; ++I) |
| 256 | (*I)->Destroy(C); |
| 257 | |
| 258 | TagDecl::Destroy(C); |
| 259 | } |
| 260 | |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 261 | /// defineBody - When created, RecordDecl's correspond to a forward declared |
| 262 | /// record. This method is used to mark the decl as being defined, with the |
| 263 | /// specified contents. |
| 264 | void RecordDecl::defineBody(FieldDecl **members, unsigned numMembers) { |
| 265 | assert(!isDefinition() && "Cannot redefine record!"); |
| 266 | setDefinition(true); |
| 267 | NumMembers = numMembers; |
| 268 | if (numMembers) { |
| 269 | Members = new FieldDecl*[numMembers]; |
| 270 | memcpy(Members, members, numMembers*sizeof(Decl*)); |
| 271 | } |
| 272 | } |
| 273 | |
Chris Lattner | 8a93423 | 2008-03-31 00:36:02 +0000 | [diff] [blame] | 274 | FieldDecl *RecordDecl::getMember(IdentifierInfo *II) { |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 275 | if (Members == 0 || NumMembers < 0) |
| 276 | return 0; |
Fariborz Jahanian | 3f5faf7 | 2007-10-04 00:45:27 +0000 | [diff] [blame] | 277 | |
Chris Lattner | 8a93423 | 2008-03-31 00:36:02 +0000 | [diff] [blame] | 278 | // Linear search. When C++ classes come along, will likely need to revisit. |
| 279 | for (int i = 0; i != NumMembers; ++i) |
| 280 | if (Members[i]->getIdentifier() == II) |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 281 | return Members[i]; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 282 | return 0; |
Chris Lattner | 6fa5f09 | 2007-07-12 15:43:07 +0000 | [diff] [blame] | 283 | } |
Ted Kremenek | 6359792 | 2008-09-02 21:12:32 +0000 | [diff] [blame^] | 284 | |
| 285 | /// getDefinitionDecl - Returns the RecordDecl for the struct/union that |
| 286 | /// represents the actual definition (i.e., not a forward declaration). |
| 287 | /// This method returns NULL if no such RecordDecl exists. |
| 288 | const RecordDecl* RecordDecl::getDefinitionDecl() const { |
| 289 | const RecordDecl* R = this; |
| 290 | |
| 291 | for (RecordDecl* N = R->NextDecl; N; N = R->NextDecl) |
| 292 | R = N; |
| 293 | |
| 294 | return R->Members ? R : 0; |
| 295 | } |
| 296 | |