/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/AST/DeclBase.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===- DeclBase.h - Base Classes for representing declarations --*- 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 defines the Decl and DeclContext interfaces. |
10 | | // |
11 | | //===----------------------------------------------------------------------===// |
12 | | |
13 | | #ifndef LLVM_CLANG_AST_DECLBASE_H |
14 | | #define LLVM_CLANG_AST_DECLBASE_H |
15 | | |
16 | | #include "clang/AST/ASTDumperUtils.h" |
17 | | #include "clang/AST/AttrIterator.h" |
18 | | #include "clang/AST/DeclarationName.h" |
19 | | #include "clang/AST/SelectorLocationsKind.h" |
20 | | #include "clang/Basic/IdentifierTable.h" |
21 | | #include "clang/Basic/LLVM.h" |
22 | | #include "clang/Basic/LangOptions.h" |
23 | | #include "clang/Basic/SourceLocation.h" |
24 | | #include "clang/Basic/Specifiers.h" |
25 | | #include "llvm/ADT/ArrayRef.h" |
26 | | #include "llvm/ADT/PointerIntPair.h" |
27 | | #include "llvm/ADT/PointerUnion.h" |
28 | | #include "llvm/ADT/iterator.h" |
29 | | #include "llvm/ADT/iterator_range.h" |
30 | | #include "llvm/Support/Casting.h" |
31 | | #include "llvm/Support/Compiler.h" |
32 | | #include "llvm/Support/PrettyStackTrace.h" |
33 | | #include "llvm/Support/VersionTuple.h" |
34 | | #include <algorithm> |
35 | | #include <cassert> |
36 | | #include <cstddef> |
37 | | #include <iterator> |
38 | | #include <string> |
39 | | #include <type_traits> |
40 | | #include <utility> |
41 | | |
42 | | namespace clang { |
43 | | |
44 | | class ASTContext; |
45 | | class ASTMutationListener; |
46 | | class Attr; |
47 | | class BlockDecl; |
48 | | class DeclContext; |
49 | | class ExternalSourceSymbolAttr; |
50 | | class FunctionDecl; |
51 | | class FunctionType; |
52 | | class IdentifierInfo; |
53 | | enum class Linkage : unsigned char; |
54 | | class LinkageSpecDecl; |
55 | | class Module; |
56 | | class NamedDecl; |
57 | | class ObjCContainerDecl; |
58 | | class ObjCMethodDecl; |
59 | | struct PrintingPolicy; |
60 | | class RecordDecl; |
61 | | class SourceManager; |
62 | | class Stmt; |
63 | | class StoredDeclsMap; |
64 | | class TemplateDecl; |
65 | | class TemplateParameterList; |
66 | | class TranslationUnitDecl; |
67 | | class UsingDirectiveDecl; |
68 | | |
69 | | /// Captures the result of checking the availability of a |
70 | | /// declaration. |
71 | | enum AvailabilityResult { |
72 | | AR_Available = 0, |
73 | | AR_NotYetIntroduced, |
74 | | AR_Deprecated, |
75 | | AR_Unavailable |
76 | | }; |
77 | | |
78 | | /// Decl - This represents one declaration (or definition), e.g. a variable, |
79 | | /// typedef, function, struct, etc. |
80 | | /// |
81 | | /// Note: There are objects tacked on before the *beginning* of Decl |
82 | | /// (and its subclasses) in its Decl::operator new(). Proper alignment |
83 | | /// of all subclasses (not requiring more than the alignment of Decl) is |
84 | | /// asserted in DeclBase.cpp. |
85 | | class alignas(8) Decl { |
86 | | public: |
87 | | /// Lists the kind of concrete classes of Decl. |
88 | | enum Kind { |
89 | | #define DECL(DERIVED, BASE) DERIVED, |
90 | | #define ABSTRACT_DECL(DECL) |
91 | | #define DECL_RANGE(BASE, START, END) \ |
92 | | first##BASE = START, last##BASE = END, |
93 | | #define LAST_DECL_RANGE(BASE, START, END) \ |
94 | | first##BASE = START, last##BASE = END |
95 | | #include "clang/AST/DeclNodes.inc" |
96 | | }; |
97 | | |
98 | | /// A placeholder type used to construct an empty shell of a |
99 | | /// decl-derived type that will be filled in later (e.g., by some |
100 | | /// deserialization method). |
101 | | struct EmptyShell {}; |
102 | | |
103 | | /// IdentifierNamespace - The different namespaces in which |
104 | | /// declarations may appear. According to C99 6.2.3, there are |
105 | | /// four namespaces, labels, tags, members and ordinary |
106 | | /// identifiers. C++ describes lookup completely differently: |
107 | | /// certain lookups merely "ignore" certain kinds of declarations, |
108 | | /// usually based on whether the declaration is of a type, etc. |
109 | | /// |
110 | | /// These are meant as bitmasks, so that searches in |
111 | | /// C++ can look into the "tag" namespace during ordinary lookup. |
112 | | /// |
113 | | /// Decl currently provides 15 bits of IDNS bits. |
114 | | enum IdentifierNamespace { |
115 | | /// Labels, declared with 'x:' and referenced with 'goto x'. |
116 | | IDNS_Label = 0x0001, |
117 | | |
118 | | /// Tags, declared with 'struct foo;' and referenced with |
119 | | /// 'struct foo'. All tags are also types. This is what |
120 | | /// elaborated-type-specifiers look for in C. |
121 | | /// This also contains names that conflict with tags in the |
122 | | /// same scope but that are otherwise ordinary names (non-type |
123 | | /// template parameters and indirect field declarations). |
124 | | IDNS_Tag = 0x0002, |
125 | | |
126 | | /// Types, declared with 'struct foo', typedefs, etc. |
127 | | /// This is what elaborated-type-specifiers look for in C++, |
128 | | /// but note that it's ill-formed to find a non-tag. |
129 | | IDNS_Type = 0x0004, |
130 | | |
131 | | /// Members, declared with object declarations within tag |
132 | | /// definitions. In C, these can only be found by "qualified" |
133 | | /// lookup in member expressions. In C++, they're found by |
134 | | /// normal lookup. |
135 | | IDNS_Member = 0x0008, |
136 | | |
137 | | /// Namespaces, declared with 'namespace foo {}'. |
138 | | /// Lookup for nested-name-specifiers find these. |
139 | | IDNS_Namespace = 0x0010, |
140 | | |
141 | | /// Ordinary names. In C, everything that's not a label, tag, |
142 | | /// member, or function-local extern ends up here. |
143 | | IDNS_Ordinary = 0x0020, |
144 | | |
145 | | /// Objective C \@protocol. |
146 | | IDNS_ObjCProtocol = 0x0040, |
147 | | |
148 | | /// This declaration is a friend function. A friend function |
149 | | /// declaration is always in this namespace but may also be in |
150 | | /// IDNS_Ordinary if it was previously declared. |
151 | | IDNS_OrdinaryFriend = 0x0080, |
152 | | |
153 | | /// This declaration is a friend class. A friend class |
154 | | /// declaration is always in this namespace but may also be in |
155 | | /// IDNS_Tag|IDNS_Type if it was previously declared. |
156 | | IDNS_TagFriend = 0x0100, |
157 | | |
158 | | /// This declaration is a using declaration. A using declaration |
159 | | /// *introduces* a number of other declarations into the current |
160 | | /// scope, and those declarations use the IDNS of their targets, |
161 | | /// but the actual using declarations go in this namespace. |
162 | | IDNS_Using = 0x0200, |
163 | | |
164 | | /// This declaration is a C++ operator declared in a non-class |
165 | | /// context. All such operators are also in IDNS_Ordinary. |
166 | | /// C++ lexical operator lookup looks for these. |
167 | | IDNS_NonMemberOperator = 0x0400, |
168 | | |
169 | | /// This declaration is a function-local extern declaration of a |
170 | | /// variable or function. This may also be IDNS_Ordinary if it |
171 | | /// has been declared outside any function. These act mostly like |
172 | | /// invisible friend declarations, but are also visible to unqualified |
173 | | /// lookup within the scope of the declaring function. |
174 | | IDNS_LocalExtern = 0x0800, |
175 | | |
176 | | /// This declaration is an OpenMP user defined reduction construction. |
177 | | IDNS_OMPReduction = 0x1000, |
178 | | |
179 | | /// This declaration is an OpenMP user defined mapper. |
180 | | IDNS_OMPMapper = 0x2000, |
181 | | }; |
182 | | |
183 | | /// ObjCDeclQualifier - 'Qualifiers' written next to the return and |
184 | | /// parameter types in method declarations. Other than remembering |
185 | | /// them and mangling them into the method's signature string, these |
186 | | /// are ignored by the compiler; they are consumed by certain |
187 | | /// remote-messaging frameworks. |
188 | | /// |
189 | | /// in, inout, and out are mutually exclusive and apply only to |
190 | | /// method parameters. bycopy and byref are mutually exclusive and |
191 | | /// apply only to method parameters (?). oneway applies only to |
192 | | /// results. All of these expect their corresponding parameter to |
193 | | /// have a particular type. None of this is currently enforced by |
194 | | /// clang. |
195 | | /// |
196 | | /// This should be kept in sync with ObjCDeclSpec::ObjCDeclQualifier. |
197 | | enum ObjCDeclQualifier { |
198 | | OBJC_TQ_None = 0x0, |
199 | | OBJC_TQ_In = 0x1, |
200 | | OBJC_TQ_Inout = 0x2, |
201 | | OBJC_TQ_Out = 0x4, |
202 | | OBJC_TQ_Bycopy = 0x8, |
203 | | OBJC_TQ_Byref = 0x10, |
204 | | OBJC_TQ_Oneway = 0x20, |
205 | | |
206 | | /// The nullability qualifier is set when the nullability of the |
207 | | /// result or parameter was expressed via a context-sensitive |
208 | | /// keyword. |
209 | | OBJC_TQ_CSNullability = 0x40 |
210 | | }; |
211 | | |
212 | | /// The kind of ownership a declaration has, for visibility purposes. |
213 | | /// This enumeration is designed such that higher values represent higher |
214 | | /// levels of name hiding. |
215 | | enum class ModuleOwnershipKind : unsigned char { |
216 | | /// This declaration is not owned by a module. |
217 | | Unowned, |
218 | | |
219 | | /// This declaration has an owning module, but is globally visible |
220 | | /// (typically because its owning module is visible and we know that |
221 | | /// modules cannot later become hidden in this compilation). |
222 | | /// After serialization and deserialization, this will be converted |
223 | | /// to VisibleWhenImported. |
224 | | Visible, |
225 | | |
226 | | /// This declaration has an owning module, and is visible when that |
227 | | /// module is imported. |
228 | | VisibleWhenImported, |
229 | | |
230 | | /// This declaration has an owning module, and is visible to lookups |
231 | | /// that occurs within that module. And it is reachable in other module |
232 | | /// when the owning module is transitively imported. |
233 | | ReachableWhenImported, |
234 | | |
235 | | /// This declaration has an owning module, but is only visible to |
236 | | /// lookups that occur within that module. |
237 | | /// The discarded declarations in global module fragment belongs |
238 | | /// to this group too. |
239 | | ModulePrivate |
240 | | }; |
241 | | |
242 | | protected: |
243 | | /// The next declaration within the same lexical |
244 | | /// DeclContext. These pointers form the linked list that is |
245 | | /// traversed via DeclContext's decls_begin()/decls_end(). |
246 | | /// |
247 | | /// The extra three bits are used for the ModuleOwnershipKind. |
248 | | llvm::PointerIntPair<Decl *, 3, ModuleOwnershipKind> NextInContextAndBits; |
249 | | |
250 | | private: |
251 | | friend class DeclContext; |
252 | | |
253 | | struct MultipleDC { |
254 | | DeclContext *SemanticDC; |
255 | | DeclContext *LexicalDC; |
256 | | }; |
257 | | |
258 | | /// DeclCtx - Holds either a DeclContext* or a MultipleDC*. |
259 | | /// For declarations that don't contain C++ scope specifiers, it contains |
260 | | /// the DeclContext where the Decl was declared. |
261 | | /// For declarations with C++ scope specifiers, it contains a MultipleDC* |
262 | | /// with the context where it semantically belongs (SemanticDC) and the |
263 | | /// context where it was lexically declared (LexicalDC). |
264 | | /// e.g.: |
265 | | /// |
266 | | /// namespace A { |
267 | | /// void f(); // SemanticDC == LexicalDC == 'namespace A' |
268 | | /// } |
269 | | /// void A::f(); // SemanticDC == namespace 'A' |
270 | | /// // LexicalDC == global namespace |
271 | | llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx; |
272 | | |
273 | 12.8G | bool isInSemaDC() const { return DeclCtx.is<DeclContext*>(); } |
274 | 0 | bool isOutOfSemaDC() const { return DeclCtx.is<MultipleDC*>(); } |
275 | | |
276 | 191M | MultipleDC *getMultipleDC() const { |
277 | 191M | return DeclCtx.get<MultipleDC*>(); |
278 | 191M | } |
279 | | |
280 | 12.6G | DeclContext *getSemanticDC() const { |
281 | 12.6G | return DeclCtx.get<DeclContext*>(); |
282 | 12.6G | } |
283 | | |
284 | | /// Loc - The location of this decl. |
285 | | SourceLocation Loc; |
286 | | |
287 | | /// DeclKind - This indicates which class this is. |
288 | | LLVM_PREFERRED_TYPE(Kind) |
289 | | unsigned DeclKind : 7; |
290 | | |
291 | | /// InvalidDecl - This indicates a semantic error occurred. |
292 | | LLVM_PREFERRED_TYPE(bool) |
293 | | unsigned InvalidDecl : 1; |
294 | | |
295 | | /// HasAttrs - This indicates whether the decl has attributes or not. |
296 | | LLVM_PREFERRED_TYPE(bool) |
297 | | unsigned HasAttrs : 1; |
298 | | |
299 | | /// Implicit - Whether this declaration was implicitly generated by |
300 | | /// the implementation rather than explicitly written by the user. |
301 | | LLVM_PREFERRED_TYPE(bool) |
302 | | unsigned Implicit : 1; |
303 | | |
304 | | /// Whether this declaration was "used", meaning that a definition is |
305 | | /// required. |
306 | | LLVM_PREFERRED_TYPE(bool) |
307 | | unsigned Used : 1; |
308 | | |
309 | | /// Whether this declaration was "referenced". |
310 | | /// The difference with 'Used' is whether the reference appears in a |
311 | | /// evaluated context or not, e.g. functions used in uninstantiated templates |
312 | | /// are regarded as "referenced" but not "used". |
313 | | LLVM_PREFERRED_TYPE(bool) |
314 | | unsigned Referenced : 1; |
315 | | |
316 | | /// Whether this declaration is a top-level declaration (function, |
317 | | /// global variable, etc.) that is lexically inside an objc container |
318 | | /// definition. |
319 | | LLVM_PREFERRED_TYPE(bool) |
320 | | unsigned TopLevelDeclInObjCContainer : 1; |
321 | | |
322 | | /// Whether statistic collection is enabled. |
323 | | static bool StatisticsEnabled; |
324 | | |
325 | | protected: |
326 | | friend class ASTDeclReader; |
327 | | friend class ASTDeclWriter; |
328 | | friend class ASTNodeImporter; |
329 | | friend class ASTReader; |
330 | | friend class CXXClassMemberWrapper; |
331 | | friend class LinkageComputer; |
332 | | friend class RecordDecl; |
333 | | template<typename decl_type> friend class Redeclarable; |
334 | | |
335 | | /// Access - Used by C++ decls for the access specifier. |
336 | | // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum |
337 | | LLVM_PREFERRED_TYPE(AccessSpecifier) |
338 | | unsigned Access : 2; |
339 | | |
340 | | /// Whether this declaration was loaded from an AST file. |
341 | | LLVM_PREFERRED_TYPE(bool) |
342 | | unsigned FromASTFile : 1; |
343 | | |
344 | | /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. |
345 | | LLVM_PREFERRED_TYPE(IdentifierNamespace) |
346 | | unsigned IdentifierNamespace : 14; |
347 | | |
348 | | /// If 0, we have not computed the linkage of this declaration. |
349 | | LLVM_PREFERRED_TYPE(Linkage) |
350 | | mutable unsigned CacheValidAndLinkage : 3; |
351 | | |
352 | | /// Allocate memory for a deserialized declaration. |
353 | | /// |
354 | | /// This routine must be used to allocate memory for any declaration that is |
355 | | /// deserialized from a module file. |
356 | | /// |
357 | | /// \param Size The size of the allocated object. |
358 | | /// \param Ctx The context in which we will allocate memory. |
359 | | /// \param ID The global ID of the deserialized declaration. |
360 | | /// \param Extra The amount of extra space to allocate after the object. |
361 | | void *operator new(std::size_t Size, const ASTContext &Ctx, unsigned ID, |
362 | | std::size_t Extra = 0); |
363 | | |
364 | | /// Allocate memory for a non-deserialized declaration. |
365 | | void *operator new(std::size_t Size, const ASTContext &Ctx, |
366 | | DeclContext *Parent, std::size_t Extra = 0); |
367 | | |
368 | | private: |
369 | | bool AccessDeclContextCheck() const; |
370 | | |
371 | | /// Get the module ownership kind to use for a local lexical child of \p DC, |
372 | | /// which may be either a local or (rarely) an imported declaration. |
373 | 188M | static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) { |
374 | 188M | if (DC) { |
375 | 185M | auto *D = cast<Decl>(DC); |
376 | 185M | auto MOK = D->getModuleOwnershipKind(); |
377 | 185M | if (MOK != ModuleOwnershipKind::Unowned && |
378 | 185M | (1.37M !D->isFromASTFile()1.37M || D->hasLocalOwningModuleStorage()33.9k )) |
379 | 1.35M | return MOK; |
380 | | // If D is not local and we have no local module storage, then we don't |
381 | | // need to track module ownership at all. |
382 | 185M | } |
383 | 187M | return ModuleOwnershipKind::Unowned; |
384 | 188M | } |
385 | | |
386 | | public: |
387 | | Decl() = delete; |
388 | | Decl(const Decl&) = delete; |
389 | | Decl(Decl &&) = delete; |
390 | | Decl &operator=(const Decl&) = delete; |
391 | | Decl &operator=(Decl&&) = delete; |
392 | | |
393 | | protected: |
394 | | Decl(Kind DK, DeclContext *DC, SourceLocation L) |
395 | 188M | : NextInContextAndBits(nullptr, getModuleOwnershipKindForChildOf(DC)), |
396 | 188M | DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(false), HasAttrs(false), |
397 | 188M | Implicit(false), Used(false), Referenced(false), |
398 | 188M | TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0), |
399 | 188M | IdentifierNamespace(getIdentifierNamespaceForKind(DK)), |
400 | 188M | CacheValidAndLinkage(llvm::to_underlying(Linkage::Invalid)) { |
401 | 188M | if (StatisticsEnabled) add(DK)99 ; |
402 | 188M | } |
403 | | |
404 | | Decl(Kind DK, EmptyShell Empty) |
405 | 9.59k | : DeclKind(DK), InvalidDecl(false), HasAttrs(false), Implicit(false), |
406 | 9.59k | Used(false), Referenced(false), TopLevelDeclInObjCContainer(false), |
407 | 9.59k | Access(AS_none), FromASTFile(0), |
408 | 9.59k | IdentifierNamespace(getIdentifierNamespaceForKind(DK)), |
409 | 9.59k | CacheValidAndLinkage(llvm::to_underlying(Linkage::Invalid)) { |
410 | 9.59k | if (StatisticsEnabled) add(DK)0 ; |
411 | 9.59k | } |
412 | | |
413 | | virtual ~Decl(); |
414 | | |
415 | | /// Update a potentially out-of-date declaration. |
416 | | void updateOutOfDate(IdentifierInfo &II) const; |
417 | | |
418 | 122M | Linkage getCachedLinkage() const { |
419 | 122M | return static_cast<Linkage>(CacheValidAndLinkage); |
420 | 122M | } |
421 | | |
422 | 45.7M | void setCachedLinkage(Linkage L) const { |
423 | 45.7M | CacheValidAndLinkage = llvm::to_underlying(L); |
424 | 45.7M | } |
425 | | |
426 | 220M | bool hasCachedLinkage() const { |
427 | 220M | return CacheValidAndLinkage; |
428 | 220M | } |
429 | | |
430 | | public: |
431 | | /// Source range that this declaration covers. |
432 | 6.73k | virtual SourceRange getSourceRange() const LLVM_READONLY { |
433 | 6.73k | return SourceRange(getLocation(), getLocation()); |
434 | 6.73k | } |
435 | | |
436 | 3.19M | SourceLocation getBeginLoc() const LLVM_READONLY { |
437 | 3.19M | return getSourceRange().getBegin(); |
438 | 3.19M | } |
439 | | |
440 | 2.56M | SourceLocation getEndLoc() const LLVM_READONLY { |
441 | 2.56M | return getSourceRange().getEnd(); |
442 | 2.56M | } |
443 | | |
444 | 459M | SourceLocation getLocation() const { return Loc; } |
445 | 3.79M | void setLocation(SourceLocation L) { Loc = L; } |
446 | | |
447 | 29.9G | Kind getKind() const { return static_cast<Kind>(DeclKind); } |
448 | | const char *getDeclKindName() const; |
449 | | |
450 | 237M | Decl *getNextDeclInContext() { return NextInContextAndBits.getPointer(); } |
451 | 4.06k | const Decl *getNextDeclInContext() const {return NextInContextAndBits.getPointer();} |
452 | | |
453 | 12.2G | DeclContext *getDeclContext() { |
454 | 12.2G | if (isInSemaDC()) |
455 | 12.0G | return getSemanticDC(); |
456 | 167M | return getMultipleDC()->SemanticDC; |
457 | 12.2G | } |
458 | 2.54G | const DeclContext *getDeclContext() const { |
459 | 2.54G | return const_cast<Decl*>(this)->getDeclContext(); |
460 | 2.54G | } |
461 | | |
462 | | /// Return the non transparent context. |
463 | | /// See the comment of `DeclContext::isTransparentContext()` for the |
464 | | /// definition of transparent context. |
465 | | DeclContext *getNonTransparentDeclContext(); |
466 | 14.6k | const DeclContext *getNonTransparentDeclContext() const { |
467 | 14.6k | return const_cast<Decl *>(this)->getNonTransparentDeclContext(); |
468 | 14.6k | } |
469 | | |
470 | | /// Find the innermost non-closure ancestor of this declaration, |
471 | | /// walking up through blocks, lambdas, etc. If that ancestor is |
472 | | /// not a code context (!isFunctionOrMethod()), returns null. |
473 | | /// |
474 | | /// A declaration may be its own non-closure context. |
475 | | Decl *getNonClosureContext(); |
476 | 313k | const Decl *getNonClosureContext() const { |
477 | 313k | return const_cast<Decl*>(this)->getNonClosureContext(); |
478 | 313k | } |
479 | | |
480 | | TranslationUnitDecl *getTranslationUnitDecl(); |
481 | 4.58G | const TranslationUnitDecl *getTranslationUnitDecl() const { |
482 | 4.58G | return const_cast<Decl*>(this)->getTranslationUnitDecl(); |
483 | 4.58G | } |
484 | | |
485 | | bool isInAnonymousNamespace() const; |
486 | | |
487 | | bool isInStdNamespace() const; |
488 | | |
489 | | // Return true if this is a FileContext Decl. |
490 | | bool isFileContextDecl() const; |
491 | | |
492 | | /// Whether it resembles a flexible array member. This is a static member |
493 | | /// because we want to be able to call it with a nullptr. That allows us to |
494 | | /// perform non-Decl specific checks based on the object's type and strict |
495 | | /// flex array level. |
496 | | static bool isFlexibleArrayMemberLike( |
497 | | ASTContext &Context, const Decl *D, QualType Ty, |
498 | | LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel, |
499 | | bool IgnoreTemplateOrMacroSubstitution); |
500 | | |
501 | | ASTContext &getASTContext() const LLVM_READONLY; |
502 | | |
503 | | /// Helper to get the language options from the ASTContext. |
504 | | /// Defined out of line to avoid depending on ASTContext.h. |
505 | | const LangOptions &getLangOpts() const LLVM_READONLY; |
506 | | |
507 | 29.5M | void setAccess(AccessSpecifier AS) { |
508 | 29.5M | Access = AS; |
509 | 29.5M | assert(AccessDeclContextCheck()); |
510 | 29.5M | } |
511 | | |
512 | 490M | AccessSpecifier getAccess() const { |
513 | 490M | assert(AccessDeclContextCheck()); |
514 | 490M | return AccessSpecifier(Access); |
515 | 490M | } |
516 | | |
517 | | /// Retrieve the access specifier for this declaration, even though |
518 | | /// it may not yet have been properly set. |
519 | 41.4k | AccessSpecifier getAccessUnsafe() const { |
520 | 41.4k | return AccessSpecifier(Access); |
521 | 41.4k | } |
522 | | |
523 | 5.42G | bool hasAttrs() const { return HasAttrs; } |
524 | | |
525 | 44.4M | void setAttrs(const AttrVec& Attrs) { |
526 | 44.4M | return setAttrsImpl(Attrs, getASTContext()); |
527 | 44.4M | } |
528 | | |
529 | 122M | AttrVec &getAttrs() { |
530 | 122M | return const_cast<AttrVec&>(const_cast<const Decl*>(this)->getAttrs()); |
531 | 122M | } |
532 | | |
533 | | const AttrVec &getAttrs() const; |
534 | | void dropAttrs(); |
535 | | void addAttr(Attr *A); |
536 | | |
537 | | using attr_iterator = AttrVec::const_iterator; |
538 | | using attr_range = llvm::iterator_range<attr_iterator>; |
539 | | |
540 | 199M | attr_range attrs() const { |
541 | 199M | return attr_range(attr_begin(), attr_end()); |
542 | 199M | } |
543 | | |
544 | 411M | attr_iterator attr_begin() const { |
545 | 411M | return hasAttrs() ? getAttrs().begin()63.9M : nullptr348M ; |
546 | 411M | } |
547 | 411M | attr_iterator attr_end() const { |
548 | 411M | return hasAttrs() ? getAttrs().end()63.9M : nullptr348M ; |
549 | 411M | } |
550 | | |
551 | | template <typename T> |
552 | 8.61k | void dropAttr() { |
553 | 8.61k | if (!HasAttrs) return3.65k ; |
554 | | |
555 | 4.95k | AttrVec &Vec = getAttrs(); |
556 | 7.44k | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); void clang::Decl::dropAttr<clang::DLLImportAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 4.40k | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::WeakAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 10 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::WeakRefAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 8 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::SelectAnyAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 19 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::ConstInitAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 12 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::InternalLinkageAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 3 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::ErrorAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 16 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::OverloadableAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 8 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::WeakImportAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::AliasAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 5 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::SectionAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::AvailabilityAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 10 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::UsedAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 4 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::RetainAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::IFuncAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 1 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
Unexecuted instantiation: void clang::Decl::dropAttr<clang::CUDAConstantAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const void clang::Decl::dropAttr<clang::NoBuiltinAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 8 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::CUDADeviceAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 12 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::CodeSegAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 11 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
Unexecuted instantiation: void clang::Decl::dropAttr<clang::ZeroCallUsedRegsAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const void clang::Decl::dropAttr<clang::FunctionReturnThunksAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 48 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::EnforceTCBAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 12 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::VisibilityAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 6 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
Unexecuted instantiation: void clang::Decl::dropAttr<clang::TypeVisibilityAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const void clang::Decl::dropAttr<clang::SwiftNameAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 9 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::AlwaysInlineAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 7 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::MinSizeAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 3 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::UuidAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 16 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::MSInheritanceAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 3 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::ObjCDesignatedInitializerAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::TrivialABIAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 36 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::OverrideAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 12 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::FinalAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 6 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
void clang::Decl::dropAttr<clang::DLLExportAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const Line | Count | Source | 556 | 2.75k | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); |
|
557 | | |
558 | 4.95k | if (Vec.empty()) |
559 | 2.17k | HasAttrs = false; |
560 | 4.95k | } void clang::Decl::dropAttr<clang::DLLImportAttr>() Line | Count | Source | 552 | 4.80k | void dropAttr() { | 553 | 4.80k | if (!HasAttrs) return1.63k ; | 554 | | | 555 | 3.16k | AttrVec &Vec = getAttrs(); | 556 | 3.16k | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 3.16k | if (Vec.empty()) | 559 | 1.70k | HasAttrs = false; | 560 | 3.16k | } |
void clang::Decl::dropAttr<clang::WeakAttr>() Line | Count | Source | 552 | 10 | void dropAttr() { | 553 | 10 | if (!HasAttrs) return0 ; | 554 | | | 555 | 10 | AttrVec &Vec = getAttrs(); | 556 | 10 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 10 | if (Vec.empty()) | 559 | 10 | HasAttrs = false; | 560 | 10 | } |
void clang::Decl::dropAttr<clang::WeakRefAttr>() Line | Count | Source | 552 | 5 | void dropAttr() { | 553 | 5 | if (!HasAttrs) return0 ; | 554 | | | 555 | 5 | AttrVec &Vec = getAttrs(); | 556 | 5 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 5 | if (Vec.empty()) | 559 | 2 | HasAttrs = false; | 560 | 5 | } |
void clang::Decl::dropAttr<clang::SelectAnyAttr>() Line | Count | Source | 552 | 19 | void dropAttr() { | 553 | 19 | if (!HasAttrs) return0 ; | 554 | | | 555 | 19 | AttrVec &Vec = getAttrs(); | 556 | 19 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 19 | if (Vec.empty()) | 559 | 19 | HasAttrs = false; | 560 | 19 | } |
void clang::Decl::dropAttr<clang::ConstInitAttr>() Line | Count | Source | 552 | 12 | void dropAttr() { | 553 | 12 | if (!HasAttrs) return0 ; | 554 | | | 555 | 12 | AttrVec &Vec = getAttrs(); | 556 | 12 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 12 | if (Vec.empty()) | 559 | 12 | HasAttrs = false; | 560 | 12 | } |
void clang::Decl::dropAttr<clang::InternalLinkageAttr>() Line | Count | Source | 552 | 3 | void dropAttr() { | 553 | 3 | if (!HasAttrs) return0 ; | 554 | | | 555 | 3 | AttrVec &Vec = getAttrs(); | 556 | 3 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 3 | if (Vec.empty()) | 559 | 3 | HasAttrs = false; | 560 | 3 | } |
void clang::Decl::dropAttr<clang::ErrorAttr>() Line | Count | Source | 552 | 16 | void dropAttr() { | 553 | 16 | if (!HasAttrs) return0 ; | 554 | | | 555 | 16 | AttrVec &Vec = getAttrs(); | 556 | 16 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 16 | if (Vec.empty()) | 559 | 16 | HasAttrs = false; | 560 | 16 | } |
void clang::Decl::dropAttr<clang::OverloadableAttr>() Line | Count | Source | 552 | 7 | void dropAttr() { | 553 | 7 | if (!HasAttrs) return0 ; | 554 | | | 555 | 7 | AttrVec &Vec = getAttrs(); | 556 | 7 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 7 | if (Vec.empty()) | 559 | 6 | HasAttrs = false; | 560 | 7 | } |
void clang::Decl::dropAttr<clang::WeakImportAttr>() Line | Count | Source | 552 | 2 | void dropAttr() { | 553 | 2 | if (!HasAttrs) return0 ; | 554 | | | 555 | 2 | AttrVec &Vec = getAttrs(); | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 2 | if (Vec.empty()) | 559 | 2 | HasAttrs = false; | 560 | 2 | } |
void clang::Decl::dropAttr<clang::AliasAttr>() Line | Count | Source | 552 | 5 | void dropAttr() { | 553 | 5 | if (!HasAttrs) return0 ; | 554 | | | 555 | 5 | AttrVec &Vec = getAttrs(); | 556 | 5 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 5 | if (Vec.empty()) | 559 | 5 | HasAttrs = false; | 560 | 5 | } |
void clang::Decl::dropAttr<clang::SectionAttr>() Line | Count | Source | 552 | 2 | void dropAttr() { | 553 | 2 | if (!HasAttrs) return0 ; | 554 | | | 555 | 2 | AttrVec &Vec = getAttrs(); | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 2 | if (Vec.empty()) | 559 | 2 | HasAttrs = false; | 560 | 2 | } |
void clang::Decl::dropAttr<clang::AvailabilityAttr>() Line | Count | Source | 552 | 6 | void dropAttr() { | 553 | 6 | if (!HasAttrs) return0 ; | 554 | | | 555 | 6 | AttrVec &Vec = getAttrs(); | 556 | 6 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 6 | if (Vec.empty()) | 559 | 2 | HasAttrs = false; | 560 | 6 | } |
void clang::Decl::dropAttr<clang::UsedAttr>() Line | Count | Source | 552 | 4 | void dropAttr() { | 553 | 4 | if (!HasAttrs) return0 ; | 554 | | | 555 | 4 | AttrVec &Vec = getAttrs(); | 556 | 4 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 4 | if (Vec.empty()) | 559 | 4 | HasAttrs = false; | 560 | 4 | } |
void clang::Decl::dropAttr<clang::RetainAttr>() Line | Count | Source | 552 | 2 | void dropAttr() { | 553 | 2 | if (!HasAttrs) return0 ; | 554 | | | 555 | 2 | AttrVec &Vec = getAttrs(); | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 2 | if (Vec.empty()) | 559 | 2 | HasAttrs = false; | 560 | 2 | } |
void clang::Decl::dropAttr<clang::IFuncAttr>() Line | Count | Source | 552 | 1 | void dropAttr() { | 553 | 1 | if (!HasAttrs) return0 ; | 554 | | | 555 | 1 | AttrVec &Vec = getAttrs(); | 556 | 1 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 1 | if (Vec.empty()) | 559 | 1 | HasAttrs = false; | 560 | 1 | } |
Unexecuted instantiation: void clang::Decl::dropAttr<clang::CUDAConstantAttr>() void clang::Decl::dropAttr<clang::NoBuiltinAttr>() Line | Count | Source | 552 | 8 | void dropAttr() { | 553 | 8 | if (!HasAttrs) return0 ; | 554 | | | 555 | 8 | AttrVec &Vec = getAttrs(); | 556 | 8 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 8 | if (Vec.empty()) | 559 | 8 | HasAttrs = false; | 560 | 8 | } |
void clang::Decl::dropAttr<clang::CUDADeviceAttr>() Line | Count | Source | 552 | 6 | void dropAttr() { | 553 | 6 | if (!HasAttrs) return0 ; | 554 | | | 555 | 6 | AttrVec &Vec = getAttrs(); | 556 | 6 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 6 | if (Vec.empty()) | 559 | 0 | HasAttrs = false; | 560 | 6 | } |
void clang::Decl::dropAttr<clang::CodeSegAttr>() Line | Count | Source | 552 | 8 | void dropAttr() { | 553 | 8 | if (!HasAttrs) return0 ; | 554 | | | 555 | 8 | AttrVec &Vec = getAttrs(); | 556 | 8 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 8 | if (Vec.empty()) | 559 | 5 | HasAttrs = false; | 560 | 8 | } |
void clang::Decl::dropAttr<clang::ZeroCallUsedRegsAttr>() Line | Count | Source | 552 | 90 | void dropAttr() { | 553 | 90 | if (!HasAttrs) return; | 554 | | | 555 | 0 | AttrVec &Vec = getAttrs(); | 556 | 0 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | |
| 558 | 0 | if (Vec.empty()) | 559 | 0 | HasAttrs = false; | 560 | 0 | } |
void clang::Decl::dropAttr<clang::FunctionReturnThunksAttr>() Line | Count | Source | 552 | 197 | void dropAttr() { | 553 | 197 | if (!HasAttrs) return149 ; | 554 | | | 555 | 48 | AttrVec &Vec = getAttrs(); | 556 | 48 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 48 | if (Vec.empty()) | 559 | 48 | HasAttrs = false; | 560 | 48 | } |
void clang::Decl::dropAttr<clang::EnforceTCBAttr>() Line | Count | Source | 552 | 10 | void dropAttr() { | 553 | 10 | if (!HasAttrs) return0 ; | 554 | | | 555 | 10 | AttrVec &Vec = getAttrs(); | 556 | 10 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 10 | if (Vec.empty()) | 559 | 6 | HasAttrs = false; | 560 | 10 | } |
void clang::Decl::dropAttr<clang::VisibilityAttr>() Line | Count | Source | 552 | 6 | void dropAttr() { | 553 | 6 | if (!HasAttrs) return0 ; | 554 | | | 555 | 6 | AttrVec &Vec = getAttrs(); | 556 | 6 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 6 | if (Vec.empty()) | 559 | 6 | HasAttrs = false; | 560 | 6 | } |
Unexecuted instantiation: void clang::Decl::dropAttr<clang::TypeVisibilityAttr>() void clang::Decl::dropAttr<clang::SwiftNameAttr>() Line | Count | Source | 552 | 9 | void dropAttr() { | 553 | 9 | if (!HasAttrs) return0 ; | 554 | | | 555 | 9 | AttrVec &Vec = getAttrs(); | 556 | 9 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 9 | if (Vec.empty()) | 559 | 9 | HasAttrs = false; | 560 | 9 | } |
void clang::Decl::dropAttr<clang::AlwaysInlineAttr>() Line | Count | Source | 552 | 7 | void dropAttr() { | 553 | 7 | if (!HasAttrs) return0 ; | 554 | | | 555 | 7 | AttrVec &Vec = getAttrs(); | 556 | 7 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 7 | if (Vec.empty()) | 559 | 7 | HasAttrs = false; | 560 | 7 | } |
void clang::Decl::dropAttr<clang::MinSizeAttr>() Line | Count | Source | 552 | 3 | void dropAttr() { | 553 | 3 | if (!HasAttrs) return0 ; | 554 | | | 555 | 3 | AttrVec &Vec = getAttrs(); | 556 | 3 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 3 | if (Vec.empty()) | 559 | 3 | HasAttrs = false; | 560 | 3 | } |
void clang::Decl::dropAttr<clang::UuidAttr>() Line | Count | Source | 552 | 16 | void dropAttr() { | 553 | 16 | if (!HasAttrs) return0 ; | 554 | | | 555 | 16 | AttrVec &Vec = getAttrs(); | 556 | 16 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 16 | if (Vec.empty()) | 559 | 16 | HasAttrs = false; | 560 | 16 | } |
void clang::Decl::dropAttr<clang::MSInheritanceAttr>() Line | Count | Source | 552 | 3 | void dropAttr() { | 553 | 3 | if (!HasAttrs) return0 ; | 554 | | | 555 | 3 | AttrVec &Vec = getAttrs(); | 556 | 3 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 3 | if (Vec.empty()) | 559 | 3 | HasAttrs = false; | 560 | 3 | } |
void clang::Decl::dropAttr<clang::ObjCDesignatedInitializerAttr>() Line | Count | Source | 552 | 2 | void dropAttr() { | 553 | 2 | if (!HasAttrs) return0 ; | 554 | | | 555 | 2 | AttrVec &Vec = getAttrs(); | 556 | 2 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 2 | if (Vec.empty()) | 559 | 2 | HasAttrs = false; | 560 | 2 | } |
void clang::Decl::dropAttr<clang::TrivialABIAttr>() Line | Count | Source | 552 | 36 | void dropAttr() { | 553 | 36 | if (!HasAttrs) return0 ; | 554 | | | 555 | 36 | AttrVec &Vec = getAttrs(); | 556 | 36 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 36 | if (Vec.empty()) | 559 | 36 | HasAttrs = false; | 560 | 36 | } |
void clang::Decl::dropAttr<clang::OverrideAttr>() Line | Count | Source | 552 | 12 | void dropAttr() { | 553 | 12 | if (!HasAttrs) return0 ; | 554 | | | 555 | 12 | AttrVec &Vec = getAttrs(); | 556 | 12 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 12 | if (Vec.empty()) | 559 | 12 | HasAttrs = false; | 560 | 12 | } |
void clang::Decl::dropAttr<clang::FinalAttr>() Line | Count | Source | 552 | 6 | void dropAttr() { | 553 | 6 | if (!HasAttrs) return0 ; | 554 | | | 555 | 6 | AttrVec &Vec = getAttrs(); | 556 | 6 | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 6 | if (Vec.empty()) | 559 | 6 | HasAttrs = false; | 560 | 6 | } |
void clang::Decl::dropAttr<clang::DLLExportAttr>() Line | Count | Source | 552 | 3.29k | void dropAttr() { | 553 | 3.29k | if (!HasAttrs) return1.78k ; | 554 | | | 555 | 1.51k | AttrVec &Vec = getAttrs(); | 556 | 1.51k | llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); }); | 557 | | | 558 | 1.51k | if (Vec.empty()) | 559 | 216 | HasAttrs = false; | 560 | 1.51k | } |
|
561 | | |
562 | | template <typename T> |
563 | 212M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { |
564 | 212M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); |
565 | 212M | } llvm::iterator_range<clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnableIfAttr>() const Line | Count | Source | 563 | 8.12M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 8.12M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 8.12M | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareTargetDeclAttr>() const Line | Count | Source | 563 | 116k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 116k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 116k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AlignedAttr>() const Line | Count | Source | 563 | 2.86M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 2.86M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 2.86M | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NonNullAttr>() const Line | Count | Source | 563 | 5.80M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 5.80M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 5.80M | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::PreferredNameAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::PreferredNameAttr>() const Line | Count | Source | 563 | 676k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 676k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 676k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatArgAttr>() const Line | Count | Source | 563 | 32 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 32 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 32 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatAttr>() const Line | Count | Source | 563 | 5.93M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 5.93M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 5.93M | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::ArgumentWithTypeTagAttr>() const Line | Count | Source | 563 | 5.63M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 5.63M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 5.63M | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::EnforceTCBAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnforceTCBAttr>() const Line | Count | Source | 563 | 115 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 115 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 115 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::EnforceTCBLeafAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnforceTCBLeafAttr>() const Line | Count | Source | 563 | 104 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 104 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 104 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AnnotateAttr>() const Line | Count | Source | 563 | 8.59k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 8.59k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 8.59k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableParamAttr>() const Line | Count | Source | 563 | 5.07k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 5.07k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 5.07k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableAttr>() const Line | Count | Source | 563 | 497k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 497k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 497k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::TypeTagForDatatypeAttr>() const Line | Count | Source | 563 | 102 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 102 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 102 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::BTFDeclTagAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::BTFDeclTagAttr>() const Line | Count | Source | 563 | 94 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 94 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 94 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OwnershipAttr>() const Line | Count | Source | 563 | 2.43k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 2.43k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 2.43k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareVariantAttr>() const Line | Count | Source | 563 | 2.92k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 2.92k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 2.92k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::DiagnoseIfAttr>() const Line | Count | Source | 563 | 181M | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 181M | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 181M | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::PtGuardedByAttr>() const Line | Count | Source | 563 | 466 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 466 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 466 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::GuardedByAttr>() const Line | Count | Source | 563 | 2.75k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 2.75k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 2.75k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::AssumptionAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AssumptionAttr>() const Line | Count | Source | 563 | 654k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 654k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 654k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareSimdDeclAttr>() const Line | Count | Source | 563 | 229 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 229 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 229 | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NoSanitizeAttr>() const Line | Count | Source | 563 | 313k | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 313k | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 313k | } |
llvm::iterator_range<clang::specific_attr_iterator<clang::AvailabilityAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AvailabilityAttr>() const Line | Count | Source | 563 | 316 | llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const { | 564 | 316 | return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>()); | 565 | 316 | } |
|
566 | | |
567 | | template <typename T> |
568 | 212M | specific_attr_iterator<T> specific_attr_begin() const { |
569 | 212M | return specific_attr_iterator<T>(attr_begin()); |
570 | 212M | } clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnableIfAttr>() const Line | Count | Source | 568 | 9.02M | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 9.02M | return specific_attr_iterator<T>(attr_begin()); | 570 | 9.02M | } |
clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareTargetDeclAttr>() const Line | Count | Source | 568 | 116k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 116k | return specific_attr_iterator<T>(attr_begin()); | 570 | 116k | } |
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AlignedAttr>() const Line | Count | Source | 568 | 2.86M | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 2.86M | return specific_attr_iterator<T>(attr_begin()); | 570 | 2.86M | } |
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NonNullAttr>() const Line | Count | Source | 568 | 5.80M | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 5.80M | return specific_attr_iterator<T>(attr_begin()); | 570 | 5.80M | } |
clang::specific_attr_iterator<clang::PreferredNameAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::PreferredNameAttr>() const Line | Count | Source | 568 | 676k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 676k | return specific_attr_iterator<T>(attr_begin()); | 570 | 676k | } |
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatArgAttr>() const Line | Count | Source | 568 | 32 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 32 | return specific_attr_iterator<T>(attr_begin()); | 570 | 32 | } |
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatAttr>() const Line | Count | Source | 568 | 5.93M | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 5.93M | return specific_attr_iterator<T>(attr_begin()); | 570 | 5.93M | } |
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::ArgumentWithTypeTagAttr>() const Line | Count | Source | 568 | 5.63M | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 5.63M | return specific_attr_iterator<T>(attr_begin()); | 570 | 5.63M | } |
clang::specific_attr_iterator<clang::EnforceTCBAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnforceTCBAttr>() const Line | Count | Source | 568 | 115 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 115 | return specific_attr_iterator<T>(attr_begin()); | 570 | 115 | } |
clang::specific_attr_iterator<clang::EnforceTCBLeafAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnforceTCBLeafAttr>() const Line | Count | Source | 568 | 104 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 104 | return specific_attr_iterator<T>(attr_begin()); | 570 | 104 | } |
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AnnotateAttr>() const Line | Count | Source | 568 | 8.98k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 8.98k | return specific_attr_iterator<T>(attr_begin()); | 570 | 8.98k | } |
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableParamAttr>() const Line | Count | Source | 568 | 5.07k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 5.07k | return specific_attr_iterator<T>(attr_begin()); | 570 | 5.07k | } |
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableAttr>() const Line | Count | Source | 568 | 497k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 497k | return specific_attr_iterator<T>(attr_begin()); | 570 | 497k | } |
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::TypeTagForDatatypeAttr>() const Line | Count | Source | 568 | 102 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 102 | return specific_attr_iterator<T>(attr_begin()); | 570 | 102 | } |
clang::specific_attr_iterator<clang::BTFDeclTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::BTFDeclTagAttr>() const Line | Count | Source | 568 | 94 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 94 | return specific_attr_iterator<T>(attr_begin()); | 570 | 94 | } |
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OwnershipAttr>() const Line | Count | Source | 568 | 2.43k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 2.43k | return specific_attr_iterator<T>(attr_begin()); | 570 | 2.43k | } |
clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareVariantAttr>() const Line | Count | Source | 568 | 2.92k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 2.92k | return specific_attr_iterator<T>(attr_begin()); | 570 | 2.92k | } |
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::DiagnoseIfAttr>() const Line | Count | Source | 568 | 181M | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 181M | return specific_attr_iterator<T>(attr_begin()); | 570 | 181M | } |
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::PtGuardedByAttr>() const Line | Count | Source | 568 | 466 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 466 | return specific_attr_iterator<T>(attr_begin()); | 570 | 466 | } |
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::GuardedByAttr>() const Line | Count | Source | 568 | 2.75k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 2.75k | return specific_attr_iterator<T>(attr_begin()); | 570 | 2.75k | } |
clang::specific_attr_iterator<clang::AssumptionAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AssumptionAttr>() const Line | Count | Source | 568 | 654k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 654k | return specific_attr_iterator<T>(attr_begin()); | 570 | 654k | } |
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareSimdDeclAttr>() const Line | Count | Source | 568 | 229 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 229 | return specific_attr_iterator<T>(attr_begin()); | 570 | 229 | } |
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NoSanitizeAttr>() const Line | Count | Source | 568 | 313k | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 313k | return specific_attr_iterator<T>(attr_begin()); | 570 | 313k | } |
clang::specific_attr_iterator<clang::AvailabilityAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AvailabilityAttr>() const Line | Count | Source | 568 | 316 | specific_attr_iterator<T> specific_attr_begin() const { | 569 | 316 | return specific_attr_iterator<T>(attr_begin()); | 570 | 316 | } |
|
571 | | |
572 | | template <typename T> |
573 | 212M | specific_attr_iterator<T> specific_attr_end() const { |
574 | 212M | return specific_attr_iterator<T>(attr_end()); |
575 | 212M | } clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnableIfAttr>() const Line | Count | Source | 573 | 9.02M | specific_attr_iterator<T> specific_attr_end() const { | 574 | 9.02M | return specific_attr_iterator<T>(attr_end()); | 575 | 9.02M | } |
clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareTargetDeclAttr>() const Line | Count | Source | 573 | 116k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 116k | return specific_attr_iterator<T>(attr_end()); | 575 | 116k | } |
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AlignedAttr>() const Line | Count | Source | 573 | 2.86M | specific_attr_iterator<T> specific_attr_end() const { | 574 | 2.86M | return specific_attr_iterator<T>(attr_end()); | 575 | 2.86M | } |
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NonNullAttr>() const Line | Count | Source | 573 | 5.80M | specific_attr_iterator<T> specific_attr_end() const { | 574 | 5.80M | return specific_attr_iterator<T>(attr_end()); | 575 | 5.80M | } |
clang::specific_attr_iterator<clang::PreferredNameAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::PreferredNameAttr>() const Line | Count | Source | 573 | 676k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 676k | return specific_attr_iterator<T>(attr_end()); | 575 | 676k | } |
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatArgAttr>() const Line | Count | Source | 573 | 32 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 32 | return specific_attr_iterator<T>(attr_end()); | 575 | 32 | } |
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatAttr>() const Line | Count | Source | 573 | 5.93M | specific_attr_iterator<T> specific_attr_end() const { | 574 | 5.93M | return specific_attr_iterator<T>(attr_end()); | 575 | 5.93M | } |
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::ArgumentWithTypeTagAttr>() const Line | Count | Source | 573 | 5.63M | specific_attr_iterator<T> specific_attr_end() const { | 574 | 5.63M | return specific_attr_iterator<T>(attr_end()); | 575 | 5.63M | } |
clang::specific_attr_iterator<clang::EnforceTCBAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnforceTCBAttr>() const Line | Count | Source | 573 | 115 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 115 | return specific_attr_iterator<T>(attr_end()); | 575 | 115 | } |
clang::specific_attr_iterator<clang::EnforceTCBLeafAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnforceTCBLeafAttr>() const Line | Count | Source | 573 | 104 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 104 | return specific_attr_iterator<T>(attr_end()); | 575 | 104 | } |
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AnnotateAttr>() const Line | Count | Source | 573 | 8.98k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 8.98k | return specific_attr_iterator<T>(attr_end()); | 575 | 8.98k | } |
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableParamAttr>() const Line | Count | Source | 573 | 5.07k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 5.07k | return specific_attr_iterator<T>(attr_end()); | 575 | 5.07k | } |
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableAttr>() const Line | Count | Source | 573 | 497k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 497k | return specific_attr_iterator<T>(attr_end()); | 575 | 497k | } |
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::TypeTagForDatatypeAttr>() const Line | Count | Source | 573 | 102 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 102 | return specific_attr_iterator<T>(attr_end()); | 575 | 102 | } |
clang::specific_attr_iterator<clang::BTFDeclTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::BTFDeclTagAttr>() const Line | Count | Source | 573 | 94 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 94 | return specific_attr_iterator<T>(attr_end()); | 575 | 94 | } |
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OwnershipAttr>() const Line | Count | Source | 573 | 2.43k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 2.43k | return specific_attr_iterator<T>(attr_end()); | 575 | 2.43k | } |
clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareVariantAttr>() const Line | Count | Source | 573 | 2.92k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 2.92k | return specific_attr_iterator<T>(attr_end()); | 575 | 2.92k | } |
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::DiagnoseIfAttr>() const Line | Count | Source | 573 | 181M | specific_attr_iterator<T> specific_attr_end() const { | 574 | 181M | return specific_attr_iterator<T>(attr_end()); | 575 | 181M | } |
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::PtGuardedByAttr>() const Line | Count | Source | 573 | 466 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 466 | return specific_attr_iterator<T>(attr_end()); | 575 | 466 | } |
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::GuardedByAttr>() const Line | Count | Source | 573 | 2.75k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 2.75k | return specific_attr_iterator<T>(attr_end()); | 575 | 2.75k | } |
clang::specific_attr_iterator<clang::AssumptionAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AssumptionAttr>() const Line | Count | Source | 573 | 654k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 654k | return specific_attr_iterator<T>(attr_end()); | 575 | 654k | } |
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareSimdDeclAttr>() const Line | Count | Source | 573 | 229 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 229 | return specific_attr_iterator<T>(attr_end()); | 575 | 229 | } |
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NoSanitizeAttr>() const Line | Count | Source | 573 | 313k | specific_attr_iterator<T> specific_attr_end() const { | 574 | 313k | return specific_attr_iterator<T>(attr_end()); | 575 | 313k | } |
clang::specific_attr_iterator<clang::AvailabilityAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AvailabilityAttr>() const Line | Count | Source | 573 | 316 | specific_attr_iterator<T> specific_attr_end() const { | 574 | 316 | return specific_attr_iterator<T>(attr_end()); | 575 | 316 | } |
|
576 | | |
577 | 1.76G | template<typename T> T *getAttr() const { |
578 | 1.76G | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.27G : nullptr491M ; |
579 | 1.76G | } clang::TargetAttr* clang::Decl::getAttr<clang::TargetAttr>() const Line | Count | Source | 577 | 43.9M | template<typename T> T *getAttr() const { | 578 | 43.9M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())40.2M : nullptr3.68M ; | 579 | 43.9M | } |
clang::CPUSpecificAttr* clang::Decl::getAttr<clang::CPUSpecificAttr>() const Line | Count | Source | 577 | 42.5M | template<typename T> T *getAttr() const { | 578 | 42.5M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.9M : nullptr3.58M ; | 579 | 42.5M | } |
clang::TargetClonesAttr* clang::Decl::getAttr<clang::TargetClonesAttr>() const Line | Count | Source | 577 | 42.5M | template<typename T> T *getAttr() const { | 578 | 42.5M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.9M : nullptr3.58M ; | 579 | 42.5M | } |
clang::TargetVersionAttr* clang::Decl::getAttr<clang::TargetVersionAttr>() const Line | Count | Source | 577 | 87.0M | template<typename T> T *getAttr() const { | 578 | 87.0M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())80.7M : nullptr6.28M ; | 579 | 87.0M | } |
clang::CUDADeviceAttr* clang::Decl::getAttr<clang::CUDADeviceAttr>() const Line | Count | Source | 577 | 74.2k | template<typename T> T *getAttr() const { | 578 | 74.2k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())61.1k : nullptr13.0k ; | 579 | 74.2k | } |
clang::CUDAConstantAttr* clang::Decl::getAttr<clang::CUDAConstantAttr>() const Line | Count | Source | 577 | 2.14k | template<typename T> T *getAttr() const { | 578 | 2.14k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.72k : nullptr416 ; | 579 | 2.14k | } |
clang::TypeVisibilityAttr* clang::Decl::getAttr<clang::TypeVisibilityAttr>() const Line | Count | Source | 577 | 4.27M | template<typename T> T *getAttr() const { | 578 | 4.27M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.26M : nullptr3.00M ; | 579 | 4.27M | } |
clang::VisibilityAttr* clang::Decl::getAttr<clang::VisibilityAttr>() const Line | Count | Source | 577 | 8.91M | template<typename T> T *getAttr() const { | 578 | 8.91M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.93M : nullptr6.97M ; | 579 | 8.91M | } |
clang::SelectAnyAttr* clang::Decl::getAttr<clang::SelectAnyAttr>() const Line | Count | Source | 577 | 60.8M | template<typename T> T *getAttr() const { | 578 | 60.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.2M : nullptr22.5M ; | 579 | 60.8M | } |
clang::ArmBuiltinAliasAttr* clang::Decl::getAttr<clang::ArmBuiltinAliasAttr>() const Line | Count | Source | 577 | 220M | template<typename T> T *getAttr() const { | 578 | 220M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())207M : nullptr12.9M ; | 579 | 220M | } |
clang::BuiltinAliasAttr* clang::Decl::getAttr<clang::BuiltinAliasAttr>() const Line | Count | Source | 577 | 115M | template<typename T> T *getAttr() const { | 578 | 115M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())102M : nullptr12.9M ; | 579 | 115M | } |
clang::BuiltinAttr* clang::Decl::getAttr<clang::BuiltinAttr>() const Line | Count | Source | 577 | 115M | template<typename T> T *getAttr() const { | 578 | 115M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())102M : nullptr12.9M ; | 579 | 115M | } |
clang::EnumExtensibilityAttr* clang::Decl::getAttr<clang::EnumExtensibilityAttr>() const Line | Count | Source | 577 | 477k | template<typename T> T *getAttr() const { | 578 | 477k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())100k : nullptr377k ; | 579 | 477k | } |
clang::ExternalSourceSymbolAttr* clang::Decl::getAttr<clang::ExternalSourceSymbolAttr>() const Line | Count | Source | 577 | 86.8k | template<typename T> T *getAttr() const { | 578 | 86.8k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.29k : nullptr85.5k ; | 579 | 86.8k | } |
clang::AliasAttr* clang::Decl::getAttr<clang::AliasAttr>() const Line | Count | Source | 577 | 7.28M | template<typename T> T *getAttr() const { | 578 | 7.28M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())5.36M : nullptr1.92M ; | 579 | 7.28M | } |
clang::IFuncAttr* clang::Decl::getAttr<clang::IFuncAttr>() const Line | Count | Source | 577 | 5.90M | template<typename T> T *getAttr() const { | 578 | 5.90M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())5.35M : nullptr552k ; | 579 | 5.90M | } |
Unexecuted instantiation: clang::LoaderUninitializedAttr* clang::Decl::getAttr<clang::LoaderUninitializedAttr>() const clang::UuidAttr* clang::Decl::getAttr<clang::UuidAttr>() const Line | Count | Source | 577 | 373 | template<typename T> T *getAttr() const { | 578 | 373 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())216 : nullptr157 ; | 579 | 373 | } |
clang::ObjCMethodFamilyAttr* clang::Decl::getAttr<clang::ObjCMethodFamilyAttr>() const Line | Count | Source | 577 | 215k | template<typename T> T *getAttr() const { | 578 | 215k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())104k : nullptr110k ; | 579 | 215k | } |
clang::ObjCRuntimeNameAttr* clang::Decl::getAttr<clang::ObjCRuntimeNameAttr>() const Line | Count | Source | 577 | 19.4k | template<typename T> T *getAttr() const { | 578 | 19.4k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2.13k : nullptr17.3k ; | 579 | 19.4k | } |
clang::WarnUnusedResultAttr* clang::Decl::getAttr<clang::WarnUnusedResultAttr>() const Line | Count | Source | 577 | 648k | template<typename T> T *getAttr() const { | 578 | 648k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())264k : nullptr384k ; | 579 | 648k | } |
clang::AllocSizeAttr* clang::Decl::getAttr<clang::AllocSizeAttr>() const Line | Count | Source | 577 | 660k | template<typename T> T *getAttr() const { | 578 | 660k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())284k : nullptr376k ; | 579 | 660k | } |
clang::AbiTagAttr* clang::Decl::getAttr<clang::AbiTagAttr>() const Line | Count | Source | 577 | 6.56M | template<typename T> T *getAttr() const { | 578 | 6.56M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2.92M : nullptr3.64M ; | 579 | 6.56M | } |
clang::PassObjectSizeAttr* clang::Decl::getAttr<clang::PassObjectSizeAttr>() const Line | Count | Source | 577 | 14.2M | template<typename T> T *getAttr() const { | 578 | 14.2M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())26.2k : nullptr14.1M ; | 579 | 14.2M | } |
clang::AsmLabelAttr* clang::Decl::getAttr<clang::AsmLabelAttr>() const Line | Count | Source | 577 | 3.00M | template<typename T> T *getAttr() const { | 578 | 3.00M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2.39M : nullptr611k ; | 579 | 3.00M | } |
clang::MSInheritanceAttr* clang::Decl::getAttr<clang::MSInheritanceAttr>() const Line | Count | Source | 577 | 1.68M | template<typename T> T *getAttr() const { | 578 | 1.68M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.01M : nullptr678k ; | 579 | 1.68M | } |
clang::MSVtorDispAttr* clang::Decl::getAttr<clang::MSVtorDispAttr>() const Line | Count | Source | 577 | 1.77k | template<typename T> T *getAttr() const { | 578 | 1.77k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())183 : nullptr1.59k ; | 579 | 1.77k | } |
clang::MaxFieldAlignmentAttr* clang::Decl::getAttr<clang::MaxFieldAlignmentAttr>() const Line | Count | Source | 577 | 370k | template<typename T> T *getAttr() const { | 578 | 370k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())89.1k : nullptr281k ; | 579 | 370k | } |
clang::LayoutVersionAttr* clang::Decl::getAttr<clang::LayoutVersionAttr>() const Line | Count | Source | 577 | 6.30k | template<typename T> T *getAttr() const { | 578 | 6.30k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())933 : nullptr5.36k ; | 579 | 6.30k | } |
clang::CleanupAttr* clang::Decl::getAttr<clang::CleanupAttr>() const Line | Count | Source | 577 | 246k | template<typename T> T *getAttr() const { | 578 | 246k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())25.9k : nullptr220k ; | 579 | 246k | } |
clang::AvailabilityAttr* clang::Decl::getAttr<clang::AvailabilityAttr>() const Line | Count | Source | 577 | 37.6M | template<typename T> T *getAttr() const { | 578 | 37.6M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())35.1M : nullptr2.52M ; | 579 | 37.6M | } |
clang::OMPDeclareVariantAttr* clang::Decl::getAttr<clang::OMPDeclareVariantAttr>() const Line | Count | Source | 577 | 720 | template<typename T> T *getAttr() const { | 578 | 720 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())516 : nullptr204 ; | 579 | 720 | } |
clang::DLLImportAttr* clang::Decl::getAttr<clang::DLLImportAttr>() const Line | Count | Source | 577 | 45.3M | template<typename T> T *getAttr() const { | 578 | 45.3M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())37.3M : nullptr7.98M ; | 579 | 45.3M | } |
clang::DLLExportAttr* clang::Decl::getAttr<clang::DLLExportAttr>() const Line | Count | Source | 577 | 45.3M | template<typename T> T *getAttr() const { | 578 | 45.3M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())37.3M : nullptr8.00M ; | 579 | 45.3M | } |
clang::SectionAttr* clang::Decl::getAttr<clang::SectionAttr>() const Line | Count | Source | 577 | 1.28M | template<typename T> T *getAttr() const { | 578 | 1.28M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())354k : nullptr931k ; | 579 | 1.28M | } |
clang::DeprecatedAttr* clang::Decl::getAttr<clang::DeprecatedAttr>() const Line | Count | Source | 577 | 85.3k | template<typename T> T *getAttr() const { | 578 | 85.3k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())85.0k : nullptr327 ; | 579 | 85.3k | } |
clang::UnavailableAttr* clang::Decl::getAttr<clang::UnavailableAttr>() const Line | Count | Source | 577 | 723 | template<typename T> T *getAttr() const { | 578 | 723 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())420 : nullptr303 ; | 579 | 723 | } |
clang::FormatArgAttr* clang::Decl::getAttr<clang::FormatArgAttr>() const Line | Count | Source | 577 | 13 | template<typename T> T *getAttr() const { | 578 | 13 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())12 : nullptr1 ; | 579 | 13 | } |
clang::TypeTagForDatatypeAttr* clang::Decl::getAttr<clang::TypeTagForDatatypeAttr>() const Line | Count | Source | 577 | 274 | template<typename T> T *getAttr() const { | 578 | 274 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())261 : nullptr13 ; | 579 | 274 | } |
clang::DiagnoseAsBuiltinAttr* clang::Decl::getAttr<clang::DiagnoseAsBuiltinAttr>() const Line | Count | Source | 577 | 5.11M | template<typename T> T *getAttr() const { | 578 | 5.11M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4.59M : nullptr514k ; | 579 | 5.11M | } |
clang::AlignedAttr* clang::Decl::getAttr<clang::AlignedAttr>() const Line | Count | Source | 577 | 32 | template<typename T> T *getAttr() const { | 578 | 32 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 32 | } |
clang::AllocAlignAttr* clang::Decl::getAttr<clang::AllocAlignAttr>() const Line | Count | Source | 577 | 313k | template<typename T> T *getAttr() const { | 578 | 313k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())164k : nullptr149k ; | 579 | 313k | } |
clang::ReturnsNonNullAttr* clang::Decl::getAttr<clang::ReturnsNonNullAttr>() const Line | Count | Source | 577 | 2.41k | template<typename T> T *getAttr() const { | 578 | 2.41k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.52k : nullptr889 ; | 579 | 2.41k | } |
clang::NonNullAttr* clang::Decl::getAttr<clang::NonNullAttr>() const Line | Count | Source | 577 | 63.6k | template<typename T> T *getAttr() const { | 578 | 63.6k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())389 : nullptr63.2k ; | 579 | 63.6k | } |
clang::SentinelAttr* clang::Decl::getAttr<clang::SentinelAttr>() const Line | Count | Source | 577 | 6.07M | template<typename T> T *getAttr() const { | 578 | 6.07M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())5.05M : nullptr1.01M ; | 579 | 6.07M | } |
clang::NoDestroyAttr* clang::Decl::getAttr<clang::NoDestroyAttr>() const Line | Count | Source | 577 | 36 | template<typename T> T *getAttr() const { | 578 | 36 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4 : nullptr32 ; | 579 | 36 | } |
clang::NotTailCalledAttr* clang::Decl::getAttr<clang::NotTailCalledAttr>() const Line | Count | Source | 577 | 29.7M | template<typename T> T *getAttr() const { | 578 | 29.7M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())56.8k : nullptr29.7M ; | 579 | 29.7M | } |
clang::ArmSharedZAAttr* clang::Decl::getAttr<clang::ArmSharedZAAttr>() const Line | Count | Source | 577 | 21 | template<typename T> T *getAttr() const { | 578 | 21 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr19 ; | 579 | 21 | } |
clang::ArmPreservesZAAttr* clang::Decl::getAttr<clang::ArmPreservesZAAttr>() const Line | Count | Source | 577 | 21 | template<typename T> T *getAttr() const { | 578 | 21 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr19 ; | 579 | 21 | } |
clang::CFUnknownTransferAttr* clang::Decl::getAttr<clang::CFUnknownTransferAttr>() const Line | Count | Source | 577 | 884 | template<typename T> T *getAttr() const { | 578 | 884 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 884 | } |
clang::CFAuditedTransferAttr* clang::Decl::getAttr<clang::CFAuditedTransferAttr>() const Line | Count | Source | 577 | 1 | template<typename T> T *getAttr() const { | 578 | 1 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())0 : nullptr; | 579 | 1 | } |
clang::CPUDispatchAttr* clang::Decl::getAttr<clang::CPUDispatchAttr>() const Line | Count | Source | 577 | 41.7M | template<typename T> T *getAttr() const { | 578 | 41.7M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.7M : nullptr3.02M ; | 579 | 41.7M | } |
clang::CUDASharedAttr* clang::Decl::getAttr<clang::CUDASharedAttr>() const Line | Count | Source | 577 | 307 | template<typename T> T *getAttr() const { | 578 | 307 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())31 : nullptr276 ; | 579 | 307 | } |
clang::HIPManagedAttr* clang::Decl::getAttr<clang::HIPManagedAttr>() const Line | Count | Source | 577 | 368 | template<typename T> T *getAttr() const { | 578 | 368 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())30 : nullptr338 ; | 579 | 368 | } |
clang::CUDAGlobalAttr* clang::Decl::getAttr<clang::CUDAGlobalAttr>() const Line | Count | Source | 577 | 14.9k | template<typename T> T *getAttr() const { | 578 | 14.9k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.52k : nullptr13.4k ; | 579 | 14.9k | } |
clang::CUDADeviceBuiltinTextureTypeAttr* clang::Decl::getAttr<clang::CUDADeviceBuiltinTextureTypeAttr>() const Line | Count | Source | 577 | 14 | template<typename T> T *getAttr() const { | 578 | 14 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())0 : nullptr; | 579 | 14 | } |
clang::CUDADeviceBuiltinSurfaceTypeAttr* clang::Decl::getAttr<clang::CUDADeviceBuiltinSurfaceTypeAttr>() const Line | Count | Source | 577 | 12 | template<typename T> T *getAttr() const { | 578 | 12 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())0 : nullptr; | 579 | 12 | } |
clang::CUDAHostAttr* clang::Decl::getAttr<clang::CUDAHostAttr>() const Line | Count | Source | 577 | 2.37k | template<typename T> T *getAttr() const { | 578 | 2.37k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.94k : nullptr427 ; | 579 | 2.37k | } |
clang::HotAttr* clang::Decl::getAttr<clang::HotAttr>() const Line | Count | Source | 577 | 3.53k | template<typename T> T *getAttr() const { | 578 | 3.53k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())569 : nullptr2.97k ; | 579 | 3.53k | } |
clang::ColdAttr* clang::Decl::getAttr<clang::ColdAttr>() const Line | Count | Source | 577 | 13 | template<typename T> T *getAttr() const { | 578 | 13 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3 : nullptr10 ; | 579 | 13 | } |
clang::CommonAttr* clang::Decl::getAttr<clang::CommonAttr>() const Line | Count | Source | 577 | 20.7k | template<typename T> T *getAttr() const { | 578 | 20.7k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())20.6k : nullptr42 ; | 579 | 20.7k | } |
clang::Mips16Attr* clang::Decl::getAttr<clang::Mips16Attr>() const Line | Count | Source | 577 | 29 | template<typename T> T *getAttr() const { | 578 | 29 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4 : nullptr25 ; | 579 | 29 | } |
clang::MipsInterruptAttr* clang::Decl::getAttr<clang::MipsInterruptAttr>() const Line | Count | Source | 577 | 379 | template<typename T> T *getAttr() const { | 578 | 379 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())70 : nullptr309 ; | 579 | 379 | } |
clang::MicroMipsAttr* clang::Decl::getAttr<clang::MicroMipsAttr>() const Line | Count | Source | 577 | 12 | template<typename T> T *getAttr() const { | 578 | 12 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr10 ; | 579 | 12 | } |
clang::MipsShortCallAttr* clang::Decl::getAttr<clang::MipsShortCallAttr>() const Line | Count | Source | 577 | 20 | template<typename T> T *getAttr() const { | 578 | 20 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4 : nullptr16 ; | 579 | 20 | } |
clang::MipsLongCallAttr* clang::Decl::getAttr<clang::MipsLongCallAttr>() const Line | Count | Source | 577 | 20 | template<typename T> T *getAttr() const { | 578 | 20 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4 : nullptr16 ; | 579 | 20 | } |
clang::DisableTailCallsAttr* clang::Decl::getAttr<clang::DisableTailCallsAttr>() const Line | Count | Source | 577 | 55 | template<typename T> T *getAttr() const { | 578 | 55 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3 : nullptr52 ; | 579 | 55 | } |
clang::AlwaysDestroyAttr* clang::Decl::getAttr<clang::AlwaysDestroyAttr>() const Line | Count | Source | 577 | 51 | template<typename T> T *getAttr() const { | 578 | 51 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4 : nullptr47 ; | 579 | 51 | } |
clang::RandomizeLayoutAttr* clang::Decl::getAttr<clang::RandomizeLayoutAttr>() const Line | Count | Source | 577 | 18 | template<typename T> T *getAttr() const { | 578 | 18 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr16 ; | 579 | 18 | } |
clang::SpeculativeLoadHardeningAttr* clang::Decl::getAttr<clang::SpeculativeLoadHardeningAttr>() const Line | Count | Source | 577 | 30 | template<typename T> T *getAttr() const { | 578 | 30 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3 : nullptr27 ; | 579 | 30 | } |
clang::AlwaysInlineAttr* clang::Decl::getAttr<clang::AlwaysInlineAttr>() const Line | Count | Source | 577 | 591 | template<typename T> T *getAttr() const { | 578 | 591 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())497 : nullptr94 ; | 579 | 591 | } |
clang::PointerAttr* clang::Decl::getAttr<clang::PointerAttr>() const Line | Count | Source | 577 | 5.38k | template<typename T> T *getAttr() const { | 578 | 5.38k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())5.32k : nullptr62 ; | 579 | 5.38k | } |
clang::OwnerAttr* clang::Decl::getAttr<clang::OwnerAttr>() const Line | Count | Source | 577 | 1.95k | template<typename T> T *getAttr() const { | 578 | 1.95k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.90k : nullptr50 ; | 579 | 1.95k | } |
clang::NoRandomizeLayoutAttr* clang::Decl::getAttr<clang::NoRandomizeLayoutAttr>() const Line | Count | Source | 577 | 70 | template<typename T> T *getAttr() const { | 578 | 70 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())14 : nullptr56 ; | 579 | 70 | } |
clang::NoSpeculativeLoadHardeningAttr* clang::Decl::getAttr<clang::NoSpeculativeLoadHardeningAttr>() const Line | Count | Source | 577 | 30 | template<typename T> T *getAttr() const { | 578 | 30 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3 : nullptr27 ; | 579 | 30 | } |
clang::WeakAttr* clang::Decl::getAttr<clang::WeakAttr>() const Line | Count | Source | 577 | 39.6M | template<typename T> T *getAttr() const { | 578 | 39.6M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())35.6M : nullptr3.97M ; | 579 | 39.6M | } |
clang::WeakRefAttr* clang::Decl::getAttr<clang::WeakRefAttr>() const Line | Count | Source | 577 | 39.6M | template<typename T> T *getAttr() const { | 578 | 39.6M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())35.6M : nullptr3.97M ; | 579 | 39.6M | } |
clang::InternalLinkageAttr* clang::Decl::getAttr<clang::InternalLinkageAttr>() const Line | Count | Source | 577 | 510k | template<typename T> T *getAttr() const { | 578 | 510k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())115k : nullptr395k ; | 579 | 510k | } |
clang::NakedAttr* clang::Decl::getAttr<clang::NakedAttr>() const Line | Count | Source | 577 | 402 | template<typename T> T *getAttr() const { | 578 | 402 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())343 : nullptr59 ; | 579 | 402 | } |
clang::UsedAttr* clang::Decl::getAttr<clang::UsedAttr>() const Line | Count | Source | 577 | 4.02M | template<typename T> T *getAttr() const { | 578 | 4.02M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.25M : nullptr2.77M ; | 579 | 4.02M | } |
clang::RetainAttr* clang::Decl::getAttr<clang::RetainAttr>() const Line | Count | Source | 577 | 4.02M | template<typename T> T *getAttr() const { | 578 | 4.02M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.25M : nullptr2.77M ; | 579 | 4.02M | } |
clang::ConstInitAttr* clang::Decl::getAttr<clang::ConstInitAttr>() const Line | Count | Source | 577 | 1.07M | template<typename T> T *getAttr() const { | 578 | 1.07M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())702k : nullptr375k ; | 579 | 1.07M | } |
clang::CodeSegAttr* clang::Decl::getAttr<clang::CodeSegAttr>() const Line | Count | Source | 577 | 4.40M | template<typename T> T *getAttr() const { | 578 | 4.40M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.48M : nullptr2.91M ; | 579 | 4.40M | } |
clang::CarriesDependencyAttr* clang::Decl::getAttr<clang::CarriesDependencyAttr>() const Line | Count | Source | 577 | 1.18M | template<typename T> T *getAttr() const { | 578 | 1.18M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())97.0k : nullptr1.09M ; | 579 | 1.18M | } |
clang::ErrorAttr* clang::Decl::getAttr<clang::ErrorAttr>() const Line | Count | Source | 577 | 751k | template<typename T> T *getAttr() const { | 578 | 751k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())226k : nullptr524k ; | 579 | 751k | } |
clang::OverloadableAttr* clang::Decl::getAttr<clang::OverloadableAttr>() const Line | Count | Source | 577 | 7.50M | template<typename T> T *getAttr() const { | 578 | 7.50M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())7.50M : nullptr20 ; | 579 | 7.50M | } |
clang::AnyX86NoCallerSavedRegistersAttr* clang::Decl::getAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const Line | Count | Source | 577 | 1 | template<typename T> T *getAttr() const { | 578 | 1 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 1 | } |
clang::CXX11NoReturnAttr* clang::Decl::getAttr<clang::CXX11NoReturnAttr>() const Line | Count | Source | 577 | 357k | template<typename T> T *getAttr() const { | 578 | 357k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())91.8k : nullptr265k ; | 579 | 357k | } |
clang::ReadOnlyPlacementAttr* clang::Decl::getAttr<clang::ReadOnlyPlacementAttr>() const Line | Count | Source | 577 | 41.1k | template<typename T> T *getAttr() const { | 578 | 41.1k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())12.3k : nullptr28.7k ; | 579 | 41.1k | } |
clang::NoBuiltinAttr* clang::Decl::getAttr<clang::NoBuiltinAttr>() const Line | Count | Source | 577 | 36.3M | template<typename T> T *getAttr() const { | 578 | 36.3M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())34.5M : nullptr1.77M ; | 579 | 36.3M | } |
clang::HLSLShaderAttr* clang::Decl::getAttr<clang::HLSLShaderAttr>() const Line | Count | Source | 577 | 248 | template<typename T> T *getAttr() const { | 578 | 248 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())174 : nullptr74 ; | 579 | 248 | } |
clang::HLSLNumThreadsAttr* clang::Decl::getAttr<clang::HLSLNumThreadsAttr>() const Line | Count | Source | 577 | 228 | template<typename T> T *getAttr() const { | 578 | 228 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())128 : nullptr100 ; | 579 | 228 | } |
clang::HLSLAnnotationAttr* clang::Decl::getAttr<clang::HLSLAnnotationAttr>() const Line | Count | Source | 577 | 20 | template<typename T> T *getAttr() const { | 578 | 20 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())19 : nullptr1 ; | 579 | 20 | } |
clang::DLLExportStaticLocalAttr* clang::Decl::getAttr<clang::DLLExportStaticLocalAttr>() const Line | Count | Source | 577 | 5 | template<typename T> T *getAttr() const { | 578 | 5 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 5 | } |
clang::DLLImportStaticLocalAttr* clang::Decl::getAttr<clang::DLLImportStaticLocalAttr>() const Line | Count | Source | 577 | 1 | template<typename T> T *getAttr() const { | 578 | 1 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 1 | } |
clang::RISCVInterruptAttr* clang::Decl::getAttr<clang::RISCVInterruptAttr>() const Line | Count | Source | 577 | 3.66k | template<typename T> T *getAttr() const { | 578 | 3.66k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())50 : nullptr3.61k ; | 579 | 3.66k | } |
clang::VecReturnAttr* clang::Decl::getAttr<clang::VecReturnAttr>() const Line | Count | Source | 577 | 20 | template<typename T> T *getAttr() const { | 578 | 20 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1 : nullptr19 ; | 579 | 20 | } |
clang::MinVectorWidthAttr* clang::Decl::getAttr<clang::MinVectorWidthAttr>() const Line | Count | Source | 577 | 1.81M | template<typename T> T *getAttr() const { | 578 | 1.81M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.60M : nullptr205k ; | 579 | 1.81M | } |
clang::SwiftBridgeAttr* clang::Decl::getAttr<clang::SwiftBridgeAttr>() const Line | Count | Source | 577 | 9 | template<typename T> T *getAttr() const { | 578 | 9 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr7 ; | 579 | 9 | } |
clang::SwiftAsyncErrorAttr* clang::Decl::getAttr<clang::SwiftAsyncErrorAttr>() const Line | Count | Source | 577 | 33 | template<typename T> T *getAttr() const { | 578 | 33 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 33 | } |
clang::OpenCLIntelReqdSubGroupSizeAttr* clang::Decl::getAttr<clang::OpenCLIntelReqdSubGroupSizeAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::VecTypeHintAttr* clang::Decl::getAttr<clang::VecTypeHintAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::OptimizeNoneAttr* clang::Decl::getAttr<clang::OptimizeNoneAttr>() const Line | Count | Source | 577 | 29.7M | template<typename T> T *getAttr() const { | 578 | 29.7M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())56.8k : nullptr29.7M ; | 579 | 29.7M | } |
clang::SwiftNameAttr* clang::Decl::getAttr<clang::SwiftNameAttr>() const Line | Count | Source | 577 | 17 | template<typename T> T *getAttr() const { | 578 | 17 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 17 | } |
clang::MinSizeAttr* clang::Decl::getAttr<clang::MinSizeAttr>() const Line | Count | Source | 577 | 105 | template<typename T> T *getAttr() const { | 578 | 105 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())15 : nullptr90 ; | 579 | 105 | } |
clang::WebAssemblyImportModuleAttr* clang::Decl::getAttr<clang::WebAssemblyImportModuleAttr>() const Line | Count | Source | 577 | 1.09k | template<typename T> T *getAttr() const { | 578 | 1.09k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())18 : nullptr1.07k ; | 579 | 1.09k | } |
clang::WebAssemblyImportNameAttr* clang::Decl::getAttr<clang::WebAssemblyImportNameAttr>() const Line | Count | Source | 577 | 1.09k | template<typename T> T *getAttr() const { | 578 | 1.09k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())18 : nullptr1.07k ; | 579 | 1.09k | } |
clang::CountedByAttr* clang::Decl::getAttr<clang::CountedByAttr>() const Line | Count | Source | 577 | 223 | template<typename T> T *getAttr() const { | 578 | 223 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())49 : nullptr174 ; | 579 | 223 | } |
clang::ReqdWorkGroupSizeAttr* clang::Decl::getAttr<clang::ReqdWorkGroupSizeAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::WorkGroupSizeHintAttr* clang::Decl::getAttr<clang::WorkGroupSizeHintAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::AMDGPUFlatWorkGroupSizeAttr* clang::Decl::getAttr<clang::AMDGPUFlatWorkGroupSizeAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::AMDGPUWavesPerEUAttr* clang::Decl::getAttr<clang::AMDGPUWavesPerEUAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::AMDGPUNumSGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumSGPRAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::AMDGPUNumVGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumVGPRAttr>() const Line | Count | Source | 577 | 40.8M | template<typename T> T *getAttr() const { | 578 | 40.8M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())38.8M : nullptr1.94M ; | 579 | 40.8M | } |
clang::TrivialABIAttr* clang::Decl::getAttr<clang::TrivialABIAttr>() const Line | Count | Source | 577 | 56 | template<typename T> T *getAttr() const { | 578 | 56 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 56 | } |
clang::FinalAttr* clang::Decl::getAttr<clang::FinalAttr>() const Line | Count | Source | 577 | 580k | template<typename T> T *getAttr() const { | 578 | 580k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())129k : nullptr451k ; | 579 | 580k | } |
clang::OverrideAttr* clang::Decl::getAttr<clang::OverrideAttr>() const Line | Count | Source | 577 | 22 | template<typename T> T *getAttr() const { | 578 | 22 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 22 | } |
clang::ObjCDirectAttr* clang::Decl::getAttr<clang::ObjCDirectAttr>() const Line | Count | Source | 577 | 136 | template<typename T> T *getAttr() const { | 578 | 136 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 136 | } |
clang::UnusedAttr* clang::Decl::getAttr<clang::UnusedAttr>() const Line | Count | Source | 577 | 175M | template<typename T> T *getAttr() const { | 578 | 175M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())14.6M : nullptr161M ; | 579 | 175M | } |
clang::ObjCBridgeRelatedAttr* clang::Decl::getAttr<clang::ObjCBridgeRelatedAttr>() const Line | Count | Source | 577 | 1.20k | template<typename T> T *getAttr() const { | 578 | 1.20k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())885 : nullptr319 ; | 579 | 1.20k | } |
clang::OMPThreadPrivateDeclAttr* clang::Decl::getAttr<clang::OMPThreadPrivateDeclAttr>() const Line | Count | Source | 577 | 79 | template<typename T> T *getAttr() const { | 578 | 79 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 79 | } |
clang::OMPAllocateDeclAttr* clang::Decl::getAttr<clang::OMPAllocateDeclAttr>() const Line | Count | Source | 577 | 26.4k | template<typename T> T *getAttr() const { | 578 | 26.4k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4.25k : nullptr22.2k ; | 579 | 26.4k | } |
clang::OMPDeclareTargetDeclAttr* clang::Decl::getAttr<clang::OMPDeclareTargetDeclAttr>() const Line | Count | Source | 577 | 1.44k | template<typename T> T *getAttr() const { | 578 | 1.44k | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 1.44k | } |
clang::WarnUnusedAttr* clang::Decl::getAttr<clang::WarnUnusedAttr>() const Line | Count | Source | 577 | 14 | template<typename T> T *getAttr() const { | 578 | 14 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3 : nullptr11 ; | 579 | 14 | } |
clang::OpenCLAccessAttr* clang::Decl::getAttr<clang::OpenCLAccessAttr>() const Line | Count | Source | 577 | 146 | template<typename T> T *getAttr() const { | 578 | 146 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())128 : nullptr18 ; | 579 | 146 | } |
clang::ParameterABIAttr* clang::Decl::getAttr<clang::ParameterABIAttr>() const Line | Count | Source | 577 | 94.3M | template<typename T> T *getAttr() const { | 578 | 94.3M | return hasAttrs() ? getSpecificAttr<T>(getAttrs())58.0k : nullptr94.3M ; | 579 | 94.3M | } |
clang::ObjCBridgeAttr* clang::Decl::getAttr<clang::ObjCBridgeAttr>() const Line | Count | Source | 577 | 8.91k | template<typename T> T *getAttr() const { | 578 | 8.91k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.77k : nullptr7.14k ; | 579 | 8.91k | } |
clang::ObjCBridgeMutableAttr* clang::Decl::getAttr<clang::ObjCBridgeMutableAttr>() const Line | Count | Source | 577 | 7.62k | template<typename T> T *getAttr() const { | 578 | 7.62k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())483 : nullptr7.14k ; | 579 | 7.62k | } |
clang::SwiftAsyncAttr* clang::Decl::getAttr<clang::SwiftAsyncAttr>() const Line | Count | Source | 577 | 5.92k | template<typename T> T *getAttr() const { | 578 | 5.92k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())248 : nullptr5.68k ; | 579 | 5.92k | } |
clang::TestTypestateAttr* clang::Decl::getAttr<clang::TestTypestateAttr>() const Line | Count | Source | 577 | 43 | template<typename T> T *getAttr() const { | 578 | 43 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 43 | } |
clang::ConsumableAttr* clang::Decl::getAttr<clang::ConsumableAttr>() const Line | Count | Source | 577 | 43 | template<typename T> T *getAttr() const { | 578 | 43 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 43 | } |
clang::CallableWhenAttr* clang::Decl::getAttr<clang::CallableWhenAttr>() const Line | Count | Source | 577 | 291 | template<typename T> T *getAttr() const { | 578 | 291 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())277 : nullptr14 ; | 579 | 291 | } |
clang::ParamTypestateAttr* clang::Decl::getAttr<clang::ParamTypestateAttr>() const Line | Count | Source | 577 | 78 | template<typename T> T *getAttr() const { | 578 | 78 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())19 : nullptr59 ; | 579 | 78 | } |
clang::ReturnTypestateAttr* clang::Decl::getAttr<clang::ReturnTypestateAttr>() const Line | Count | Source | 577 | 269 | template<typename T> T *getAttr() const { | 578 | 269 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())42 : nullptr227 ; | 579 | 269 | } |
clang::SetTypestateAttr* clang::Decl::getAttr<clang::SetTypestateAttr>() const Line | Count | Source | 577 | 215 | template<typename T> T *getAttr() const { | 578 | 215 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())202 : nullptr13 ; | 579 | 215 | } |
clang::CapabilityAttr* clang::Decl::getAttr<clang::CapabilityAttr>() const Line | Count | Source | 577 | 9.32k | template<typename T> T *getAttr() const { | 578 | 9.32k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())9.14k : nullptr180 ; | 579 | 9.32k | } |
clang::LockReturnedAttr* clang::Decl::getAttr<clang::LockReturnedAttr>() const Line | Count | Source | 577 | 368 | template<typename T> T *getAttr() const { | 578 | 368 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())180 : nullptr188 ; | 579 | 368 | } |
clang::AcquireHandleAttr* clang::Decl::getAttr<clang::AcquireHandleAttr>() const Line | Count | Source | 577 | 151 | template<typename T> T *getAttr() const { | 578 | 151 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 151 | } |
clang::ReleaseHandleAttr* clang::Decl::getAttr<clang::ReleaseHandleAttr>() const Line | Count | Source | 577 | 165 | template<typename T> T *getAttr() const { | 578 | 165 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 165 | } |
clang::UseHandleAttr* clang::Decl::getAttr<clang::UseHandleAttr>() const Line | Count | Source | 577 | 47 | template<typename T> T *getAttr() const { | 578 | 47 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 47 | } |
clang::PcsAttr* clang::Decl::getAttr<clang::PcsAttr>() const Line | Count | Source | 577 | 20.4k | template<typename T> T *getAttr() const { | 578 | 20.4k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())4.03k : nullptr16.4k ; | 579 | 20.4k | } |
clang::AssumeAlignedAttr* clang::Decl::getAttr<clang::AssumeAlignedAttr>() const Line | Count | Source | 577 | 313k | template<typename T> T *getAttr() const { | 578 | 313k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())163k : nullptr149k ; | 579 | 313k | } |
clang::ZeroCallUsedRegsAttr* clang::Decl::getAttr<clang::ZeroCallUsedRegsAttr>() const Line | Count | Source | 577 | 81 | template<typename T> T *getAttr() const { | 578 | 81 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 81 | } |
clang::AlignValueAttr* clang::Decl::getAttr<clang::AlignValueAttr>() const Line | Count | Source | 577 | 900k | template<typename T> T *getAttr() const { | 578 | 900k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())23.5k : nullptr876k ; | 579 | 900k | } |
clang::CFGuardAttr* clang::Decl::getAttr<clang::CFGuardAttr>() const Line | Count | Source | 577 | 316k | template<typename T> T *getAttr() const { | 578 | 316k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())108k : nullptr207k ; | 579 | 316k | } |
clang::PreferredTypeAttr* clang::Decl::getAttr<clang::PreferredTypeAttr>() const Line | Count | Source | 577 | 1 | template<typename T> T *getAttr() const { | 578 | 1 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 1 | } |
clang::PreferredNameAttr* clang::Decl::getAttr<clang::PreferredNameAttr>() const Line | Count | Source | 577 | 49.3k | template<typename T> T *getAttr() const { | 578 | 49.3k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())9.18k : nullptr40.1k ; | 579 | 49.3k | } |
clang::UninitializedAttr* clang::Decl::getAttr<clang::UninitializedAttr>() const Line | Count | Source | 577 | 227k | template<typename T> T *getAttr() const { | 578 | 227k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())7.46k : nullptr219k ; | 579 | 227k | } |
clang::InitSegAttr* clang::Decl::getAttr<clang::InitSegAttr>() const Line | Count | Source | 577 | 6.61k | template<typename T> T *getAttr() const { | 578 | 6.61k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.38k : nullptr5.23k ; | 579 | 6.61k | } |
clang::InitPriorityAttr* clang::Decl::getAttr<clang::InitPriorityAttr>() const Line | Count | Source | 577 | 6.44k | template<typename T> T *getAttr() const { | 578 | 6.44k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.36k : nullptr5.08k ; | 579 | 6.44k | } |
clang::HLSLResourceBindingAttr* clang::Decl::getAttr<clang::HLSLResourceBindingAttr>() const Line | Count | Source | 577 | 20 | template<typename T> T *getAttr() const { | 578 | 20 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())6 : nullptr14 ; | 579 | 20 | } |
clang::HLSLResourceAttr* clang::Decl::getAttr<clang::HLSLResourceAttr>() const Line | Count | Source | 577 | 17 | template<typename T> T *getAttr() const { | 578 | 17 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())15 : nullptr2 ; | 579 | 17 | } |
clang::OMPCaptureKindAttr* clang::Decl::getAttr<clang::OMPCaptureKindAttr>() const Line | Count | Source | 577 | 219 | template<typename T> T *getAttr() const { | 578 | 219 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 219 | } |
clang::XRayInstrumentAttr* clang::Decl::getAttr<clang::XRayInstrumentAttr>() const Line | Count | Source | 577 | 313k | template<typename T> T *getAttr() const { | 578 | 313k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())102k : nullptr210k ; | 579 | 313k | } |
clang::XRayLogArgsAttr* clang::Decl::getAttr<clang::XRayLogArgsAttr>() const Line | Count | Source | 577 | 82 | template<typename T> T *getAttr() const { | 578 | 82 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 82 | } |
clang::PatchableFunctionEntryAttr* clang::Decl::getAttr<clang::PatchableFunctionEntryAttr>() const Line | Count | Source | 577 | 313k | template<typename T> T *getAttr() const { | 578 | 313k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())102k : nullptr210k ; | 579 | 313k | } |
clang::FunctionReturnThunksAttr* clang::Decl::getAttr<clang::FunctionReturnThunksAttr>() const Line | Count | Source | 577 | 313k | template<typename T> T *getAttr() const { | 578 | 313k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())102k : nullptr210k ; | 579 | 313k | } |
clang::TLSModelAttr* clang::Decl::getAttr<clang::TLSModelAttr>() const Line | Count | Source | 577 | 617 | template<typename T> T *getAttr() const { | 578 | 617 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())138 : nullptr479 ; | 579 | 617 | } |
clang::PragmaClangBSSSectionAttr* clang::Decl::getAttr<clang::PragmaClangBSSSectionAttr>() const Line | Count | Source | 577 | 35.9k | template<typename T> T *getAttr() const { | 578 | 35.9k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3.61k : nullptr32.3k ; | 579 | 35.9k | } |
clang::PragmaClangDataSectionAttr* clang::Decl::getAttr<clang::PragmaClangDataSectionAttr>() const Line | Count | Source | 577 | 35.9k | template<typename T> T *getAttr() const { | 578 | 35.9k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3.61k : nullptr32.3k ; | 579 | 35.9k | } |
clang::PragmaClangRodataSectionAttr* clang::Decl::getAttr<clang::PragmaClangRodataSectionAttr>() const Line | Count | Source | 577 | 35.9k | template<typename T> T *getAttr() const { | 578 | 35.9k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3.61k : nullptr32.3k ; | 579 | 35.9k | } |
clang::PragmaClangRelroSectionAttr* clang::Decl::getAttr<clang::PragmaClangRelroSectionAttr>() const Line | Count | Source | 577 | 35.9k | template<typename T> T *getAttr() const { | 578 | 35.9k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())3.61k : nullptr32.3k ; | 579 | 35.9k | } |
clang::PragmaClangTextSectionAttr* clang::Decl::getAttr<clang::PragmaClangTextSectionAttr>() const Line | Count | Source | 577 | 305k | template<typename T> T *getAttr() const { | 578 | 305k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())100k : nullptr204k ; | 579 | 305k | } |
clang::CallbackAttr* clang::Decl::getAttr<clang::CallbackAttr>() const Line | Count | Source | 577 | 311k | template<typename T> T *getAttr() const { | 578 | 311k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())113k : nullptr197k ; | 579 | 311k | } |
clang::ConstructorAttr* clang::Decl::getAttr<clang::ConstructorAttr>() const Line | Count | Source | 577 | 220k | template<typename T> T *getAttr() const { | 578 | 220k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())74.8k : nullptr145k ; | 579 | 220k | } |
clang::DestructorAttr* clang::Decl::getAttr<clang::DestructorAttr>() const Line | Count | Source | 577 | 220k | template<typename T> T *getAttr() const { | 578 | 220k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())74.8k : nullptr145k ; | 579 | 220k | } |
clang::ARMInterruptAttr* clang::Decl::getAttr<clang::ARMInterruptAttr>() const Line | Count | Source | 577 | 12.8k | template<typename T> T *getAttr() const { | 578 | 12.8k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())1.87k : nullptr10.9k ; | 579 | 12.8k | } |
clang::AVRInterruptAttr* clang::Decl::getAttr<clang::AVRInterruptAttr>() const Line | Count | Source | 577 | 55 | template<typename T> T *getAttr() const { | 578 | 55 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr53 ; | 579 | 55 | } |
clang::AVRSignalAttr* clang::Decl::getAttr<clang::AVRSignalAttr>() const Line | Count | Source | 577 | 55 | template<typename T> T *getAttr() const { | 578 | 55 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())2 : nullptr53 ; | 579 | 55 | } |
clang::M68kInterruptAttr* clang::Decl::getAttr<clang::M68kInterruptAttr>() const Line | Count | Source | 577 | 61 | template<typename T> T *getAttr() const { | 578 | 61 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())0 : nullptr; | 579 | 61 | } |
clang::MSP430InterruptAttr* clang::Decl::getAttr<clang::MSP430InterruptAttr>() const Line | Count | Source | 577 | 1 | template<typename T> T *getAttr() const { | 578 | 1 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 1 | } |
clang::CUDALaunchBoundsAttr* clang::Decl::getAttr<clang::CUDALaunchBoundsAttr>() const Line | Count | Source | 577 | 201 | template<typename T> T *getAttr() const { | 578 | 201 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())193 : nullptr8 ; | 579 | 201 | } |
clang::WebAssemblyExportNameAttr* clang::Decl::getAttr<clang::WebAssemblyExportNameAttr>() const Line | Count | Source | 577 | 1.09k | template<typename T> T *getAttr() const { | 578 | 1.09k | return hasAttrs() ? getSpecificAttr<T>(getAttrs())11 : nullptr1.07k ; | 579 | 1.09k | } |
clang::IBOutletCollectionAttr* clang::Decl::getAttr<clang::IBOutletCollectionAttr>() const Line | Count | Source | 577 | 33 | template<typename T> T *getAttr() const { | 578 | 33 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())7 : nullptr26 ; | 579 | 33 | } |
clang::AnnotateAttr* clang::Decl::getAttr<clang::AnnotateAttr>() const Line | Count | Source | 577 | 65 | template<typename T> T *getAttr() const { | 578 | 65 | return hasAttrs() ? getSpecificAttr<T>(getAttrs())11 : nullptr54 ; | 579 | 65 | } |
clang::BlocksAttr* clang::Decl::getAttr<clang::BlocksAttr>() const Line | Count | Source | 577 | 4 | template<typename T> T *getAttr() const { | 578 | 4 | return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : nullptr0 ; | 579 | 4 | } |
|
580 | | |
581 | 2.62G | template<typename T> bool hasAttr() const { |
582 | 2.62G | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.56G ; |
583 | 2.62G | } bool clang::Decl::hasAttr<clang::DLLImportAttr>() const Line | Count | Source | 581 | 69.0M | template<typename T> bool hasAttr() const { | 582 | 69.0M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())51.2M ; | 583 | 69.0M | } |
bool clang::Decl::hasAttr<clang::DLLExportAttr>() const Line | Count | Source | 581 | 14.3M | template<typename T> bool hasAttr() const { | 582 | 14.3M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())9.82M ; | 583 | 14.3M | } |
bool clang::Decl::hasAttr<clang::GNUInlineAttr>() const Line | Count | Source | 581 | 19.6M | template<typename T> bool hasAttr() const { | 582 | 19.6M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())18.7M ; | 583 | 19.6M | } |
bool clang::Decl::hasAttr<clang::CUDAGlobalAttr>() const Line | Count | Source | 581 | 132M | template<typename T> bool hasAttr() const { | 582 | 132M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())120M ; | 583 | 132M | } |
bool clang::Decl::hasAttr<clang::PackedAttr>() const Line | Count | Source | 581 | 2.34M | template<typename T> bool hasAttr() const { | 582 | 2.34M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())408k ; | 583 | 2.34M | } |
bool clang::Decl::hasAttr<clang::AlignedAttr>() const Line | Count | Source | 581 | 1.19M | template<typename T> bool hasAttr() const { | 582 | 1.19M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())195k ; | 583 | 1.19M | } |
bool clang::Decl::hasAttr<clang::BlocksAttr>() const Line | Count | Source | 581 | 121M | template<typename T> bool hasAttr() const { | 582 | 121M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.12M ; | 583 | 121M | } |
bool clang::Decl::hasAttr<clang::TransparentUnionAttr>() const Line | Count | Source | 581 | 311 | template<typename T> bool hasAttr() const { | 582 | 311 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())155 ; | 583 | 311 | } |
bool clang::Decl::hasAttr<clang::WeakRefAttr>() const Line | Count | Source | 581 | 115M | template<typename T> bool hasAttr() const { | 582 | 115M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())80.4M ; | 583 | 115M | } |
bool clang::Decl::hasAttr<clang::AliasAttr>() const Line | Count | Source | 581 | 85.4M | template<typename T> bool hasAttr() const { | 582 | 85.4M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())57.5M ; | 583 | 85.4M | } |
bool clang::Decl::hasAttr<clang::UsedAttr>() const Line | Count | Source | 581 | 74.9M | template<typename T> bool hasAttr() const { | 582 | 74.9M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())46.8M ; | 583 | 74.9M | } |
bool clang::Decl::hasAttr<clang::ConstructorAttr>() const Line | Count | Source | 581 | 8.88M | template<typename T> bool hasAttr() const { | 582 | 8.88M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())8.51M ; | 583 | 8.88M | } |
bool clang::Decl::hasAttr<clang::DestructorAttr>() const Line | Count | Source | 581 | 8.88M | template<typename T> bool hasAttr() const { | 582 | 8.88M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())8.51M ; | 583 | 8.88M | } |
bool clang::Decl::hasAttr<clang::UnavailableAttr>() const Line | Count | Source | 581 | 2.42M | template<typename T> bool hasAttr() const { | 582 | 2.42M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())237k ; | 583 | 2.42M | } |
bool clang::Decl::hasAttr<clang::DeprecatedAttr>() const Line | Count | Source | 581 | 115 | template<typename T> bool hasAttr() const { | 582 | 115 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())19 ; | 583 | 115 | } |
bool clang::Decl::hasAttr<clang::CUDADeviceAttr>() const Line | Count | Source | 581 | 4.65M | template<typename T> bool hasAttr() const { | 582 | 4.65M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.16M ; | 583 | 4.65M | } |
bool clang::Decl::hasAttr<clang::CUDAConstantAttr>() const Line | Count | Source | 581 | 4.58M | template<typename T> bool hasAttr() const { | 582 | 4.58M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.08M ; | 583 | 4.58M | } |
bool clang::Decl::hasAttr<clang::HIPManagedAttr>() const Line | Count | Source | 581 | 58.4k | template<typename T> bool hasAttr() const { | 582 | 58.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())11.6k ; | 583 | 58.4k | } |
bool clang::Decl::hasAttr<clang::VisibilityAttr>() const Line | Count | Source | 581 | 695k | template<typename T> bool hasAttr() const { | 582 | 695k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())289k ; | 583 | 695k | } |
bool clang::Decl::hasAttr<clang::TypeVisibilityAttr>() const Line | Count | Source | 581 | 61.7k | template<typename T> bool hasAttr() const { | 582 | 61.7k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())9.24k ; | 583 | 61.7k | } |
bool clang::Decl::hasAttr<clang::InternalLinkageAttr>() const Line | Count | Source | 581 | 209M | template<typename T> bool hasAttr() const { | 582 | 209M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())175M ; | 583 | 209M | } |
bool clang::Decl::hasAttr<clang::ThreadAttr>() const Line | Count | Source | 581 | 13.7M | template<typename T> bool hasAttr() const { | 582 | 13.7M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.00M ; | 583 | 13.7M | } |
bool clang::Decl::hasAttr<clang::OMPThreadPrivateDeclAttr>() const Line | Count | Source | 581 | 9.27M | template<typename T> bool hasAttr() const { | 582 | 9.27M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())95.6k ; | 583 | 9.27M | } |
bool clang::Decl::hasAttr<clang::CUDASharedAttr>() const Line | Count | Source | 581 | 50.9k | template<typename T> bool hasAttr() const { | 582 | 50.9k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.54k ; | 583 | 50.9k | } |
bool clang::Decl::hasAttr<clang::NoDestroyAttr>() const Line | Count | Source | 581 | 1.71M | template<typename T> bool hasAttr() const { | 582 | 1.71M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())23.7k ; | 583 | 1.71M | } |
bool clang::Decl::hasAttr<clang::AlwaysDestroyAttr>() const Line | Count | Source | 581 | 57 | template<typename T> bool hasAttr() const { | 582 | 57 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())33 ; | 583 | 57 | } |
bool clang::Decl::hasAttr<clang::NSConsumedAttr>() const Line | Count | Source | 581 | 341k | template<typename T> bool hasAttr() const { | 582 | 341k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())11.5k ; | 583 | 341k | } |
bool clang::Decl::hasAttr<clang::AlwaysInlineAttr>() const Line | Count | Source | 581 | 30.4M | template<typename T> bool hasAttr() const { | 582 | 30.4M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())345k ; | 583 | 30.4M | } |
bool clang::Decl::hasAttr<clang::OpenCLKernelAttr>() const Line | Count | Source | 581 | 87.1M | template<typename T> bool hasAttr() const { | 582 | 87.1M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())76.9M ; | 583 | 87.1M | } |
bool clang::Decl::hasAttr<clang::NoReturnAttr>() const Line | Count | Source | 581 | 8.09M | template<typename T> bool hasAttr() const { | 582 | 8.09M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())6.12M ; | 583 | 8.09M | } |
bool clang::Decl::hasAttr<clang::CXX11NoReturnAttr>() const Line | Count | Source | 581 | 7.42M | template<typename T> bool hasAttr() const { | 582 | 7.42M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.84M ; | 583 | 7.42M | } |
bool clang::Decl::hasAttr<clang::C11NoReturnAttr>() const Line | Count | Source | 581 | 7.42M | template<typename T> bool hasAttr() const { | 582 | 7.42M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.83M ; | 583 | 7.42M | } |
bool clang::Decl::hasAttr<clang::TargetAttr>() const Line | Count | Source | 581 | 40.5M | template<typename T> bool hasAttr() const { | 582 | 40.5M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())37.4M ; | 583 | 40.5M | } |
bool clang::Decl::hasAttr<clang::TargetVersionAttr>() const Line | Count | Source | 581 | 35.9M | template<typename T> bool hasAttr() const { | 582 | 35.9M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())32.9M ; | 583 | 35.9M | } |
bool clang::Decl::hasAttr<clang::CPUDispatchAttr>() const Line | Count | Source | 581 | 71.1M | template<typename T> bool hasAttr() const { | 582 | 71.1M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())66.3M ; | 583 | 71.1M | } |
bool clang::Decl::hasAttr<clang::CPUSpecificAttr>() const Line | Count | Source | 581 | 35.9M | template<typename T> bool hasAttr() const { | 582 | 35.9M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())32.9M ; | 583 | 35.9M | } |
bool clang::Decl::hasAttr<clang::TargetClonesAttr>() const Line | Count | Source | 581 | 35.9M | template<typename T> bool hasAttr() const { | 582 | 35.9M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())32.9M ; | 583 | 35.9M | } |
bool clang::Decl::hasAttr<clang::OverloadableAttr>() const Line | Count | Source | 581 | 217M | template<typename T> bool hasAttr() const { | 582 | 217M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())213M ; | 583 | 217M | } |
bool clang::Decl::hasAttr<clang::ArmBuiltinAliasAttr>() const Line | Count | Source | 581 | 90.3M | template<typename T> bool hasAttr() const { | 582 | 90.3M | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 90.3M | } |
bool clang::Decl::hasAttr<clang::BuiltinAliasAttr>() const Line | Count | Source | 581 | 12.9k | template<typename T> bool hasAttr() const { | 582 | 12.9k | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 12.9k | } |
bool clang::Decl::hasAttr<clang::FlagEnumAttr>() const Line | Count | Source | 581 | 380k | template<typename T> bool hasAttr() const { | 582 | 380k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3.11k ; | 583 | 380k | } |
bool clang::Decl::hasAttr<clang::CapturedRecordAttr>() const Line | Count | Source | 581 | 9.31k | template<typename T> bool hasAttr() const { | 582 | 9.31k | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 9.31k | } |
bool clang::Decl::hasAttr<clang::MSStructAttr>() const Line | Count | Source | 581 | 1.87M | template<typename T> bool hasAttr() const { | 582 | 1.87M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())253k ; | 583 | 1.87M | } |
bool clang::Decl::hasAttr<clang::WeakAttr>() const Line | Count | Source | 581 | 29.4M | template<typename T> bool hasAttr() const { | 582 | 29.4M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())708k ; | 583 | 29.4M | } |
bool clang::Decl::hasAttr<clang::IFuncAttr>() const Line | Count | Source | 581 | 74.5M | template<typename T> bool hasAttr() const { | 582 | 74.5M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())49.9M ; | 583 | 74.5M | } |
bool clang::Decl::hasAttr<clang::LoaderUninitializedAttr>() const Line | Count | Source | 581 | 43.9M | template<typename T> bool hasAttr() const { | 582 | 43.9M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())17.4M ; | 583 | 43.9M | } |
bool clang::Decl::hasAttr<clang::FinalAttr>() const Line | Count | Source | 581 | 8.26M | template<typename T> bool hasAttr() const { | 582 | 8.26M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.79M ; | 583 | 8.26M | } |
bool clang::Decl::hasAttr<clang::ArcWeakrefUnavailableAttr>() const Line | Count | Source | 581 | 578 | template<typename T> bool hasAttr() const { | 582 | 578 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())85 ; | 583 | 578 | } |
bool clang::Decl::hasAttr<clang::ObjCRequiresPropertyDefsAttr>() const Line | Count | Source | 581 | 18.2k | template<typename T> bool hasAttr() const { | 582 | 18.2k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.68k ; | 583 | 18.2k | } |
bool clang::Decl::hasAttr<clang::ObjCDirectAttr>() const Line | Count | Source | 581 | 2.58M | template<typename T> bool hasAttr() const { | 582 | 2.58M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.41M ; | 583 | 2.58M | } |
bool clang::Decl::hasAttr<clang::ObjCDesignatedInitializerAttr>() const Line | Count | Source | 581 | 40.8M | template<typename T> bool hasAttr() const { | 582 | 40.8M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())38.8M ; | 583 | 40.8M | } |
bool clang::Decl::hasAttr<clang::NSConsumesSelfAttr>() const Line | Count | Source | 581 | 55.0k | template<typename T> bool hasAttr() const { | 582 | 55.0k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())26.3k ; | 583 | 55.0k | } |
bool clang::Decl::hasAttr<clang::ObjCNonRuntimeProtocolAttr>() const Line | Count | Source | 581 | 245 | template<typename T> bool hasAttr() const { | 582 | 245 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())55 ; | 583 | 245 | } |
bool clang::Decl::hasAttr<clang::PureAttr>() const Line | Count | Source | 581 | 1.32M | template<typename T> bool hasAttr() const { | 582 | 1.32M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())561k ; | 583 | 1.32M | } |
bool clang::Decl::hasAttr<clang::ConstAttr>() const Line | Count | Source | 581 | 59.6M | template<typename T> bool hasAttr() const { | 582 | 59.6M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())58.8M ; | 583 | 59.6M | } |
bool clang::Decl::hasAttr<clang::WarnUnusedAttr>() const Line | Count | Source | 581 | 91.9k | template<typename T> bool hasAttr() const { | 582 | 91.9k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())28.1k ; | 583 | 91.9k | } |
bool clang::Decl::hasAttr<clang::WarnUnusedResultAttr>() const Line | Count | Source | 581 | 8.10k | template<typename T> bool hasAttr() const { | 582 | 8.10k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())578 ; | 583 | 8.10k | } |
bool clang::Decl::hasAttr<clang::AsmLabelAttr>() const Line | Count | Source | 581 | 7.00M | template<typename T> bool hasAttr() const { | 582 | 7.00M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())6.37M ; | 583 | 7.00M | } |
bool clang::Decl::hasAttr<clang::NonNullAttr>() const Line | Count | Source | 581 | 9.60M | template<typename T> bool hasAttr() const { | 582 | 9.60M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())811k ; | 583 | 9.60M | } |
bool clang::Decl::hasAttr<clang::ReturnsNonNullAttr>() const Line | Count | Source | 581 | 665k | template<typename T> bool hasAttr() const { | 582 | 665k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())289k ; | 583 | 665k | } |
bool clang::Decl::hasAttr<clang::EnableIfAttr>() const Line | Count | Source | 581 | 2.59M | template<typename T> bool hasAttr() const { | 582 | 2.59M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.33M ; | 583 | 2.59M | } |
bool clang::Decl::hasAttr<clang::EmptyBasesAttr>() const Line | Count | Source | 581 | 6.32k | template<typename T> bool hasAttr() const { | 582 | 6.32k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())955 ; | 583 | 6.32k | } |
bool clang::Decl::hasAttr<clang::NoUniqueAddressAttr>() const Line | Count | Source | 581 | 4.92M | template<typename T> bool hasAttr() const { | 582 | 4.92M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())24.6k ; | 583 | 4.92M | } |
bool clang::Decl::hasAttr<clang::AlignMac68kAttr>() const Line | Count | Source | 581 | 362k | template<typename T> bool hasAttr() const { | 582 | 362k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())87.9k ; | 583 | 362k | } |
bool clang::Decl::hasAttr<clang::AlignNaturalAttr>() const Line | Count | Source | 581 | 362k | template<typename T> bool hasAttr() const { | 582 | 362k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())87.9k ; | 583 | 362k | } |
bool clang::Decl::hasAttr<clang::CUDAHostAttr>() const Line | Count | Source | 581 | 9.97k | template<typename T> bool hasAttr() const { | 582 | 9.97k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.03k ; | 583 | 9.97k | } |
bool clang::Decl::hasAttr<clang::ObjCBoxableAttr>() const Line | Count | Source | 581 | 141 | template<typename T> bool hasAttr() const { | 582 | 141 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())135 ; | 583 | 141 | } |
bool clang::Decl::hasAttr<clang::MSInheritanceAttr>() const Line | Count | Source | 581 | 7.71k | template<typename T> bool hasAttr() const { | 582 | 7.71k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())7.18k ; | 583 | 7.71k | } |
bool clang::Decl::hasAttr<clang::ObjCNSObjectAttr>() const Line | Count | Source | 581 | 881k | template<typename T> bool hasAttr() const { | 582 | 881k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())53.3k ; | 583 | 881k | } |
bool clang::Decl::hasAttr<clang::ObjCIndependentClassAttr>() const Line | Count | Source | 581 | 7.13k | template<typename T> bool hasAttr() const { | 582 | 7.13k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1 ; | 583 | 7.13k | } |
bool clang::Decl::hasAttr<clang::CUDADeviceBuiltinSurfaceTypeAttr>() const Line | Count | Source | 581 | 3.17k | template<typename T> bool hasAttr() const { | 582 | 3.17k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())53 ; | 583 | 3.17k | } |
bool clang::Decl::hasAttr<clang::CUDADeviceBuiltinTextureTypeAttr>() const Line | Count | Source | 581 | 3.15k | template<typename T> bool hasAttr() const { | 582 | 3.15k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())27 ; | 583 | 3.15k | } |
bool clang::Decl::hasAttr<clang::CleanupAttr>() const Line | Count | Source | 581 | 38.1M | template<typename T> bool hasAttr() const { | 582 | 38.1M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.34M ; | 583 | 38.1M | } |
bool clang::Decl::hasAttr<clang::AvailabilityAttr>() const Line | Count | Source | 581 | 1.25k | template<typename T> bool hasAttr() const { | 582 | 1.25k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.12k ; | 583 | 1.25k | } |
bool clang::Decl::hasAttr<clang::IBOutletAttr>() const Line | Count | Source | 581 | 733 | template<typename T> bool hasAttr() const { | 582 | 733 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())32 ; | 583 | 733 | } |
bool clang::Decl::hasAttr<clang::ExcludeFromExplicitInstantiationAttr>() const Line | Count | Source | 581 | 320k | template<typename T> bool hasAttr() const { | 582 | 320k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())168k ; | 583 | 320k | } |
bool clang::Decl::hasAttr<clang::OwnerAttr>() const Line | Count | Source | 581 | 458k | template<typename T> bool hasAttr() const { | 582 | 458k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())105k ; | 583 | 458k | } |
bool clang::Decl::hasAttr<clang::PointerAttr>() const Line | Count | Source | 581 | 625k | template<typename T> bool hasAttr() const { | 582 | 625k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())149k ; | 583 | 625k | } |
bool clang::Decl::hasAttr<clang::CFUnknownTransferAttr>() const Line | Count | Source | 581 | 474k | template<typename T> bool hasAttr() const { | 582 | 474k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())324k ; | 583 | 474k | } |
bool clang::Decl::hasAttr<clang::SectionAttr>() const Line | Count | Source | 581 | 37.5M | template<typename T> bool hasAttr() const { | 582 | 37.5M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())332k ; | 583 | 37.5M | } |
bool clang::Decl::hasAttr<clang::MinSizeAttr>() const Line | Count | Source | 581 | 612k | template<typename T> bool hasAttr() const { | 582 | 612k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())202k ; | 583 | 612k | } |
bool clang::Decl::hasAttr<clang::OptimizeNoneAttr>() const Line | Count | Source | 581 | 1.47M | template<typename T> bool hasAttr() const { | 582 | 1.47M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())544k ; | 583 | 1.47M | } |
bool clang::Decl::hasAttr<clang::NoInlineAttr>() const Line | Count | Source | 581 | 85.1k | template<typename T> bool hasAttr() const { | 582 | 85.1k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())24.1k ; | 583 | 85.1k | } |
bool clang::Decl::hasAttr<clang::EnforceTCBAttr>() const Line | Count | Source | 581 | 2.23M | template<typename T> bool hasAttr() const { | 582 | 2.23M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.67M ; | 583 | 2.23M | } |
bool clang::Decl::hasAttr<clang::CUDAInvalidTargetAttr>() const Line | Count | Source | 581 | 172k | template<typename T> bool hasAttr() const { | 582 | 172k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())142k ; | 583 | 172k | } |
bool clang::Decl::hasAttr<clang::ObjCPreciseLifetimeAttr>() const Line | Count | Source | 581 | 32.7M | template<typename T> bool hasAttr() const { | 582 | 32.7M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.52M ; | 583 | 32.7M | } |
bool clang::Decl::hasAttr<clang::CodeSegAttr>() const Line | Count | Source | 581 | 36.5M | template<typename T> bool hasAttr() const { | 582 | 36.5M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())57.6k ; | 583 | 36.5M | } |
bool clang::Decl::hasAttr<clang::CarriesDependencyAttr>() const Line | Count | Source | 581 | 5 | template<typename T> bool hasAttr() const { | 582 | 5 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2 ; | 583 | 5 | } |
bool clang::Decl::hasAttr<clang::ErrorAttr>() const Line | Count | Source | 581 | 313k | template<typename T> bool hasAttr() const { | 582 | 313k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())163k ; | 583 | 313k | } |
bool clang::Decl::hasAttr<clang::WeakImportAttr>() const Line | Count | Source | 581 | 71.1k | template<typename T> bool hasAttr() const { | 582 | 71.1k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.25k ; | 583 | 71.1k | } |
bool clang::Decl::hasAttr<clang::SYCLSpecialClassAttr>() const Line | Count | Source | 581 | 2.78M | template<typename T> bool hasAttr() const { | 582 | 2.78M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())878k ; | 583 | 2.78M | } |
bool clang::Decl::hasAttr<clang::StrictGuardStackCheckAttr>() const Line | Count | Source | 581 | 306k | template<typename T> bool hasAttr() const { | 582 | 306k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())101k ; | 583 | 306k | } |
bool clang::Decl::hasAttr<clang::HLSLShaderAttr>() const Line | Count | Source | 581 | 313k | template<typename T> bool hasAttr() const { | 582 | 313k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())102k ; | 583 | 313k | } |
bool clang::Decl::hasAttr<clang::ArmLocallyStreamingAttr>() const Line | Count | Source | 581 | 7.26M | template<typename T> bool hasAttr() const { | 582 | 7.26M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.52M ; | 583 | 7.26M | } |
bool clang::Decl::hasAttr<clang::ArmNewZAAttr>() const Line | Count | Source | 581 | 7.26M | template<typename T> bool hasAttr() const { | 582 | 7.26M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.52M ; | 583 | 7.26M | } |
bool clang::Decl::hasAttr<clang::HLSLNumThreadsAttr>() const Line | Count | Source | 581 | 67 | template<typename T> bool hasAttr() const { | 582 | 67 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 67 | } |
bool clang::Decl::hasAttr<clang::SelectAnyAttr>() const Line | Count | Source | 581 | 464k | template<typename T> bool hasAttr() const { | 582 | 464k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())42.7k ; | 583 | 464k | } |
bool clang::Decl::hasAttr<clang::ConstInitAttr>() const Line | Count | Source | 581 | 32.3k | template<typename T> bool hasAttr() const { | 582 | 32.3k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.97k ; | 583 | 32.3k | } |
bool clang::Decl::hasAttr<clang::DLLExportStaticLocalAttr>() const Line | Count | Source | 581 | 10.0k | template<typename T> bool hasAttr() const { | 582 | 10.0k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.24k ; | 583 | 10.0k | } |
bool clang::Decl::hasAttr<clang::DLLImportStaticLocalAttr>() const Line | Count | Source | 581 | 10.0k | template<typename T> bool hasAttr() const { | 582 | 10.0k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.24k ; | 583 | 10.0k | } |
bool clang::Decl::hasAttr<clang::TypeTagForDatatypeAttr>() const Line | Count | Source | 581 | 3.09M | template<typename T> bool hasAttr() const { | 582 | 3.09M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())822k ; | 583 | 3.09M | } |
bool clang::Decl::hasAttr<clang::OMPDeclareTargetDeclAttr>() const Line | Count | Source | 581 | 317k | template<typename T> bool hasAttr() const { | 582 | 317k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())8.07k ; | 583 | 317k | } |
bool clang::Decl::hasAttr<clang::StrictFPAttr>() const Line | Count | Source | 581 | 1.03M | template<typename T> bool hasAttr() const { | 582 | 1.03M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())438k ; | 583 | 1.03M | } |
bool clang::Decl::hasAttr<clang::NakedAttr>() const Line | Count | Source | 581 | 19.0M | template<typename T> bool hasAttr() const { | 582 | 19.0M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())16.5M ; | 583 | 19.0M | } |
bool clang::Decl::hasAttr<clang::AllocSizeAttr>() const Line | Count | Source | 581 | 10.8k | template<typename T> bool hasAttr() const { | 582 | 10.8k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())10.3k ; | 583 | 10.8k | } |
bool clang::Decl::hasAttr<clang::AllocAlignAttr>() const Line | Count | Source | 581 | 5.64M | template<typename T> bool hasAttr() const { | 582 | 5.64M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.77M ; | 583 | 5.64M | } |
bool clang::Decl::hasAttr<clang::FormatAttr>() const Line | Count | Source | 581 | 36.0k | template<typename T> bool hasAttr() const { | 582 | 36.0k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())36.0k ; | 583 | 36.0k | } |
bool clang::Decl::hasAttr<clang::CallbackAttr>() const Line | Count | Source | 581 | 30.1M | template<typename T> bool hasAttr() const { | 582 | 30.1M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())30.1M ; | 583 | 30.1M | } |
bool clang::Decl::hasAttr<clang::ReturnsTwiceAttr>() const Line | Count | Source | 581 | 659k | template<typename T> bool hasAttr() const { | 582 | 659k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())281k ; | 583 | 659k | } |
bool clang::Decl::hasAttr<clang::NoThrowAttr>() const Line | Count | Source | 581 | 31.1M | template<typename T> bool hasAttr() const { | 582 | 31.1M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())30.4M ; | 583 | 31.1M | } |
bool clang::Decl::hasAttr<clang::LifetimeBoundAttr>() const Line | Count | Source | 581 | 5.86M | template<typename T> bool hasAttr() const { | 582 | 5.86M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())22.5k ; | 583 | 5.86M | } |
bool clang::Decl::hasAttr<clang::FormatArgAttr>() const Line | Count | Source | 581 | 222 | template<typename T> bool hasAttr() const { | 582 | 222 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())221 ; | 583 | 222 | } |
bool clang::Decl::hasAttr<clang::RandomizeLayoutAttr>() const Line | Count | Source | 581 | 409k | template<typename T> bool hasAttr() const { | 582 | 409k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())262k ; | 583 | 409k | } |
bool clang::Decl::hasAttr<clang::NoRandomizeLayoutAttr>() const Line | Count | Source | 581 | 407k | template<typename T> bool hasAttr() const { | 582 | 407k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())261k ; | 583 | 407k | } |
bool clang::Decl::hasAttr<clang::CountedByAttr>() const Line | Count | Source | 581 | 1.82M | template<typename T> bool hasAttr() const { | 582 | 1.82M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())1.98k ; | 583 | 1.82M | } |
bool clang::Decl::hasAttr<clang::SYCLKernelAttr>() const Line | Count | Source | 581 | 648 | template<typename T> bool hasAttr() const { | 582 | 648 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())149 ; | 583 | 648 | } |
bool clang::Decl::hasAttr<clang::NoBuiltinAttr>() const Line | Count | Source | 581 | 34 | template<typename T> bool hasAttr() const { | 582 | 34 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())8 ; | 583 | 34 | } |
bool clang::Decl::hasAttr<clang::CapabilityAttr>() const Line | Count | Source | 581 | 3.29k | template<typename T> bool hasAttr() const { | 582 | 3.29k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3.10k ; | 583 | 3.29k | } |
bool clang::Decl::hasAttr<clang::ConsumableAttr>() const Line | Count | Source | 581 | 300 | template<typename T> bool hasAttr() const { | 582 | 300 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())291 ; | 583 | 300 | } |
bool clang::Decl::hasAttr<clang::BPFPreserveAccessIndexAttr>() const Line | Count | Source | 581 | 2.19M | template<typename T> bool hasAttr() const { | 582 | 2.19M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())598k ; | 583 | 2.19M | } |
bool clang::Decl::hasAttr<clang::OverrideAttr>() const Line | Count | Source | 581 | 6.58M | template<typename T> bool hasAttr() const { | 582 | 6.58M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3.21M ; | 583 | 6.58M | } |
bool clang::Decl::hasAttr<clang::TrivialABIAttr>() const Line | Count | Source | 581 | 3.27M | template<typename T> bool hasAttr() const { | 582 | 3.27M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())363k ; | 583 | 3.27M | } |
bool clang::Decl::hasAttr<clang::ObjCExplicitProtocolImplAttr>() const Line | Count | Source | 581 | 1.42k | template<typename T> bool hasAttr() const { | 582 | 1.42k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())70 ; | 583 | 1.42k | } |
bool clang::Decl::hasAttr<clang::ObjCDirectMembersAttr>() const Line | Count | Source | 581 | 949k | template<typename T> bool hasAttr() const { | 582 | 949k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())375k ; | 583 | 949k | } |
bool clang::Decl::hasAttr<clang::NSReturnsRetainedAttr>() const Line | Count | Source | 581 | 319k | template<typename T> bool hasAttr() const { | 582 | 319k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())128k ; | 583 | 319k | } |
bool clang::Decl::hasAttr<clang::NSReturnsNotRetainedAttr>() const Line | Count | Source | 581 | 652k | template<typename T> bool hasAttr() const { | 582 | 652k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())201k ; | 583 | 652k | } |
bool clang::Decl::hasAttr<clang::NSReturnsAutoreleasedAttr>() const Line | Count | Source | 581 | 1.29k | template<typename T> bool hasAttr() const { | 582 | 1.29k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())156 ; | 583 | 1.29k | } |
bool clang::Decl::hasAttr<clang::ObjCRequiresSuperAttr>() const Line | Count | Source | 581 | 5.77k | template<typename T> bool hasAttr() const { | 582 | 5.77k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())788 ; | 583 | 5.77k | } |
bool clang::Decl::hasAttr<clang::ObjCRuntimeVisibleAttr>() const Line | Count | Source | 581 | 6.41k | template<typename T> bool hasAttr() const { | 582 | 6.41k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())619 ; | 583 | 6.41k | } |
bool clang::Decl::hasAttr<clang::ObjCRootClassAttr>() const Line | Count | Source | 581 | 4.74k | template<typename T> bool hasAttr() const { | 582 | 4.74k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())198 ; | 583 | 4.74k | } |
bool clang::Decl::hasAttr<clang::ObjCSubclassingRestrictedAttr>() const Line | Count | Source | 581 | 130k | template<typename T> bool hasAttr() const { | 582 | 130k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())81.8k ; | 583 | 130k | } |
bool clang::Decl::hasAttr<clang::ObjCClassStubAttr>() const Line | Count | Source | 581 | 84.8k | template<typename T> bool hasAttr() const { | 582 | 84.8k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())37.3k ; | 583 | 84.8k | } |
bool clang::Decl::hasAttr<clang::UnusedAttr>() const Line | Count | Source | 581 | 73.2M | template<typename T> bool hasAttr() const { | 582 | 73.2M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())37.7M ; | 583 | 73.2M | } |
bool clang::Decl::hasAttr<clang::ObjCExternallyRetainedAttr>() const Line | Count | Source | 581 | 39 | template<typename T> bool hasAttr() const { | 582 | 39 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())6 ; | 583 | 39 | } |
bool clang::Decl::hasAttr<clang::AvailableOnlyInDefaultEvalMethodAttr>() const Line | Count | Source | 581 | 175M | template<typename T> bool hasAttr() const { | 582 | 175M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())14.6M ; | 583 | 175M | } |
bool clang::Decl::hasAttr<clang::CFAuditedTransferAttr>() const Line | Count | Source | 581 | 498k | template<typename T> bool hasAttr() const { | 582 | 498k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())344k ; | 583 | 498k | } |
bool clang::Decl::hasAttr<clang::CFConsumedAttr>() const Line | Count | Source | 581 | 2.17k | template<typename T> bool hasAttr() const { | 582 | 2.17k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())106 ; | 583 | 2.17k | } |
bool clang::Decl::hasAttr<clang::AnyX86InterruptAttr>() const Line | Count | Source | 581 | 11.4M | template<typename T> bool hasAttr() const { | 582 | 11.4M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())10.0M ; | 583 | 11.4M | } |
bool clang::Decl::hasAttr<clang::ARMInterruptAttr>() const Line | Count | Source | 581 | 5.45M | template<typename T> bool hasAttr() const { | 582 | 5.45M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.84M ; | 583 | 5.45M | } |
bool clang::Decl::hasAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const Line | Count | Source | 581 | 6.10M | template<typename T> bool hasAttr() const { | 582 | 6.10M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.12M ; | 583 | 6.10M | } |
bool clang::Decl::hasAttr<clang::CFReturnsNotRetainedAttr>() const Line | Count | Source | 581 | 4.90k | template<typename T> bool hasAttr() const { | 582 | 4.90k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())192 ; | 583 | 4.90k | } |
bool clang::Decl::hasAttr<clang::CFReturnsRetainedAttr>() const Line | Count | Source | 581 | 4.93k | template<typename T> bool hasAttr() const { | 582 | 4.93k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())264 ; | 583 | 4.93k | } |
bool clang::Decl::hasAttr<clang::ObjCReturnsInnerPointerAttr>() const Line | Count | Source | 581 | 352k | template<typename T> bool hasAttr() const { | 582 | 352k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())87.0k ; | 583 | 352k | } |
bool clang::Decl::hasAttr<clang::IBOutletCollectionAttr>() const Line | Count | Source | 581 | 6.15k | template<typename T> bool hasAttr() const { | 582 | 6.15k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())713 ; | 583 | 6.15k | } |
bool clang::Decl::hasAttr<clang::OMPAllocateDeclAttr>() const Line | Count | Source | 581 | 235k | template<typename T> bool hasAttr() const { | 582 | 235k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())37.3k ; | 583 | 235k | } |
bool clang::Decl::hasAttr<clang::OMPCaptureNoInitAttr>() const Line | Count | Source | 581 | 9.73k | template<typename T> bool hasAttr() const { | 582 | 9.73k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())520 ; | 583 | 9.73k | } |
bool clang::Decl::hasAttr<clang::OMPDeclareVariantAttr>() const Line | Count | Source | 581 | 226k | template<typename T> bool hasAttr() const { | 582 | 226k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())11.3k ; | 583 | 226k | } |
bool clang::Decl::hasAttr<clang::CmseNSEntryAttr>() const Line | Count | Source | 581 | 5.77M | template<typename T> bool hasAttr() const { | 582 | 5.77M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.06M ; | 583 | 5.77M | } |
bool clang::Decl::hasAttr<clang::FlattenAttr>() const Line | Count | Source | 581 | 325k | template<typename T> bool hasAttr() const { | 582 | 325k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())110k ; | 583 | 325k | } |
bool clang::Decl::hasAttr<clang::UsingIfExistsAttr>() const Line | Count | Source | 581 | 2.16k | template<typename T> bool hasAttr() const { | 582 | 2.16k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())28 ; | 583 | 2.16k | } |
bool clang::Decl::hasAttr<clang::OpenCLAccessAttr>() const Line | Count | Source | 581 | 8.71k | template<typename T> bool hasAttr() const { | 582 | 8.71k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())27 ; | 583 | 8.71k | } |
bool clang::Decl::hasAttr<clang::PassObjectSizeAttr>() const Line | Count | Source | 581 | 96.5M | template<typename T> bool hasAttr() const { | 582 | 96.5M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())62.5k ; | 583 | 96.5M | } |
bool clang::Decl::hasAttr<clang::NoEscapeAttr>() const Line | Count | Source | 581 | 94.5M | template<typename T> bool hasAttr() const { | 582 | 94.5M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())66.5k ; | 583 | 94.5M | } |
bool clang::Decl::hasAttr<clang::CalledOnceAttr>() const Line | Count | Source | 581 | 6.14k | template<typename T> bool hasAttr() const { | 582 | 6.14k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())234 ; | 583 | 6.14k | } |
bool clang::Decl::hasAttr<clang::ConsumableSetOnReadAttr>() const Line | Count | Source | 581 | 19 | template<typename T> bool hasAttr() const { | 582 | 19 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 19 | } |
bool clang::Decl::hasAttr<clang::TestTypestateAttr>() const Line | Count | Source | 581 | 231 | template<typename T> bool hasAttr() const { | 582 | 231 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())218 ; | 583 | 231 | } |
bool clang::Decl::hasAttr<clang::ConsumableAutoCastAttr>() const Line | Count | Source | 581 | 4 | template<typename T> bool hasAttr() const { | 582 | 4 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 4 | } |
bool clang::Decl::hasAttr<clang::NoThreadSafetyAnalysisAttr>() const Line | Count | Source | 581 | 8.51k | template<typename T> bool hasAttr() const { | 582 | 8.51k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5.07k ; | 583 | 8.51k | } |
bool clang::Decl::hasAttr<clang::PtGuardedVarAttr>() const Line | Count | Source | 581 | 466 | template<typename T> bool hasAttr() const { | 582 | 466 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 466 | } |
bool clang::Decl::hasAttr<clang::GuardedVarAttr>() const Line | Count | Source | 581 | 2.75k | template<typename T> bool hasAttr() const { | 582 | 2.75k | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 2.75k | } |
bool clang::Decl::hasAttr<clang::ScopedLockableAttr>() const Line | Count | Source | 581 | 554 | template<typename T> bool hasAttr() const { | 582 | 554 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())494 ; | 583 | 554 | } |
bool clang::Decl::hasAttr<clang::AnalyzerNoReturnAttr>() const Line | Count | Source | 581 | 111k | template<typename T> bool hasAttr() const { | 582 | 111k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())12.6k ; | 583 | 111k | } |
bool clang::Decl::hasAttr<clang::UnsafeBufferUsageAttr>() const Line | Count | Source | 581 | 17 | template<typename T> bool hasAttr() const { | 582 | 17 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())0 ; | 583 | 17 | } |
bool clang::Decl::hasAttr<clang::ObjCExceptionAttr>() const Line | Count | Source | 581 | 1.74k | template<typename T> bool hasAttr() const { | 582 | 1.74k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())503 ; | 583 | 1.74k | } |
bool clang::Decl::hasAttr<clang::AcquireHandleAttr>() const Line | Count | Source | 581 | 526 | template<typename T> bool hasAttr() const { | 582 | 526 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())198 ; | 583 | 526 | } |
bool clang::Decl::hasAttr<clang::ReleaseHandleAttr>() const Line | Count | Source | 581 | 450 | template<typename T> bool hasAttr() const { | 582 | 450 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())379 ; | 583 | 450 | } |
bool clang::Decl::hasAttr<clang::UseHandleAttr>() const Line | Count | Source | 581 | 169 | template<typename T> bool hasAttr() const { | 582 | 169 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())136 ; | 583 | 169 | } |
bool clang::Decl::hasAttr<clang::OwnershipAttr>() const Line | Count | Source | 581 | 8 | template<typename T> bool hasAttr() const { | 582 | 8 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 8 | } |
bool clang::Decl::hasAttr<clang::MIGServerRoutineAttr>() const Line | Count | Source | 581 | 144 | template<typename T> bool hasAttr() const { | 582 | 144 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())52 ; | 583 | 144 | } |
bool clang::Decl::hasAttr<clang::ReinitializesAttr>() const Line | Count | Source | 581 | 8.23k | template<typename T> bool hasAttr() const { | 582 | 8.23k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())8 ; | 583 | 8.23k | } |
bool clang::Decl::hasAttr<clang::OSConsumedAttr>() const Line | Count | Source | 581 | 223 | template<typename T> bool hasAttr() const { | 582 | 223 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())25 ; | 583 | 223 | } |
bool clang::Decl::hasAttr<clang::OSReturnsNotRetainedAttr>() const Line | Count | Source | 581 | 487 | template<typename T> bool hasAttr() const { | 582 | 487 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())14 ; | 583 | 487 | } |
bool clang::Decl::hasAttr<clang::OSReturnsRetainedAttr>() const Line | Count | Source | 581 | 453 | template<typename T> bool hasAttr() const { | 582 | 453 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())28 ; | 583 | 453 | } |
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedReturnsRetainedAttr>() const Line | Count | Source | 581 | 4.52k | template<typename T> bool hasAttr() const { | 582 | 4.52k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())128 ; | 583 | 4.52k | } |
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedReturnsNotRetainedAttr>() const Line | Count | Source | 581 | 4.49k | template<typename T> bool hasAttr() const { | 582 | 4.49k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())100 ; | 583 | 4.49k | } |
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedConsumedAttr>() const Line | Count | Source | 581 | 2.08k | template<typename T> bool hasAttr() const { | 582 | 2.08k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())50 ; | 583 | 2.08k | } |
bool clang::Decl::hasAttr<clang::OSReturnsRetainedOnZeroAttr>() const Line | Count | Source | 581 | 161 | template<typename T> bool hasAttr() const { | 582 | 161 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())17 ; | 583 | 161 | } |
bool clang::Decl::hasAttr<clang::OSReturnsRetainedOnNonZeroAttr>() const Line | Count | Source | 581 | 162 | template<typename T> bool hasAttr() const { | 582 | 162 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())18 ; | 583 | 162 | } |
bool clang::Decl::hasAttr<clang::OSConsumesThisAttr>() const Line | Count | Source | 581 | 264 | template<typename T> bool hasAttr() const { | 582 | 264 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())10 ; | 583 | 264 | } |
bool clang::Decl::hasAttr<clang::StdCallAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::FastCallAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::RegCallAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::ThisCallAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::VectorCallAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::PascalAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::AArch64VectorPcsAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::AArch64SVEPcsAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::AMDGPUKernelCallAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::IntelOclBiccAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::MSABIAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::SysVABIAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::PreserveMostAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::PreserveAllAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::M68kRTDAttr>() const Line | Count | Source | 581 | 20.4k | template<typename T> bool hasAttr() const { | 582 | 20.4k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4.03k ; | 583 | 20.4k | } |
bool clang::Decl::hasAttr<clang::DisableTailCallsAttr>() const Line | Count | Source | 581 | 341k | template<typename T> bool hasAttr() const { | 582 | 341k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())114k ; | 583 | 341k | } |
bool clang::Decl::hasAttr<clang::MaybeUndefAttr>() const Line | Count | Source | 581 | 271k | template<typename T> bool hasAttr() const { | 582 | 271k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.66k ; | 583 | 271k | } |
bool clang::Decl::hasAttr<clang::ConvergentAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::NoMergeAttr>() const Line | Count | Source | 581 | 313k | template<typename T> bool hasAttr() const { | 582 | 313k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())163k ; | 583 | 313k | } |
bool clang::Decl::hasAttr<clang::NoAliasAttr>() const Line | Count | Source | 581 | 651k | template<typename T> bool hasAttr() const { | 582 | 651k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())275k ; | 583 | 651k | } |
bool clang::Decl::hasAttr<clang::RestrictAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::AnyX86NoCfCheckAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::LeafAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::NoSpeculativeLoadHardeningAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::SpeculativeLoadHardeningAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::NoSplitStackAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::ZeroCallUsedRegsAttr>() const Line | Count | Source | 581 | 654k | template<typename T> bool hasAttr() const { | 582 | 654k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())278k ; | 583 | 654k | } |
bool clang::Decl::hasAttr<clang::NotTailCalledAttr>() const Line | Count | Source | 581 | 286k | template<typename T> bool hasAttr() const { | 582 | 286k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())145k ; | 583 | 286k | } |
bool clang::Decl::hasAttr<clang::MSAllocatorAttr>() const Line | Count | Source | 581 | 204k | template<typename T> bool hasAttr() const { | 582 | 204k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())125k ; | 583 | 204k | } |
bool clang::Decl::hasAttr<clang::CoroOnlyDestroyWhenCompleteAttr>() const Line | Count | Source | 581 | 72 | template<typename T> bool hasAttr() const { | 582 | 72 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())5 ; | 583 | 72 | } |
bool clang::Decl::hasAttr<clang::StandaloneDebugAttr>() const Line | Count | Source | 581 | 5.32k | template<typename T> bool hasAttr() const { | 582 | 5.32k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())650 ; | 583 | 5.32k | } |
bool clang::Decl::hasAttr<clang::NoDebugAttr>() const Line | Count | Source | 581 | 1.10M | template<typename T> bool hasAttr() const { | 582 | 1.10M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())405k ; | 583 | 1.10M | } |
bool clang::Decl::hasAttr<clang::PreferredTypeAttr>() const Line | Count | Source | 581 | 5.38k | template<typename T> bool hasAttr() const { | 582 | 5.38k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2 ; | 583 | 5.38k | } |
bool clang::Decl::hasAttr<clang::BTFDeclTagAttr>() const Line | Count | Source | 581 | 651k | template<typename T> bool hasAttr() const { | 582 | 651k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())121k ; | 583 | 651k | } |
bool clang::Decl::hasAttr<clang::ArtificialAttr>() const Line | Count | Source | 581 | 87.2k | template<typename T> bool hasAttr() const { | 582 | 87.2k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())67.9k ; | 583 | 87.2k | } |
bool clang::Decl::hasAttr<clang::HLSLSV_GroupIndexAttr>() const Line | Count | Source | 581 | 8 | template<typename T> bool hasAttr() const { | 582 | 8 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 8 | } |
bool clang::Decl::hasAttr<clang::HLSLSV_DispatchThreadIDAttr>() const Line | Count | Source | 581 | 2 | template<typename T> bool hasAttr() const { | 582 | 2 | return hasAttrs() && hasSpecificAttr<T>(getAttrs()); | 583 | 2 | } |
bool clang::Decl::hasAttr<clang::ObjCNonLazyClassAttr>() const Line | Count | Source | 581 | 1.88k | template<typename T> bool hasAttr() const { | 582 | 1.88k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())67 ; | 583 | 1.88k | } |
bool clang::Decl::hasAttr<clang::LTOVisibilityPublicAttr>() const Line | Count | Source | 581 | 545 | template<typename T> bool hasAttr() const { | 582 | 545 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())100 ; | 583 | 545 | } |
bool clang::Decl::hasAttr<clang::UuidAttr>() const Line | Count | Source | 581 | 519 | template<typename T> bool hasAttr() const { | 582 | 519 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())74 ; | 583 | 519 | } |
bool clang::Decl::hasAttr<clang::NoInstrumentFunctionAttr>() const Line | Count | Source | 581 | 191 | template<typename T> bool hasAttr() const { | 582 | 191 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())52 ; | 583 | 191 | } |
bool clang::Decl::hasAttr<clang::DisableSanitizerInstrumentationAttr>() const Line | Count | Source | 581 | 306k | template<typename T> bool hasAttr() const { | 582 | 306k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())100k ; | 583 | 306k | } |
bool clang::Decl::hasAttr<clang::CFICanonicalJumpTableAttr>() const Line | Count | Source | 581 | 313k | template<typename T> bool hasAttr() const { | 582 | 313k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())102k ; | 583 | 313k | } |
bool clang::Decl::hasAttr<clang::NoProfileFunctionAttr>() const Line | Count | Source | 581 | 313k | template<typename T> bool hasAttr() const { | 582 | 313k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())102k ; | 583 | 313k | } |
bool clang::Decl::hasAttr<clang::NoCommonAttr>() const Line | Count | Source | 581 | 46 | template<typename T> bool hasAttr() const { | 582 | 46 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())4 ; | 583 | 46 | } |
bool clang::Decl::hasAttr<clang::CommonAttr>() const Line | Count | Source | 581 | 6.55k | template<typename T> bool hasAttr() const { | 582 | 6.55k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())253 ; | 583 | 6.55k | } |
bool clang::Decl::hasAttr<clang::PragmaClangBSSSectionAttr>() const Line | Count | Source | 581 | 21 | template<typename T> bool hasAttr() const { | 582 | 21 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3 ; | 583 | 21 | } |
bool clang::Decl::hasAttr<clang::PragmaClangDataSectionAttr>() const Line | Count | Source | 581 | 21 | template<typename T> bool hasAttr() const { | 582 | 21 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3 ; | 583 | 21 | } |
bool clang::Decl::hasAttr<clang::PragmaClangRelroSectionAttr>() const Line | Count | Source | 581 | 21 | template<typename T> bool hasAttr() const { | 582 | 21 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3 ; | 583 | 21 | } |
bool clang::Decl::hasAttr<clang::PragmaClangRodataSectionAttr>() const Line | Count | Source | 581 | 21 | template<typename T> bool hasAttr() const { | 582 | 21 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())3 ; | 583 | 21 | } |
bool clang::Decl::hasAttr<clang::NoUwtableAttr>() const Line | Count | Source | 581 | 306k | template<typename T> bool hasAttr() const { | 582 | 306k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())101k ; | 583 | 306k | } |
bool clang::Decl::hasAttr<clang::NoStackProtectorAttr>() const Line | Count | Source | 581 | 306k | template<typename T> bool hasAttr() const { | 582 | 306k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())101k ; | 583 | 306k | } |
bool clang::Decl::hasAttr<clang::NoDuplicateAttr>() const Line | Count | Source | 581 | 738k | template<typename T> bool hasAttr() const { | 582 | 738k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())301k ; | 583 | 738k | } |
bool clang::Decl::hasAttr<clang::ColdAttr>() const Line | Count | Source | 581 | 960k | template<typename T> bool hasAttr() const { | 582 | 960k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())379k ; | 583 | 960k | } |
bool clang::Decl::hasAttr<clang::HotAttr>() const Line | Count | Source | 581 | 960k | template<typename T> bool hasAttr() const { | 582 | 960k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())379k ; | 583 | 960k | } |
bool clang::Decl::hasAttr<clang::RetainAttr>() const Line | Count | Source | 581 | 341k | template<typename T> bool hasAttr() const { | 582 | 341k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())104k ; | 583 | 341k | } |
bool clang::Decl::hasAttr<clang::OMPDeclareSimdDeclAttr>() const Line | Count | Source | 581 | 39.3k | template<typename T> bool hasAttr() const { | 582 | 39.3k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())2.63k ; | 583 | 39.3k | } |
bool clang::Decl::hasAttr<clang::AnnotateAttr>() const Line | Count | Source | 581 | 1.23M | template<typename T> bool hasAttr() const { | 582 | 1.23M | return hasAttrs() && hasSpecificAttr<T>(getAttrs())108k ; | 583 | 1.23M | } |
bool clang::Decl::hasAttr<clang::MayAliasAttr>() const Line | Count | Source | 581 | 468k | template<typename T> bool hasAttr() const { | 582 | 468k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())92.0k ; | 583 | 468k | } |
bool clang::Decl::hasAttr<clang::MSNoVTableAttr>() const Line | Count | Source | 581 | 907 | template<typename T> bool hasAttr() const { | 582 | 907 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())200 ; | 583 | 907 | } |
bool clang::Decl::hasAttr<clang::MipsLongCallAttr>() const Line | Count | Source | 581 | 777 | template<typename T> bool hasAttr() const { | 582 | 777 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())147 ; | 583 | 777 | } |
bool clang::Decl::hasAttr<clang::MipsShortCallAttr>() const Line | Count | Source | 581 | 771 | template<typename T> bool hasAttr() const { | 582 | 771 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())141 ; | 583 | 771 | } |
bool clang::Decl::hasAttr<clang::Mips16Attr>() const Line | Count | Source | 581 | 365 | template<typename T> bool hasAttr() const { | 582 | 365 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())66 ; | 583 | 365 | } |
bool clang::Decl::hasAttr<clang::NoMips16Attr>() const Line | Count | Source | 581 | 364 | template<typename T> bool hasAttr() const { | 582 | 364 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())65 ; | 583 | 364 | } |
bool clang::Decl::hasAttr<clang::MicroMipsAttr>() const Line | Count | Source | 581 | 365 | template<typename T> bool hasAttr() const { | 582 | 365 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())66 ; | 583 | 365 | } |
bool clang::Decl::hasAttr<clang::NoMicroMipsAttr>() const Line | Count | Source | 581 | 364 | template<typename T> bool hasAttr() const { | 582 | 364 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())65 ; | 583 | 364 | } |
bool clang::Decl::hasAttr<clang::NVPTXKernelAttr>() const Line | Count | Source | 581 | 624 | template<typename T> bool hasAttr() const { | 582 | 624 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())429 ; | 583 | 624 | } |
bool clang::Decl::hasAttr<clang::X86ForceAlignArgPointerAttr>() const Line | Count | Source | 581 | 182k | template<typename T> bool hasAttr() const { | 582 | 182k | return hasAttrs() && hasSpecificAttr<T>(getAttrs())87.8k ; | 583 | 182k | } |
bool clang::Decl::hasAttr<clang::IBActionAttr>() const Line | Count | Source | 581 | 401 | template<typename T> bool hasAttr() const { | 582 | 401 | return hasAttrs() && hasSpecificAttr<T>(getAttrs())26 ; | 583 | 401 | } |
|
584 | | |
585 | | /// getMaxAlignment - return the maximum alignment specified by attributes |
586 | | /// on this decl, 0 if there are none. |
587 | | unsigned getMaxAlignment() const; |
588 | | |
589 | | /// setInvalidDecl - Indicates the Decl had a semantic error. This |
590 | | /// allows for graceful error recovery. |
591 | | void setInvalidDecl(bool Invalid = true); |
592 | 1.35G | bool isInvalidDecl() const { return (bool) InvalidDecl; } |
593 | | |
594 | | /// isImplicit - Indicates whether the declaration was implicitly |
595 | | /// generated by the implementation. If false, this declaration |
596 | | /// was written explicitly in the source code. |
597 | 114M | bool isImplicit() const { return Implicit; } |
598 | 24.1M | void setImplicit(bool I = true) { Implicit = I; } |
599 | | |
600 | | /// Whether *any* (re-)declaration of the entity was used, meaning that |
601 | | /// a definition is required. |
602 | | /// |
603 | | /// \param CheckUsedAttr When true, also consider the "used" attribute |
604 | | /// (in addition to the "used" bit set by \c setUsed()) when determining |
605 | | /// whether the function is used. |
606 | | bool isUsed(bool CheckUsedAttr = true) const; |
607 | | |
608 | | /// Set whether the declaration is used, in the sense of odr-use. |
609 | | /// |
610 | | /// This should only be used immediately after creating a declaration. |
611 | | /// It intentionally doesn't notify any listeners. |
612 | 12.9M | void setIsUsed() { getCanonicalDecl()->Used = true; } |
613 | | |
614 | | /// Mark the declaration used, in the sense of odr-use. |
615 | | /// |
616 | | /// This notifies any mutation listeners in addition to setting a bit |
617 | | /// indicating the declaration is used. |
618 | | void markUsed(ASTContext &C); |
619 | | |
620 | | /// Whether any declaration of this entity was referenced. |
621 | | bool isReferenced() const; |
622 | | |
623 | | /// Whether this declaration was referenced. This should not be relied |
624 | | /// upon for anything other than debugging. |
625 | 31.1k | bool isThisDeclarationReferenced() const { return Referenced; } |
626 | | |
627 | 175M | void setReferenced(bool R = true) { Referenced = R; } |
628 | | |
629 | | /// Whether this declaration is a top-level declaration (function, |
630 | | /// global variable, etc.) that is lexically inside an objc container |
631 | | /// definition. |
632 | 2.38M | bool isTopLevelDeclInObjCContainer() const { |
633 | 2.38M | return TopLevelDeclInObjCContainer; |
634 | 2.38M | } |
635 | | |
636 | 2.99M | void setTopLevelDeclInObjCContainer(bool V = true) { |
637 | 2.99M | TopLevelDeclInObjCContainer = V; |
638 | 2.99M | } |
639 | | |
640 | | /// Looks on this and related declarations for an applicable |
641 | | /// external source symbol attribute. |
642 | | ExternalSourceSymbolAttr *getExternalSourceSymbolAttr() const; |
643 | | |
644 | | /// Whether this declaration was marked as being private to the |
645 | | /// module in which it was defined. |
646 | 958k | bool isModulePrivate() const { |
647 | 958k | return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate; |
648 | 958k | } |
649 | | |
650 | | /// Whether this declaration was exported in a lexical context. |
651 | | /// e.g.: |
652 | | /// |
653 | | /// export namespace A { |
654 | | /// void f1(); // isInExportDeclContext() == true |
655 | | /// } |
656 | | /// void A::f1(); // isInExportDeclContext() == false |
657 | | /// |
658 | | /// namespace B { |
659 | | /// void f2(); // isInExportDeclContext() == false |
660 | | /// } |
661 | | /// export void B::f2(); // isInExportDeclContext() == true |
662 | | bool isInExportDeclContext() const; |
663 | | |
664 | 537k | bool isInvisibleOutsideTheOwningModule() const { |
665 | 537k | return getModuleOwnershipKind() > ModuleOwnershipKind::VisibleWhenImported; |
666 | 537k | } |
667 | | |
668 | | /// Whether this declaration comes from another module unit. |
669 | | bool isInAnotherModuleUnit() const; |
670 | | |
671 | | /// FIXME: Implement discarding declarations actually in global module |
672 | | /// fragment. See [module.global.frag]p3,4 for details. |
673 | 0 | bool isDiscardedInGlobalModuleFragment() const { return false; } |
674 | | |
675 | | /// Return true if this declaration has an attribute which acts as |
676 | | /// definition of the entity, such as 'alias' or 'ifunc'. |
677 | | bool hasDefiningAttr() const; |
678 | | |
679 | | /// Return this declaration's defining attribute if it has one. |
680 | | const Attr *getDefiningAttr() const; |
681 | | |
682 | | protected: |
683 | | /// Specify that this declaration was marked as being private |
684 | | /// to the module in which it was defined. |
685 | 44 | void setModulePrivate() { |
686 | | // The module-private specifier has no effect on unowned declarations. |
687 | | // FIXME: We should track this in some way for source fidelity. |
688 | 44 | if (getModuleOwnershipKind() == ModuleOwnershipKind::Unowned) |
689 | 24 | return; |
690 | 20 | setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate); |
691 | 20 | } |
692 | | |
693 | | public: |
694 | | /// Set the FromASTFile flag. This indicates that this declaration |
695 | | /// was deserialized and not parsed from source code and enables |
696 | | /// features such as module ownership information. |
697 | 443 | void setFromASTFile() { |
698 | 443 | FromASTFile = true; |
699 | 443 | } |
700 | | |
701 | | /// Set the owning module ID. This may only be called for |
702 | | /// deserialized Decls. |
703 | 2.48M | void setOwningModuleID(unsigned ID) { |
704 | 2.48M | assert(isFromASTFile() && "Only works on a deserialized declaration"); |
705 | 2.48M | *((unsigned*)this - 2) = ID; |
706 | 2.48M | } |
707 | | |
708 | | public: |
709 | | /// Determine the availability of the given declaration. |
710 | | /// |
711 | | /// This routine will determine the most restrictive availability of |
712 | | /// the given declaration (e.g., preferring 'unavailable' to |
713 | | /// 'deprecated'). |
714 | | /// |
715 | | /// \param Message If non-NULL and the result is not \c |
716 | | /// AR_Available, will be set to a (possibly empty) message |
717 | | /// describing why the declaration has not been introduced, is |
718 | | /// deprecated, or is unavailable. |
719 | | /// |
720 | | /// \param EnclosingVersion The version to compare with. If empty, assume the |
721 | | /// deployment target version. |
722 | | /// |
723 | | /// \param RealizedPlatform If non-NULL and the availability result is found |
724 | | /// in an available attribute it will set to the platform which is written in |
725 | | /// the available attribute. |
726 | | AvailabilityResult |
727 | | getAvailability(std::string *Message = nullptr, |
728 | | VersionTuple EnclosingVersion = VersionTuple(), |
729 | | StringRef *RealizedPlatform = nullptr) const; |
730 | | |
731 | | /// Retrieve the version of the target platform in which this |
732 | | /// declaration was introduced. |
733 | | /// |
734 | | /// \returns An empty version tuple if this declaration has no 'introduced' |
735 | | /// availability attributes, or the version tuple that's specified in the |
736 | | /// attribute otherwise. |
737 | | VersionTuple getVersionIntroduced() const; |
738 | | |
739 | | /// Determine whether this declaration is marked 'deprecated'. |
740 | | /// |
741 | | /// \param Message If non-NULL and the declaration is deprecated, |
742 | | /// this will be set to the message describing why the declaration |
743 | | /// was deprecated (which may be empty). |
744 | 1.44M | bool isDeprecated(std::string *Message = nullptr) const { |
745 | 1.44M | return getAvailability(Message) == AR_Deprecated; |
746 | 1.44M | } |
747 | | |
748 | | /// Determine whether this declaration is marked 'unavailable'. |
749 | | /// |
750 | | /// \param Message If non-NULL and the declaration is unavailable, |
751 | | /// this will be set to the message describing why the declaration |
752 | | /// was made unavailable (which may be empty). |
753 | 1.19M | bool isUnavailable(std::string *Message = nullptr) const { |
754 | 1.19M | return getAvailability(Message) == AR_Unavailable; |
755 | 1.19M | } |
756 | | |
757 | | /// Determine whether this is a weak-imported symbol. |
758 | | /// |
759 | | /// Weak-imported symbols are typically marked with the |
760 | | /// 'weak_import' attribute, but may also be marked with an |
761 | | /// 'availability' attribute where we're targing a platform prior to |
762 | | /// the introduction of this feature. |
763 | | bool isWeakImported() const; |
764 | | |
765 | | /// Determines whether this symbol can be weak-imported, |
766 | | /// e.g., whether it would be well-formed to add the weak_import |
767 | | /// attribute. |
768 | | /// |
769 | | /// \param IsDefinition Set to \c true to indicate that this |
770 | | /// declaration cannot be weak-imported because it has a definition. |
771 | | bool canBeWeakImported(bool &IsDefinition) const; |
772 | | |
773 | | /// Determine whether this declaration came from an AST file (such as |
774 | | /// a precompiled header or module) rather than having been parsed. |
775 | 534M | bool isFromASTFile() const { return FromASTFile; } |
776 | | |
777 | | /// Retrieve the global declaration ID associated with this |
778 | | /// declaration, which specifies where this Decl was loaded from. |
779 | 1.40M | unsigned getGlobalID() const { |
780 | 1.40M | if (isFromASTFile()) |
781 | 1.40M | return *((const unsigned*)this - 1); |
782 | 0 | return 0; |
783 | 1.40M | } |
784 | | |
785 | | /// Retrieve the global ID of the module that owns this particular |
786 | | /// declaration. |
787 | 50.2M | unsigned getOwningModuleID() const { |
788 | 50.2M | if (isFromASTFile()) |
789 | 50.1M | return *((const unsigned*)this - 2); |
790 | 59.1k | return 0; |
791 | 50.2M | } |
792 | | |
793 | | private: |
794 | | Module *getOwningModuleSlow() const; |
795 | | |
796 | | protected: |
797 | | bool hasLocalOwningModuleStorage() const; |
798 | | |
799 | | public: |
800 | | /// Get the imported owning module, if this decl is from an imported |
801 | | /// (non-local) module. |
802 | 1.50M | Module *getImportedOwningModule() const { |
803 | 1.50M | if (!isFromASTFile() || !hasOwningModule()1.48M ) |
804 | 508k | return nullptr; |
805 | | |
806 | 994k | return getOwningModuleSlow(); |
807 | 1.50M | } |
808 | | |
809 | | /// Get the local owning module, if known. Returns nullptr if owner is |
810 | | /// not yet known or declaration is not from a module. |
811 | 68.7M | Module *getLocalOwningModule() const { |
812 | 68.7M | if (isFromASTFile() || !hasOwningModule()) |
813 | 65.4M | return nullptr; |
814 | | |
815 | 3.21M | assert(hasLocalOwningModuleStorage() && |
816 | 3.21M | "owned local decl but no local module storage"); |
817 | 3.21M | return reinterpret_cast<Module *const *>(this)[-1]; |
818 | 3.21M | } |
819 | 84.5k | void setLocalOwningModule(Module *M) { |
820 | 84.5k | assert(!isFromASTFile() && hasOwningModule() && |
821 | 84.5k | hasLocalOwningModuleStorage() && |
822 | 84.5k | "should not have a cached owning module"); |
823 | 84.5k | reinterpret_cast<Module **>(this)[-1] = M; |
824 | 84.5k | } |
825 | | |
826 | | /// Is this declaration owned by some module? |
827 | 70.9M | bool hasOwningModule() const { |
828 | 70.9M | return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned; |
829 | 70.9M | } |
830 | | |
831 | | /// Get the module that owns this declaration (for visibility purposes). |
832 | 69.6M | Module *getOwningModule() const { |
833 | 69.6M | return isFromASTFile() ? getImportedOwningModule()925k : getLocalOwningModule()68.7M ; |
834 | 69.6M | } |
835 | | |
836 | | /// Get the module that owns this declaration for linkage purposes. |
837 | | /// There only ever is such a standard C++ module. |
838 | | /// |
839 | | /// \param IgnoreLinkage Ignore the linkage of the entity; assume that |
840 | | /// all declarations in a global module fragment are unowned. |
841 | | Module *getOwningModuleForLinkage(bool IgnoreLinkage = false) const; |
842 | | |
843 | | /// Determine whether this declaration is definitely visible to name lookup, |
844 | | /// independent of whether the owning module is visible. |
845 | | /// Note: The declaration may be visible even if this returns \c false if the |
846 | | /// owning module is visible within the query context. This is a low-level |
847 | | /// helper function; most code should be calling Sema::isVisible() instead. |
848 | 558M | bool isUnconditionallyVisible() const { |
849 | 558M | return (int)getModuleOwnershipKind() <= (int)ModuleOwnershipKind::Visible; |
850 | 558M | } |
851 | | |
852 | 0 | bool isReachable() const { |
853 | 0 | return (int)getModuleOwnershipKind() <= |
854 | 0 | (int)ModuleOwnershipKind::ReachableWhenImported; |
855 | 0 | } |
856 | | |
857 | | /// Set that this declaration is globally visible, even if it came from a |
858 | | /// module that is not visible. |
859 | 3.07M | void setVisibleDespiteOwningModule() { |
860 | 3.07M | if (!isUnconditionallyVisible()) |
861 | 2.21M | setModuleOwnershipKind(ModuleOwnershipKind::Visible); |
862 | 3.07M | } |
863 | | |
864 | | /// Get the kind of module ownership for this declaration. |
865 | 824M | ModuleOwnershipKind getModuleOwnershipKind() const { |
866 | 824M | return NextInContextAndBits.getInt(); |
867 | 824M | } |
868 | | |
869 | | /// Set whether this declaration is hidden from name lookup. |
870 | 5.40M | void setModuleOwnershipKind(ModuleOwnershipKind MOK) { |
871 | 5.40M | assert(!(getModuleOwnershipKind() == ModuleOwnershipKind::Unowned && |
872 | 5.40M | MOK != ModuleOwnershipKind::Unowned && !isFromASTFile() && |
873 | 5.40M | !hasLocalOwningModuleStorage()) && |
874 | 5.40M | "no storage available for owning module for this declaration"); |
875 | 5.40M | NextInContextAndBits.setInt(MOK); |
876 | 5.40M | } |
877 | | |
878 | 531M | unsigned getIdentifierNamespace() const { |
879 | 531M | return IdentifierNamespace; |
880 | 531M | } |
881 | | |
882 | 457M | bool isInIdentifierNamespace(unsigned NS) const { |
883 | 457M | return getIdentifierNamespace() & NS; |
884 | 457M | } |
885 | | |
886 | | static unsigned getIdentifierNamespaceForKind(Kind DK); |
887 | | |
888 | 11.9k | bool hasTagIdentifierNamespace() const { |
889 | 11.9k | return isTagIdentifierNamespace(getIdentifierNamespace()); |
890 | 11.9k | } |
891 | | |
892 | 11.9k | static bool isTagIdentifierNamespace(unsigned NS) { |
893 | | // TagDecls have Tag and Type set and may also have TagFriend. |
894 | 11.9k | return (NS & ~IDNS_TagFriend) == (IDNS_Tag | IDNS_Type); |
895 | 11.9k | } |
896 | | |
897 | | /// getLexicalDeclContext - The declaration context where this Decl was |
898 | | /// lexically declared (LexicalDC). May be different from |
899 | | /// getDeclContext() (SemanticDC). |
900 | | /// e.g.: |
901 | | /// |
902 | | /// namespace A { |
903 | | /// void f(); // SemanticDC == LexicalDC == 'namespace A' |
904 | | /// } |
905 | | /// void A::f(); // SemanticDC == namespace 'A' |
906 | | /// // LexicalDC == global namespace |
907 | 575M | DeclContext *getLexicalDeclContext() { |
908 | 575M | if (isInSemaDC()) |
909 | 551M | return getSemanticDC(); |
910 | 23.8M | return getMultipleDC()->LexicalDC; |
911 | 575M | } |
912 | 304M | const DeclContext *getLexicalDeclContext() const { |
913 | 304M | return const_cast<Decl*>(this)->getLexicalDeclContext(); |
914 | 304M | } |
915 | | |
916 | | /// Determine whether this declaration is declared out of line (outside its |
917 | | /// semantic context). |
918 | | virtual bool isOutOfLine() const; |
919 | | |
920 | | /// setDeclContext - Set both the semantic and lexical DeclContext |
921 | | /// to DC. |
922 | | void setDeclContext(DeclContext *DC); |
923 | | |
924 | | void setLexicalDeclContext(DeclContext *DC); |
925 | | |
926 | | /// Determine whether this declaration is a templated entity (whether it is |
927 | | // within the scope of a template parameter). |
928 | | bool isTemplated() const; |
929 | | |
930 | | /// Determine the number of levels of template parameter surrounding this |
931 | | /// declaration. |
932 | | unsigned getTemplateDepth() const; |
933 | | |
934 | | /// isDefinedOutsideFunctionOrMethod - This predicate returns true if this |
935 | | /// scoped decl is defined outside the current function or method. This is |
936 | | /// roughly global variables and functions, but also handles enums (which |
937 | | /// could be defined inside or outside a function etc). |
938 | 1.92M | bool isDefinedOutsideFunctionOrMethod() const { |
939 | 1.92M | return getParentFunctionOrMethod() == nullptr; |
940 | 1.92M | } |
941 | | |
942 | | /// Determine whether a substitution into this declaration would occur as |
943 | | /// part of a substitution into a dependent local scope. Such a substitution |
944 | | /// transitively substitutes into all constructs nested within this |
945 | | /// declaration. |
946 | | /// |
947 | | /// This recognizes non-defining declarations as well as members of local |
948 | | /// classes and lambdas: |
949 | | /// \code |
950 | | /// template<typename T> void foo() { void bar(); } |
951 | | /// template<typename T> void foo2() { class ABC { void bar(); }; } |
952 | | /// template<typename T> inline int x = [](){ return 0; }(); |
953 | | /// \endcode |
954 | | bool isInLocalScopeForInstantiation() const; |
955 | | |
956 | | /// If this decl is defined inside a function/method/block it returns |
957 | | /// the corresponding DeclContext, otherwise it returns null. |
958 | | const DeclContext * |
959 | | getParentFunctionOrMethod(bool LexicalParent = false) const; |
960 | 20.6k | DeclContext *getParentFunctionOrMethod(bool LexicalParent = false) { |
961 | 20.6k | return const_cast<DeclContext *>( |
962 | 20.6k | const_cast<const Decl *>(this)->getParentFunctionOrMethod( |
963 | 20.6k | LexicalParent)); |
964 | 20.6k | } |
965 | | |
966 | | /// Retrieves the "canonical" declaration of the given declaration. |
967 | 10.9M | virtual Decl *getCanonicalDecl() { return this; } |
968 | 1.12G | const Decl *getCanonicalDecl() const { |
969 | 1.12G | return const_cast<Decl*>(this)->getCanonicalDecl(); |
970 | 1.12G | } |
971 | | |
972 | | /// Whether this particular Decl is a canonical one. |
973 | 23.0M | bool isCanonicalDecl() const { return getCanonicalDecl() == this; } |
974 | | |
975 | | protected: |
976 | | /// Returns the next redeclaration or itself if this is the only decl. |
977 | | /// |
978 | | /// Decl subclasses that can be redeclared should override this method so that |
979 | | /// Decl::redecl_iterator can iterate over them. |
980 | 4.05M | virtual Decl *getNextRedeclarationImpl() { return this; } |
981 | | |
982 | | /// Implementation of getPreviousDecl(), to be overridden by any |
983 | | /// subclass that has a redeclaration chain. |
984 | 10.6M | virtual Decl *getPreviousDeclImpl() { return nullptr; } |
985 | | |
986 | | /// Implementation of getMostRecentDecl(), to be overridden by any |
987 | | /// subclass that has a redeclaration chain. |
988 | 9.76M | virtual Decl *getMostRecentDeclImpl() { return this; } |
989 | | |
990 | | public: |
991 | | /// Iterates through all the redeclarations of the same decl. |
992 | | class redecl_iterator { |
993 | | /// Current - The current declaration. |
994 | | Decl *Current = nullptr; |
995 | | Decl *Starter; |
996 | | |
997 | | public: |
998 | | using value_type = Decl *; |
999 | | using reference = const value_type &; |
1000 | | using pointer = const value_type *; |
1001 | | using iterator_category = std::forward_iterator_tag; |
1002 | | using difference_type = std::ptrdiff_t; |
1003 | | |
1004 | 144M | redecl_iterator() = default; |
1005 | 144M | explicit redecl_iterator(Decl *C) : Current(C), Starter(C) {} |
1006 | | |
1007 | 241M | reference operator*() const { return Current; } |
1008 | 0 | value_type operator->() const { return Current; } |
1009 | | |
1010 | 241M | redecl_iterator& operator++() { |
1011 | 241M | assert(Current && "Advancing while iterator has reached end"); |
1012 | | // Get either previous decl or latest decl. |
1013 | 241M | Decl *Next = Current->getNextRedeclarationImpl(); |
1014 | 241M | assert(Next && "Should return next redeclaration or itself, never null!"); |
1015 | 241M | Current = (Next != Starter) ? Next97.7M : nullptr143M ; |
1016 | 241M | return *this; |
1017 | 241M | } |
1018 | | |
1019 | 0 | redecl_iterator operator++(int) { |
1020 | 0 | redecl_iterator tmp(*this); |
1021 | 0 | ++(*this); |
1022 | 0 | return tmp; |
1023 | 0 | } |
1024 | | |
1025 | 0 | friend bool operator==(redecl_iterator x, redecl_iterator y) { |
1026 | 0 | return x.Current == y.Current; |
1027 | 0 | } |
1028 | | |
1029 | 385M | friend bool operator!=(redecl_iterator x, redecl_iterator y) { |
1030 | 385M | return x.Current != y.Current; |
1031 | 385M | } |
1032 | | }; |
1033 | | |
1034 | | using redecl_range = llvm::iterator_range<redecl_iterator>; |
1035 | | |
1036 | | /// Returns an iterator range for all the redeclarations of the same |
1037 | | /// decl. It will iterate at least once (when this decl is the only one). |
1038 | 144M | redecl_range redecls() const { |
1039 | 144M | return redecl_range(redecls_begin(), redecls_end()); |
1040 | 144M | } |
1041 | | |
1042 | 144M | redecl_iterator redecls_begin() const { |
1043 | 144M | return redecl_iterator(const_cast<Decl *>(this)); |
1044 | 144M | } |
1045 | | |
1046 | 144M | redecl_iterator redecls_end() const { return redecl_iterator(); } |
1047 | | |
1048 | | /// Retrieve the previous declaration that declares the same entity |
1049 | | /// as this declaration, or NULL if there is no previous declaration. |
1050 | 49.8M | Decl *getPreviousDecl() { return getPreviousDeclImpl(); } |
1051 | | |
1052 | | /// Retrieve the previous declaration that declares the same entity |
1053 | | /// as this declaration, or NULL if there is no previous declaration. |
1054 | 119M | const Decl *getPreviousDecl() const { |
1055 | 119M | return const_cast<Decl *>(this)->getPreviousDeclImpl(); |
1056 | 119M | } |
1057 | | |
1058 | | /// True if this is the first declaration in its redeclaration chain. |
1059 | 206 | bool isFirstDecl() const { |
1060 | 206 | return getPreviousDecl() == nullptr; |
1061 | 206 | } |
1062 | | |
1063 | | /// Retrieve the most recent declaration that declares the same entity |
1064 | | /// as this declaration (which may be this declaration). |
1065 | 68.8M | Decl *getMostRecentDecl() { return getMostRecentDeclImpl(); } |
1066 | | |
1067 | | /// Retrieve the most recent declaration that declares the same entity |
1068 | | /// as this declaration (which may be this declaration). |
1069 | 169M | const Decl *getMostRecentDecl() const { |
1070 | 169M | return const_cast<Decl *>(this)->getMostRecentDeclImpl(); |
1071 | 169M | } |
1072 | | |
1073 | | /// getBody - If this Decl represents a declaration for a body of code, |
1074 | | /// such as a function or method definition, this method returns the |
1075 | | /// top-level Stmt* of that body. Otherwise this method returns null. |
1076 | 244k | virtual Stmt* getBody() const { return nullptr; } |
1077 | | |
1078 | | /// Returns true if this \c Decl represents a declaration for a body of |
1079 | | /// code, such as a function or method definition. |
1080 | | /// Note that \c hasBody can also return true if any redeclaration of this |
1081 | | /// \c Decl represents a declaration for a body of code. |
1082 | 54.8k | virtual bool hasBody() const { return getBody() != nullptr; } |
1083 | | |
1084 | | /// getBodyRBrace - Gets the right brace of the body, if a body exists. |
1085 | | /// This works whether the body is a CompoundStmt or a CXXTryStmt. |
1086 | | SourceLocation getBodyRBrace() const; |
1087 | | |
1088 | | // global temp stats (until we have a per-module visitor) |
1089 | | static void add(Kind k); |
1090 | | static void EnableStatistics(); |
1091 | | static void PrintStats(); |
1092 | | |
1093 | | /// isTemplateParameter - Determines whether this declaration is a |
1094 | | /// template parameter. |
1095 | | bool isTemplateParameter() const; |
1096 | | |
1097 | | /// isTemplateParameter - Determines whether this declaration is a |
1098 | | /// template parameter pack. |
1099 | | bool isTemplateParameterPack() const; |
1100 | | |
1101 | | /// Whether this declaration is a parameter pack. |
1102 | | bool isParameterPack() const; |
1103 | | |
1104 | | /// returns true if this declaration is a template |
1105 | | bool isTemplateDecl() const; |
1106 | | |
1107 | | /// Whether this declaration is a function or function template. |
1108 | 882k | bool isFunctionOrFunctionTemplate() const { |
1109 | 882k | return (DeclKind >= Decl::firstFunction && |
1110 | 882k | DeclKind <= Decl::lastFunction811k ) || |
1111 | 882k | DeclKind == FunctionTemplate93.0k ; |
1112 | 882k | } |
1113 | | |
1114 | | /// If this is a declaration that describes some template, this |
1115 | | /// method returns that template declaration. |
1116 | | /// |
1117 | | /// Note that this returns nullptr for partial specializations, because they |
1118 | | /// are not modeled as TemplateDecls. Use getDescribedTemplateParams to handle |
1119 | | /// those cases. |
1120 | | TemplateDecl *getDescribedTemplate() const; |
1121 | | |
1122 | | /// If this is a declaration that describes some template or partial |
1123 | | /// specialization, this returns the corresponding template parameter list. |
1124 | | const TemplateParameterList *getDescribedTemplateParams() const; |
1125 | | |
1126 | | /// Returns the function itself, or the templated function if this is a |
1127 | | /// function template. |
1128 | | FunctionDecl *getAsFunction() LLVM_READONLY; |
1129 | | |
1130 | 10.7M | const FunctionDecl *getAsFunction() const { |
1131 | 10.7M | return const_cast<Decl *>(this)->getAsFunction(); |
1132 | 10.7M | } |
1133 | | |
1134 | | /// Changes the namespace of this declaration to reflect that it's |
1135 | | /// a function-local extern declaration. |
1136 | | /// |
1137 | | /// These declarations appear in the lexical context of the extern |
1138 | | /// declaration, but in the semantic context of the enclosing namespace |
1139 | | /// scope. |
1140 | 3.36k | void setLocalExternDecl() { |
1141 | 3.36k | Decl *Prev = getPreviousDecl(); |
1142 | 3.36k | IdentifierNamespace &= ~IDNS_Ordinary; |
1143 | | |
1144 | | // It's OK for the declaration to still have the "invisible friend" flag or |
1145 | | // the "conflicts with tag declarations in this scope" flag for the outer |
1146 | | // scope. |
1147 | 3.36k | assert((IdentifierNamespace & ~(IDNS_OrdinaryFriend | IDNS_Tag)) == 0 && |
1148 | 3.36k | "namespace is not ordinary"); |
1149 | | |
1150 | 3.36k | IdentifierNamespace |= IDNS_LocalExtern; |
1151 | 3.36k | if (Prev && Prev->getIdentifierNamespace() & IDNS_Ordinary9 ) |
1152 | 0 | IdentifierNamespace |= IDNS_Ordinary; |
1153 | 3.36k | } |
1154 | | |
1155 | | /// Determine whether this is a block-scope declaration with linkage. |
1156 | | /// This will either be a local variable declaration declared 'extern', or a |
1157 | | /// local function declaration. |
1158 | 80.5M | bool isLocalExternDecl() const { |
1159 | 80.5M | return IdentifierNamespace & IDNS_LocalExtern; |
1160 | 80.5M | } |
1161 | | |
1162 | | /// Changes the namespace of this declaration to reflect that it's |
1163 | | /// the object of a friend declaration. |
1164 | | /// |
1165 | | /// These declarations appear in the lexical context of the friending |
1166 | | /// class, but in the semantic context of the actual entity. This property |
1167 | | /// applies only to a specific decl object; other redeclarations of the |
1168 | | /// same entity may not (and probably don't) share this property. |
1169 | 114k | void setObjectOfFriendDecl(bool PerformFriendInjection = false) { |
1170 | 114k | unsigned OldNS = IdentifierNamespace; |
1171 | 114k | assert((OldNS & (IDNS_Tag | IDNS_Ordinary | |
1172 | 114k | IDNS_TagFriend | IDNS_OrdinaryFriend | |
1173 | 114k | IDNS_LocalExtern | IDNS_NonMemberOperator)) && |
1174 | 114k | "namespace includes neither ordinary nor tag"); |
1175 | 114k | assert(!(OldNS & ~(IDNS_Tag | IDNS_Ordinary | IDNS_Type | |
1176 | 114k | IDNS_TagFriend | IDNS_OrdinaryFriend | |
1177 | 114k | IDNS_LocalExtern | IDNS_NonMemberOperator)) && |
1178 | 114k | "namespace includes other than ordinary or tag"); |
1179 | | |
1180 | 114k | Decl *Prev = getPreviousDecl(); |
1181 | 114k | IdentifierNamespace &= ~(IDNS_Ordinary | IDNS_Tag | IDNS_Type); |
1182 | | |
1183 | 114k | if (OldNS & (IDNS_Tag | IDNS_TagFriend)) { |
1184 | 22.7k | IdentifierNamespace |= IDNS_TagFriend; |
1185 | 22.7k | if (PerformFriendInjection || |
1186 | 22.7k | (22.7k Prev22.7k && Prev->getIdentifierNamespace() & IDNS_Tag756 )) |
1187 | 781 | IdentifierNamespace |= IDNS_Tag | IDNS_Type; |
1188 | 22.7k | } |
1189 | | |
1190 | 114k | if (OldNS & (IDNS_Ordinary | IDNS_OrdinaryFriend | |
1191 | 114k | IDNS_LocalExtern | IDNS_NonMemberOperator)) { |
1192 | 113k | IdentifierNamespace |= IDNS_OrdinaryFriend; |
1193 | 113k | if (PerformFriendInjection || |
1194 | 113k | (Prev && Prev->getIdentifierNamespace() & IDNS_Ordinary581 )) |
1195 | 580 | IdentifierNamespace |= IDNS_Ordinary; |
1196 | 113k | } |
1197 | 114k | } |
1198 | | |
1199 | | /// Clears the namespace of this declaration. |
1200 | | /// |
1201 | | /// This is useful if we want this declaration to be available for |
1202 | | /// redeclaration lookup but otherwise hidden for ordinary name lookups. |
1203 | 905 | void clearIdentifierNamespace() { IdentifierNamespace = 0; } |
1204 | | |
1205 | | enum FriendObjectKind { |
1206 | | FOK_None, ///< Not a friend object. |
1207 | | FOK_Declared, ///< A friend of a previously-declared entity. |
1208 | | FOK_Undeclared ///< A friend of a previously-undeclared entity. |
1209 | | }; |
1210 | | |
1211 | | /// Determines whether this declaration is the object of a |
1212 | | /// friend declaration and, if so, what kind. |
1213 | | /// |
1214 | | /// There is currently no direct way to find the associated FriendDecl. |
1215 | 465M | FriendObjectKind getFriendObjectKind() const { |
1216 | 465M | unsigned mask = |
1217 | 465M | (IdentifierNamespace & (IDNS_TagFriend | IDNS_OrdinaryFriend)); |
1218 | 465M | if (!mask) return FOK_None465M ; |
1219 | 931k | return (IdentifierNamespace & (IDNS_Tag | IDNS_Ordinary) ? FOK_Declared72.6k |
1220 | 931k | : FOK_Undeclared858k ); |
1221 | 465M | } |
1222 | | |
1223 | | /// Specifies that this declaration is a C++ overloaded non-member. |
1224 | 159k | void setNonMemberOperator() { |
1225 | 159k | assert(getKind() == Function || getKind() == FunctionTemplate); |
1226 | 159k | assert((IdentifierNamespace & IDNS_Ordinary) && |
1227 | 159k | "visible non-member operators should be in ordinary namespace"); |
1228 | 159k | IdentifierNamespace |= IDNS_NonMemberOperator; |
1229 | 159k | } |
1230 | | |
1231 | 5.67G | static bool classofKind(Kind K) { return true; } |
1232 | | static DeclContext *castToDeclContext(const Decl *); |
1233 | | static Decl *castFromDeclContext(const DeclContext *); |
1234 | | |
1235 | | void print(raw_ostream &Out, unsigned Indentation = 0, |
1236 | | bool PrintInstantiation = false) const; |
1237 | | void print(raw_ostream &Out, const PrintingPolicy &Policy, |
1238 | | unsigned Indentation = 0, bool PrintInstantiation = false) const; |
1239 | | static void printGroup(Decl** Begin, unsigned NumDecls, |
1240 | | raw_ostream &Out, const PrintingPolicy &Policy, |
1241 | | unsigned Indentation = 0); |
1242 | | |
1243 | | // Debuggers don't usually respect default arguments. |
1244 | | void dump() const; |
1245 | | |
1246 | | // Same as dump(), but forces color printing. |
1247 | | void dumpColor() const; |
1248 | | |
1249 | | void dump(raw_ostream &Out, bool Deserialize = false, |
1250 | | ASTDumpOutputFormat OutputFormat = ADOF_Default) const; |
1251 | | |
1252 | | /// \return Unique reproducible object identifier |
1253 | | int64_t getID() const; |
1254 | | |
1255 | | /// Looks through the Decl's underlying type to extract a FunctionType |
1256 | | /// when possible. Will return null if the type underlying the Decl does not |
1257 | | /// have a FunctionType. |
1258 | | const FunctionType *getFunctionType(bool BlocksToo = true) const; |
1259 | | |
1260 | | // Looks through the Decl's underlying type to determine if it's a |
1261 | | // function pointer type. |
1262 | | bool isFunctionPointerType() const; |
1263 | | |
1264 | | private: |
1265 | | void setAttrsImpl(const AttrVec& Attrs, ASTContext &Ctx); |
1266 | | void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC, |
1267 | | ASTContext &Ctx); |
1268 | | |
1269 | | protected: |
1270 | | ASTMutationListener *getASTMutationListener() const; |
1271 | | }; |
1272 | | |
1273 | | /// Determine whether two declarations declare the same entity. |
1274 | 5.97M | inline bool declaresSameEntity(const Decl *D1, const Decl *D2) { |
1275 | 5.97M | if (!D1 || !D25.82M ) |
1276 | 155k | return false; |
1277 | | |
1278 | 5.82M | if (D1 == D2) |
1279 | 3.13M | return true; |
1280 | | |
1281 | 2.69M | return D1->getCanonicalDecl() == D2->getCanonicalDecl(); |
1282 | 5.82M | } |
1283 | | |
1284 | | /// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when |
1285 | | /// doing something to a specific decl. |
1286 | | class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry { |
1287 | | const Decl *TheDecl; |
1288 | | SourceLocation Loc; |
1289 | | SourceManager &SM; |
1290 | | const char *Message; |
1291 | | |
1292 | | public: |
1293 | | PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L, |
1294 | | SourceManager &sm, const char *Msg) |
1295 | 29.0M | : TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {} |
1296 | | |
1297 | | void print(raw_ostream &OS) const override; |
1298 | | }; |
1299 | | } // namespace clang |
1300 | | |
1301 | | // Required to determine the layout of the PointerUnion<NamedDecl*> before |
1302 | | // seeing the NamedDecl definition being first used in DeclListNode::operator*. |
1303 | | namespace llvm { |
1304 | | template <> struct PointerLikeTypeTraits<::clang::NamedDecl *> { |
1305 | 129M | static inline void *getAsVoidPointer(::clang::NamedDecl *P) { return P; } |
1306 | 220M | static inline ::clang::NamedDecl *getFromVoidPointer(void *P) { |
1307 | 220M | return static_cast<::clang::NamedDecl *>(P); |
1308 | 220M | } |
1309 | | static constexpr int NumLowBitsAvailable = 3; |
1310 | | }; |
1311 | | } |
1312 | | |
1313 | | namespace clang { |
1314 | | /// A list storing NamedDecls in the lookup tables. |
1315 | | class DeclListNode { |
1316 | | friend class ASTContext; // allocate, deallocate nodes. |
1317 | | friend class StoredDeclsList; |
1318 | | public: |
1319 | | using Decls = llvm::PointerUnion<NamedDecl*, DeclListNode*>; |
1320 | | class iterator { |
1321 | | friend class DeclContextLookupResult; |
1322 | | friend class StoredDeclsList; |
1323 | | |
1324 | | Decls Ptr; |
1325 | 341M | iterator(Decls Node) : Ptr(Node) { } |
1326 | | public: |
1327 | | using difference_type = ptrdiff_t; |
1328 | | using value_type = NamedDecl*; |
1329 | | using pointer = void; |
1330 | | using reference = value_type; |
1331 | | using iterator_category = std::forward_iterator_tag; |
1332 | | |
1333 | 359M | iterator() = default; |
1334 | | |
1335 | 263M | reference operator*() const { |
1336 | 263M | assert(Ptr && "dereferencing end() iterator"); |
1337 | 263M | if (DeclListNode *CurNode = Ptr.dyn_cast<DeclListNode*>()) |
1338 | 133M | return CurNode->D; |
1339 | 129M | return Ptr.get<NamedDecl*>(); |
1340 | 263M | } |
1341 | 0 | void operator->() const { } // Unsupported. |
1342 | 177M | bool operator==(const iterator &X) const { return Ptr == X.Ptr; } |
1343 | 427M | bool operator!=(const iterator &X) const { return Ptr != X.Ptr; } |
1344 | 255M | inline iterator &operator++() { // ++It |
1345 | 255M | assert(!Ptr.isNull() && "Advancing empty iterator"); |
1346 | | |
1347 | 255M | if (DeclListNode *CurNode = Ptr.dyn_cast<DeclListNode*>()) |
1348 | 134M | Ptr = CurNode->Rest; |
1349 | 121M | else |
1350 | 121M | Ptr = nullptr; |
1351 | 255M | return *this; |
1352 | 255M | } |
1353 | 257 | iterator operator++(int) { // It++ |
1354 | 257 | iterator temp = *this; |
1355 | 257 | ++(*this); |
1356 | 257 | return temp; |
1357 | 257 | } |
1358 | | // Enables the pattern for (iterator I =..., E = I.end(); I != E; ++I) |
1359 | 2.77M | iterator end() { return iterator(); } |
1360 | | }; |
1361 | | private: |
1362 | | NamedDecl *D = nullptr; |
1363 | | Decls Rest = nullptr; |
1364 | 9.06M | DeclListNode(NamedDecl *ND) : D(ND) {} |
1365 | | }; |
1366 | | |
1367 | | /// The results of name lookup within a DeclContext. |
1368 | | class DeclContextLookupResult { |
1369 | | using Decls = DeclListNode::Decls; |
1370 | | |
1371 | | /// When in collection form, this is what the Data pointer points to. |
1372 | | Decls Result; |
1373 | | |
1374 | | public: |
1375 | 248M | DeclContextLookupResult() = default; |
1376 | 130M | DeclContextLookupResult(Decls Result) : Result(Result) {} |
1377 | | |
1378 | | using iterator = DeclListNode::iterator; |
1379 | | using const_iterator = iterator; |
1380 | | using reference = iterator::reference; |
1381 | | |
1382 | 341M | iterator begin() { return iterator(Result); } |
1383 | 344M | iterator end() { return iterator(); } |
1384 | 785k | const_iterator begin() const { |
1385 | 785k | return const_cast<DeclContextLookupResult*>(this)->begin(); |
1386 | 785k | } |
1387 | 639k | const_iterator end() const { return iterator(); } |
1388 | | |
1389 | 35.7M | bool empty() const { return Result.isNull(); } |
1390 | 2.09k | bool isSingleResult() const { return Result.dyn_cast<NamedDecl*>(); } |
1391 | 145k | reference front() const { return *begin(); } |
1392 | | |
1393 | | // Find the first declaration of the given type in the list. Note that this |
1394 | | // is not in general the earliest-declared declaration, and should only be |
1395 | | // used when it's not possible for there to be more than one match or where |
1396 | | // it doesn't matter which one is found. |
1397 | 50 | template<class T> T *find_first() const { |
1398 | 50 | for (auto *D : *this) |
1399 | 49 | if (T *Decl = dyn_cast<T>(D)) |
1400 | 48 | return Decl; |
1401 | | |
1402 | 2 | return nullptr; |
1403 | 50 | } clang::ObjCPropertyDecl* clang::DeclContextLookupResult::find_first<clang::ObjCPropertyDecl>() const Line | Count | Source | 1397 | 6 | template<class T> T *find_first() const { | 1398 | 6 | for (auto *D : *this) | 1399 | 4 | if (T *Decl = dyn_cast<T>(D)) | 1400 | 4 | return Decl; | 1401 | | | 1402 | 2 | return nullptr; | 1403 | 6 | } |
clang::FieldDecl* clang::DeclContextLookupResult::find_first<clang::FieldDecl>() const Line | Count | Source | 1397 | 44 | template<class T> T *find_first() const { | 1398 | 44 | for (auto *D : *this) | 1399 | 45 | if (T *Decl = dyn_cast<T>(D)) | 1400 | 44 | return Decl; | 1401 | | | 1402 | 0 | return nullptr; | 1403 | 44 | } |
|
1404 | | }; |
1405 | | |
1406 | | /// Only used by CXXDeductionGuideDecl. |
1407 | | enum class DeductionCandidate : unsigned char { |
1408 | | Normal, |
1409 | | Copy, |
1410 | | Aggregate, |
1411 | | }; |
1412 | | |
1413 | | enum class RecordArgPassingKind; |
1414 | | enum class OMPDeclareReductionInitKind; |
1415 | | enum class ObjCImplementationControl; |
1416 | | enum class LinkageSpecLanguageIDs; |
1417 | | |
1418 | | /// DeclContext - This is used only as base class of specific decl types that |
1419 | | /// can act as declaration contexts. These decls are (only the top classes |
1420 | | /// that directly derive from DeclContext are mentioned, not their subclasses): |
1421 | | /// |
1422 | | /// TranslationUnitDecl |
1423 | | /// ExternCContext |
1424 | | /// NamespaceDecl |
1425 | | /// TagDecl |
1426 | | /// OMPDeclareReductionDecl |
1427 | | /// OMPDeclareMapperDecl |
1428 | | /// FunctionDecl |
1429 | | /// ObjCMethodDecl |
1430 | | /// ObjCContainerDecl |
1431 | | /// LinkageSpecDecl |
1432 | | /// ExportDecl |
1433 | | /// BlockDecl |
1434 | | /// CapturedDecl |
1435 | | class DeclContext { |
1436 | | /// For makeDeclVisibleInContextImpl |
1437 | | friend class ASTDeclReader; |
1438 | | /// For checking the new bits in the Serialization part. |
1439 | | friend class ASTDeclWriter; |
1440 | | /// For reconcileExternalVisibleStorage, CreateStoredDeclsMap, |
1441 | | /// hasNeedToReconcileExternalVisibleStorage |
1442 | | friend class ExternalASTSource; |
1443 | | /// For CreateStoredDeclsMap |
1444 | | friend class DependentDiagnostic; |
1445 | | /// For hasNeedToReconcileExternalVisibleStorage, |
1446 | | /// hasLazyLocalLexicalLookups, hasLazyExternalLexicalLookups |
1447 | | friend class ASTWriter; |
1448 | | |
1449 | | // We use uint64_t in the bit-fields below since some bit-fields |
1450 | | // cross the unsigned boundary and this breaks the packing. |
1451 | | |
1452 | | /// Stores the bits used by DeclContext. |
1453 | | /// If modified NumDeclContextBit, the ctor of DeclContext and the accessor |
1454 | | /// methods in DeclContext should be updated appropriately. |
1455 | | class DeclContextBitfields { |
1456 | | friend class DeclContext; |
1457 | | /// DeclKind - This indicates which class this is. |
1458 | | LLVM_PREFERRED_TYPE(Decl::Kind) |
1459 | | uint64_t DeclKind : 7; |
1460 | | |
1461 | | /// Whether this declaration context also has some external |
1462 | | /// storage that contains additional declarations that are lexically |
1463 | | /// part of this context. |
1464 | | LLVM_PREFERRED_TYPE(bool) |
1465 | | mutable uint64_t ExternalLexicalStorage : 1; |
1466 | | |
1467 | | /// Whether this declaration context also has some external |
1468 | | /// storage that contains additional declarations that are visible |
1469 | | /// in this context. |
1470 | | LLVM_PREFERRED_TYPE(bool) |
1471 | | mutable uint64_t ExternalVisibleStorage : 1; |
1472 | | |
1473 | | /// Whether this declaration context has had externally visible |
1474 | | /// storage added since the last lookup. In this case, \c LookupPtr's |
1475 | | /// invariant may not hold and needs to be fixed before we perform |
1476 | | /// another lookup. |
1477 | | LLVM_PREFERRED_TYPE(bool) |
1478 | | mutable uint64_t NeedToReconcileExternalVisibleStorage : 1; |
1479 | | |
1480 | | /// If \c true, this context may have local lexical declarations |
1481 | | /// that are missing from the lookup table. |
1482 | | LLVM_PREFERRED_TYPE(bool) |
1483 | | mutable uint64_t HasLazyLocalLexicalLookups : 1; |
1484 | | |
1485 | | /// If \c true, the external source may have lexical declarations |
1486 | | /// that are missing from the lookup table. |
1487 | | LLVM_PREFERRED_TYPE(bool) |
1488 | | mutable uint64_t HasLazyExternalLexicalLookups : 1; |
1489 | | |
1490 | | /// If \c true, lookups should only return identifier from |
1491 | | /// DeclContext scope (for example TranslationUnit). Used in |
1492 | | /// LookupQualifiedName() |
1493 | | LLVM_PREFERRED_TYPE(bool) |
1494 | | mutable uint64_t UseQualifiedLookup : 1; |
1495 | | }; |
1496 | | |
1497 | | /// Number of bits in DeclContextBitfields. |
1498 | | enum { NumDeclContextBits = 13 }; |
1499 | | |
1500 | | /// Stores the bits used by TagDecl. |
1501 | | /// If modified NumTagDeclBits and the accessor |
1502 | | /// methods in TagDecl should be updated appropriately. |
1503 | | class TagDeclBitfields { |
1504 | | friend class TagDecl; |
1505 | | /// For the bits in DeclContextBitfields |
1506 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1507 | | uint64_t : NumDeclContextBits; |
1508 | | |
1509 | | /// The TagKind enum. |
1510 | | LLVM_PREFERRED_TYPE(TagTypeKind) |
1511 | | uint64_t TagDeclKind : 3; |
1512 | | |
1513 | | /// True if this is a definition ("struct foo {};"), false if it is a |
1514 | | /// declaration ("struct foo;"). It is not considered a definition |
1515 | | /// until the definition has been fully processed. |
1516 | | LLVM_PREFERRED_TYPE(bool) |
1517 | | uint64_t IsCompleteDefinition : 1; |
1518 | | |
1519 | | /// True if this is currently being defined. |
1520 | | LLVM_PREFERRED_TYPE(bool) |
1521 | | uint64_t IsBeingDefined : 1; |
1522 | | |
1523 | | /// True if this tag declaration is "embedded" (i.e., defined or declared |
1524 | | /// for the very first time) in the syntax of a declarator. |
1525 | | LLVM_PREFERRED_TYPE(bool) |
1526 | | uint64_t IsEmbeddedInDeclarator : 1; |
1527 | | |
1528 | | /// True if this tag is free standing, e.g. "struct foo;". |
1529 | | LLVM_PREFERRED_TYPE(bool) |
1530 | | uint64_t IsFreeStanding : 1; |
1531 | | |
1532 | | /// Indicates whether it is possible for declarations of this kind |
1533 | | /// to have an out-of-date definition. |
1534 | | /// |
1535 | | /// This option is only enabled when modules are enabled. |
1536 | | LLVM_PREFERRED_TYPE(bool) |
1537 | | uint64_t MayHaveOutOfDateDef : 1; |
1538 | | |
1539 | | /// Has the full definition of this type been required by a use somewhere in |
1540 | | /// the TU. |
1541 | | LLVM_PREFERRED_TYPE(bool) |
1542 | | uint64_t IsCompleteDefinitionRequired : 1; |
1543 | | |
1544 | | /// Whether this tag is a definition which was demoted due to |
1545 | | /// a module merge. |
1546 | | LLVM_PREFERRED_TYPE(bool) |
1547 | | uint64_t IsThisDeclarationADemotedDefinition : 1; |
1548 | | }; |
1549 | | |
1550 | | /// Number of inherited and non-inherited bits in TagDeclBitfields. |
1551 | | enum { NumTagDeclBits = NumDeclContextBits + 10 }; |
1552 | | |
1553 | | /// Stores the bits used by EnumDecl. |
1554 | | /// If modified NumEnumDeclBit and the accessor |
1555 | | /// methods in EnumDecl should be updated appropriately. |
1556 | | class EnumDeclBitfields { |
1557 | | friend class EnumDecl; |
1558 | | /// For the bits in TagDeclBitfields. |
1559 | | LLVM_PREFERRED_TYPE(TagDeclBitfields) |
1560 | | uint64_t : NumTagDeclBits; |
1561 | | |
1562 | | /// Width in bits required to store all the non-negative |
1563 | | /// enumerators of this enum. |
1564 | | uint64_t NumPositiveBits : 8; |
1565 | | |
1566 | | /// Width in bits required to store all the negative |
1567 | | /// enumerators of this enum. |
1568 | | uint64_t NumNegativeBits : 8; |
1569 | | |
1570 | | /// True if this tag declaration is a scoped enumeration. Only |
1571 | | /// possible in C++11 mode. |
1572 | | LLVM_PREFERRED_TYPE(bool) |
1573 | | uint64_t IsScoped : 1; |
1574 | | |
1575 | | /// If this tag declaration is a scoped enum, |
1576 | | /// then this is true if the scoped enum was declared using the class |
1577 | | /// tag, false if it was declared with the struct tag. No meaning is |
1578 | | /// associated if this tag declaration is not a scoped enum. |
1579 | | LLVM_PREFERRED_TYPE(bool) |
1580 | | uint64_t IsScopedUsingClassTag : 1; |
1581 | | |
1582 | | /// True if this is an enumeration with fixed underlying type. Only |
1583 | | /// possible in C++11, Microsoft extensions, or Objective C mode. |
1584 | | LLVM_PREFERRED_TYPE(bool) |
1585 | | uint64_t IsFixed : 1; |
1586 | | |
1587 | | /// True if a valid hash is stored in ODRHash. |
1588 | | LLVM_PREFERRED_TYPE(bool) |
1589 | | uint64_t HasODRHash : 1; |
1590 | | }; |
1591 | | |
1592 | | /// Number of inherited and non-inherited bits in EnumDeclBitfields. |
1593 | | enum { NumEnumDeclBits = NumTagDeclBits + 20 }; |
1594 | | |
1595 | | /// Stores the bits used by RecordDecl. |
1596 | | /// If modified NumRecordDeclBits and the accessor |
1597 | | /// methods in RecordDecl should be updated appropriately. |
1598 | | class RecordDeclBitfields { |
1599 | | friend class RecordDecl; |
1600 | | /// For the bits in TagDeclBitfields. |
1601 | | LLVM_PREFERRED_TYPE(TagDeclBitfields) |
1602 | | uint64_t : NumTagDeclBits; |
1603 | | |
1604 | | /// This is true if this struct ends with a flexible |
1605 | | /// array member (e.g. int X[]) or if this union contains a struct that does. |
1606 | | /// If so, this cannot be contained in arrays or other structs as a member. |
1607 | | LLVM_PREFERRED_TYPE(bool) |
1608 | | uint64_t HasFlexibleArrayMember : 1; |
1609 | | |
1610 | | /// Whether this is the type of an anonymous struct or union. |
1611 | | LLVM_PREFERRED_TYPE(bool) |
1612 | | uint64_t AnonymousStructOrUnion : 1; |
1613 | | |
1614 | | /// This is true if this struct has at least one member |
1615 | | /// containing an Objective-C object pointer type. |
1616 | | LLVM_PREFERRED_TYPE(bool) |
1617 | | uint64_t HasObjectMember : 1; |
1618 | | |
1619 | | /// This is true if struct has at least one member of |
1620 | | /// 'volatile' type. |
1621 | | LLVM_PREFERRED_TYPE(bool) |
1622 | | uint64_t HasVolatileMember : 1; |
1623 | | |
1624 | | /// Whether the field declarations of this record have been loaded |
1625 | | /// from external storage. To avoid unnecessary deserialization of |
1626 | | /// methods/nested types we allow deserialization of just the fields |
1627 | | /// when needed. |
1628 | | LLVM_PREFERRED_TYPE(bool) |
1629 | | mutable uint64_t LoadedFieldsFromExternalStorage : 1; |
1630 | | |
1631 | | /// Basic properties of non-trivial C structs. |
1632 | | LLVM_PREFERRED_TYPE(bool) |
1633 | | uint64_t NonTrivialToPrimitiveDefaultInitialize : 1; |
1634 | | LLVM_PREFERRED_TYPE(bool) |
1635 | | uint64_t NonTrivialToPrimitiveCopy : 1; |
1636 | | LLVM_PREFERRED_TYPE(bool) |
1637 | | uint64_t NonTrivialToPrimitiveDestroy : 1; |
1638 | | |
1639 | | /// The following bits indicate whether this is or contains a C union that |
1640 | | /// is non-trivial to default-initialize, destruct, or copy. These bits |
1641 | | /// imply the associated basic non-triviality predicates declared above. |
1642 | | LLVM_PREFERRED_TYPE(bool) |
1643 | | uint64_t HasNonTrivialToPrimitiveDefaultInitializeCUnion : 1; |
1644 | | LLVM_PREFERRED_TYPE(bool) |
1645 | | uint64_t HasNonTrivialToPrimitiveDestructCUnion : 1; |
1646 | | LLVM_PREFERRED_TYPE(bool) |
1647 | | uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1; |
1648 | | |
1649 | | /// Indicates whether this struct is destroyed in the callee. |
1650 | | LLVM_PREFERRED_TYPE(bool) |
1651 | | uint64_t ParamDestroyedInCallee : 1; |
1652 | | |
1653 | | /// Represents the way this type is passed to a function. |
1654 | | LLVM_PREFERRED_TYPE(RecordArgPassingKind) |
1655 | | uint64_t ArgPassingRestrictions : 2; |
1656 | | |
1657 | | /// Indicates whether this struct has had its field layout randomized. |
1658 | | LLVM_PREFERRED_TYPE(bool) |
1659 | | uint64_t IsRandomized : 1; |
1660 | | |
1661 | | /// True if a valid hash is stored in ODRHash. This should shave off some |
1662 | | /// extra storage and prevent CXXRecordDecl to store unused bits. |
1663 | | uint64_t ODRHash : 26; |
1664 | | }; |
1665 | | |
1666 | | /// Number of inherited and non-inherited bits in RecordDeclBitfields. |
1667 | | enum { NumRecordDeclBits = NumTagDeclBits + 41 }; |
1668 | | |
1669 | | /// Stores the bits used by OMPDeclareReductionDecl. |
1670 | | /// If modified NumOMPDeclareReductionDeclBits and the accessor |
1671 | | /// methods in OMPDeclareReductionDecl should be updated appropriately. |
1672 | | class OMPDeclareReductionDeclBitfields { |
1673 | | friend class OMPDeclareReductionDecl; |
1674 | | /// For the bits in DeclContextBitfields |
1675 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1676 | | uint64_t : NumDeclContextBits; |
1677 | | |
1678 | | /// Kind of initializer, |
1679 | | /// function call or omp_priv<init_expr> initialization. |
1680 | | LLVM_PREFERRED_TYPE(OMPDeclareReductionInitKind) |
1681 | | uint64_t InitializerKind : 2; |
1682 | | }; |
1683 | | |
1684 | | /// Number of inherited and non-inherited bits in |
1685 | | /// OMPDeclareReductionDeclBitfields. |
1686 | | enum { NumOMPDeclareReductionDeclBits = NumDeclContextBits + 2 }; |
1687 | | |
1688 | | /// Stores the bits used by FunctionDecl. |
1689 | | /// If modified NumFunctionDeclBits and the accessor |
1690 | | /// methods in FunctionDecl and CXXDeductionGuideDecl |
1691 | | /// (for DeductionCandidateKind) should be updated appropriately. |
1692 | | class FunctionDeclBitfields { |
1693 | | friend class FunctionDecl; |
1694 | | /// For DeductionCandidateKind |
1695 | | friend class CXXDeductionGuideDecl; |
1696 | | /// For the bits in DeclContextBitfields. |
1697 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1698 | | uint64_t : NumDeclContextBits; |
1699 | | |
1700 | | LLVM_PREFERRED_TYPE(StorageClass) |
1701 | | uint64_t SClass : 3; |
1702 | | LLVM_PREFERRED_TYPE(bool) |
1703 | | uint64_t IsInline : 1; |
1704 | | LLVM_PREFERRED_TYPE(bool) |
1705 | | uint64_t IsInlineSpecified : 1; |
1706 | | |
1707 | | LLVM_PREFERRED_TYPE(bool) |
1708 | | uint64_t IsVirtualAsWritten : 1; |
1709 | | LLVM_PREFERRED_TYPE(bool) |
1710 | | uint64_t IsPure : 1; |
1711 | | LLVM_PREFERRED_TYPE(bool) |
1712 | | uint64_t HasInheritedPrototype : 1; |
1713 | | LLVM_PREFERRED_TYPE(bool) |
1714 | | uint64_t HasWrittenPrototype : 1; |
1715 | | LLVM_PREFERRED_TYPE(bool) |
1716 | | uint64_t IsDeleted : 1; |
1717 | | /// Used by CXXMethodDecl |
1718 | | LLVM_PREFERRED_TYPE(bool) |
1719 | | uint64_t IsTrivial : 1; |
1720 | | |
1721 | | /// This flag indicates whether this function is trivial for the purpose of |
1722 | | /// calls. This is meaningful only when this function is a copy/move |
1723 | | /// constructor or a destructor. |
1724 | | LLVM_PREFERRED_TYPE(bool) |
1725 | | uint64_t IsTrivialForCall : 1; |
1726 | | |
1727 | | LLVM_PREFERRED_TYPE(bool) |
1728 | | uint64_t IsDefaulted : 1; |
1729 | | LLVM_PREFERRED_TYPE(bool) |
1730 | | uint64_t IsExplicitlyDefaulted : 1; |
1731 | | LLVM_PREFERRED_TYPE(bool) |
1732 | | uint64_t HasDefaultedFunctionInfo : 1; |
1733 | | |
1734 | | /// For member functions of complete types, whether this is an ineligible |
1735 | | /// special member function or an unselected destructor. See |
1736 | | /// [class.mem.special]. |
1737 | | LLVM_PREFERRED_TYPE(bool) |
1738 | | uint64_t IsIneligibleOrNotSelected : 1; |
1739 | | |
1740 | | LLVM_PREFERRED_TYPE(bool) |
1741 | | uint64_t HasImplicitReturnZero : 1; |
1742 | | LLVM_PREFERRED_TYPE(bool) |
1743 | | uint64_t IsLateTemplateParsed : 1; |
1744 | | |
1745 | | /// Kind of contexpr specifier as defined by ConstexprSpecKind. |
1746 | | LLVM_PREFERRED_TYPE(ConstexprSpecKind) |
1747 | | uint64_t ConstexprKind : 2; |
1748 | | LLVM_PREFERRED_TYPE(bool) |
1749 | | uint64_t BodyContainsImmediateEscalatingExpression : 1; |
1750 | | |
1751 | | LLVM_PREFERRED_TYPE(bool) |
1752 | | uint64_t InstantiationIsPending : 1; |
1753 | | |
1754 | | /// Indicates if the function uses __try. |
1755 | | LLVM_PREFERRED_TYPE(bool) |
1756 | | uint64_t UsesSEHTry : 1; |
1757 | | |
1758 | | /// Indicates if the function was a definition |
1759 | | /// but its body was skipped. |
1760 | | LLVM_PREFERRED_TYPE(bool) |
1761 | | uint64_t HasSkippedBody : 1; |
1762 | | |
1763 | | /// Indicates if the function declaration will |
1764 | | /// have a body, once we're done parsing it. |
1765 | | LLVM_PREFERRED_TYPE(bool) |
1766 | | uint64_t WillHaveBody : 1; |
1767 | | |
1768 | | /// Indicates that this function is a multiversioned |
1769 | | /// function using attribute 'target'. |
1770 | | LLVM_PREFERRED_TYPE(bool) |
1771 | | uint64_t IsMultiVersion : 1; |
1772 | | |
1773 | | /// Only used by CXXDeductionGuideDecl. Indicates the kind |
1774 | | /// of the Deduction Guide that is implicitly generated |
1775 | | /// (used during overload resolution). |
1776 | | LLVM_PREFERRED_TYPE(DeductionCandidate) |
1777 | | uint64_t DeductionCandidateKind : 2; |
1778 | | |
1779 | | /// Store the ODRHash after first calculation. |
1780 | | LLVM_PREFERRED_TYPE(bool) |
1781 | | uint64_t HasODRHash : 1; |
1782 | | |
1783 | | /// Indicates if the function uses Floating Point Constrained Intrinsics |
1784 | | LLVM_PREFERRED_TYPE(bool) |
1785 | | uint64_t UsesFPIntrin : 1; |
1786 | | |
1787 | | // Indicates this function is a constrained friend, where the constraint |
1788 | | // refers to an enclosing template for hte purposes of [temp.friend]p9. |
1789 | | LLVM_PREFERRED_TYPE(bool) |
1790 | | uint64_t FriendConstraintRefersToEnclosingTemplate : 1; |
1791 | | }; |
1792 | | |
1793 | | /// Number of inherited and non-inherited bits in FunctionDeclBitfields. |
1794 | | enum { NumFunctionDeclBits = NumDeclContextBits + 31 }; |
1795 | | |
1796 | | /// Stores the bits used by CXXConstructorDecl. If modified |
1797 | | /// NumCXXConstructorDeclBits and the accessor |
1798 | | /// methods in CXXConstructorDecl should be updated appropriately. |
1799 | | class CXXConstructorDeclBitfields { |
1800 | | friend class CXXConstructorDecl; |
1801 | | /// For the bits in FunctionDeclBitfields. |
1802 | | LLVM_PREFERRED_TYPE(FunctionDeclBitfields) |
1803 | | uint64_t : NumFunctionDeclBits; |
1804 | | |
1805 | | /// 20 bits to fit in the remaining available space. |
1806 | | /// Note that this makes CXXConstructorDeclBitfields take |
1807 | | /// exactly 64 bits and thus the width of NumCtorInitializers |
1808 | | /// will need to be shrunk if some bit is added to NumDeclContextBitfields, |
1809 | | /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields. |
1810 | | uint64_t NumCtorInitializers : 17; |
1811 | | LLVM_PREFERRED_TYPE(bool) |
1812 | | uint64_t IsInheritingConstructor : 1; |
1813 | | |
1814 | | /// Whether this constructor has a trail-allocated explicit specifier. |
1815 | | LLVM_PREFERRED_TYPE(bool) |
1816 | | uint64_t HasTrailingExplicitSpecifier : 1; |
1817 | | /// If this constructor does't have a trail-allocated explicit specifier. |
1818 | | /// Whether this constructor is explicit specified. |
1819 | | LLVM_PREFERRED_TYPE(bool) |
1820 | | uint64_t IsSimpleExplicit : 1; |
1821 | | }; |
1822 | | |
1823 | | /// Number of inherited and non-inherited bits in CXXConstructorDeclBitfields. |
1824 | | enum { NumCXXConstructorDeclBits = NumFunctionDeclBits + 20 }; |
1825 | | |
1826 | | /// Stores the bits used by ObjCMethodDecl. |
1827 | | /// If modified NumObjCMethodDeclBits and the accessor |
1828 | | /// methods in ObjCMethodDecl should be updated appropriately. |
1829 | | class ObjCMethodDeclBitfields { |
1830 | | friend class ObjCMethodDecl; |
1831 | | |
1832 | | /// For the bits in DeclContextBitfields. |
1833 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1834 | | uint64_t : NumDeclContextBits; |
1835 | | |
1836 | | /// The conventional meaning of this method; an ObjCMethodFamily. |
1837 | | /// This is not serialized; instead, it is computed on demand and |
1838 | | /// cached. |
1839 | | LLVM_PREFERRED_TYPE(ObjCMethodFamily) |
1840 | | mutable uint64_t Family : ObjCMethodFamilyBitWidth; |
1841 | | |
1842 | | /// instance (true) or class (false) method. |
1843 | | LLVM_PREFERRED_TYPE(bool) |
1844 | | uint64_t IsInstance : 1; |
1845 | | LLVM_PREFERRED_TYPE(bool) |
1846 | | uint64_t IsVariadic : 1; |
1847 | | |
1848 | | /// True if this method is the getter or setter for an explicit property. |
1849 | | LLVM_PREFERRED_TYPE(bool) |
1850 | | uint64_t IsPropertyAccessor : 1; |
1851 | | |
1852 | | /// True if this method is a synthesized property accessor stub. |
1853 | | LLVM_PREFERRED_TYPE(bool) |
1854 | | uint64_t IsSynthesizedAccessorStub : 1; |
1855 | | |
1856 | | /// Method has a definition. |
1857 | | LLVM_PREFERRED_TYPE(bool) |
1858 | | uint64_t IsDefined : 1; |
1859 | | |
1860 | | /// Method redeclaration in the same interface. |
1861 | | LLVM_PREFERRED_TYPE(bool) |
1862 | | uint64_t IsRedeclaration : 1; |
1863 | | |
1864 | | /// Is redeclared in the same interface. |
1865 | | LLVM_PREFERRED_TYPE(bool) |
1866 | | mutable uint64_t HasRedeclaration : 1; |
1867 | | |
1868 | | /// \@required/\@optional |
1869 | | LLVM_PREFERRED_TYPE(ObjCImplementationControl) |
1870 | | uint64_t DeclImplementation : 2; |
1871 | | |
1872 | | /// in, inout, etc. |
1873 | | LLVM_PREFERRED_TYPE(Decl::ObjCDeclQualifier) |
1874 | | uint64_t objcDeclQualifier : 7; |
1875 | | |
1876 | | /// Indicates whether this method has a related result type. |
1877 | | LLVM_PREFERRED_TYPE(bool) |
1878 | | uint64_t RelatedResultType : 1; |
1879 | | |
1880 | | /// Whether the locations of the selector identifiers are in a |
1881 | | /// "standard" position, a enum SelectorLocationsKind. |
1882 | | LLVM_PREFERRED_TYPE(SelectorLocationsKind) |
1883 | | uint64_t SelLocsKind : 2; |
1884 | | |
1885 | | /// Whether this method overrides any other in the class hierarchy. |
1886 | | /// |
1887 | | /// A method is said to override any method in the class's |
1888 | | /// base classes, its protocols, or its categories' protocols, that has |
1889 | | /// the same selector and is of the same kind (class or instance). |
1890 | | /// A method in an implementation is not considered as overriding the same |
1891 | | /// method in the interface or its categories. |
1892 | | LLVM_PREFERRED_TYPE(bool) |
1893 | | uint64_t IsOverriding : 1; |
1894 | | |
1895 | | /// Indicates if the method was a definition but its body was skipped. |
1896 | | LLVM_PREFERRED_TYPE(bool) |
1897 | | uint64_t HasSkippedBody : 1; |
1898 | | }; |
1899 | | |
1900 | | /// Number of inherited and non-inherited bits in ObjCMethodDeclBitfields. |
1901 | | enum { NumObjCMethodDeclBits = NumDeclContextBits + 24 }; |
1902 | | |
1903 | | /// Stores the bits used by ObjCContainerDecl. |
1904 | | /// If modified NumObjCContainerDeclBits and the accessor |
1905 | | /// methods in ObjCContainerDecl should be updated appropriately. |
1906 | | class ObjCContainerDeclBitfields { |
1907 | | friend class ObjCContainerDecl; |
1908 | | /// For the bits in DeclContextBitfields |
1909 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1910 | | uint32_t : NumDeclContextBits; |
1911 | | |
1912 | | // Not a bitfield but this saves space. |
1913 | | // Note that ObjCContainerDeclBitfields is full. |
1914 | | SourceLocation AtStart; |
1915 | | }; |
1916 | | |
1917 | | /// Number of inherited and non-inherited bits in ObjCContainerDeclBitfields. |
1918 | | /// Note that here we rely on the fact that SourceLocation is 32 bits |
1919 | | /// wide. We check this with the static_assert in the ctor of DeclContext. |
1920 | | enum { NumObjCContainerDeclBits = 64 }; |
1921 | | |
1922 | | /// Stores the bits used by LinkageSpecDecl. |
1923 | | /// If modified NumLinkageSpecDeclBits and the accessor |
1924 | | /// methods in LinkageSpecDecl should be updated appropriately. |
1925 | | class LinkageSpecDeclBitfields { |
1926 | | friend class LinkageSpecDecl; |
1927 | | /// For the bits in DeclContextBitfields. |
1928 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1929 | | uint64_t : NumDeclContextBits; |
1930 | | |
1931 | | /// The language for this linkage specification. |
1932 | | LLVM_PREFERRED_TYPE(LinkageSpecLanguageIDs) |
1933 | | uint64_t Language : 3; |
1934 | | |
1935 | | /// True if this linkage spec has braces. |
1936 | | /// This is needed so that hasBraces() returns the correct result while the |
1937 | | /// linkage spec body is being parsed. Once RBraceLoc has been set this is |
1938 | | /// not used, so it doesn't need to be serialized. |
1939 | | LLVM_PREFERRED_TYPE(bool) |
1940 | | uint64_t HasBraces : 1; |
1941 | | }; |
1942 | | |
1943 | | /// Number of inherited and non-inherited bits in LinkageSpecDeclBitfields. |
1944 | | enum { NumLinkageSpecDeclBits = NumDeclContextBits + 4 }; |
1945 | | |
1946 | | /// Stores the bits used by BlockDecl. |
1947 | | /// If modified NumBlockDeclBits and the accessor |
1948 | | /// methods in BlockDecl should be updated appropriately. |
1949 | | class BlockDeclBitfields { |
1950 | | friend class BlockDecl; |
1951 | | /// For the bits in DeclContextBitfields. |
1952 | | LLVM_PREFERRED_TYPE(DeclContextBitfields) |
1953 | | uint64_t : NumDeclContextBits; |
1954 | | |
1955 | | LLVM_PREFERRED_TYPE(bool) |
1956 | | uint64_t IsVariadic : 1; |
1957 | | LLVM_PREFERRED_TYPE(bool) |
1958 | | uint64_t CapturesCXXThis : 1; |
1959 | | LLVM_PREFERRED_TYPE(bool) |
1960 | | uint64_t BlockMissingReturnType : 1; |
1961 | | LLVM_PREFERRED_TYPE(bool) |
1962 | | uint64_t IsConversionFromLambda : 1; |
1963 | | |
1964 | | /// A bit that indicates this block is passed directly to a function as a |
1965 | | /// non-escaping parameter. |
1966 | | LLVM_PREFERRED_TYPE(bool) |
1967 | | uint64_t DoesNotEscape : 1; |
1968 | | |
1969 | | /// A bit that indicates whether it's possible to avoid coying this block to |
1970 | | /// the heap when it initializes or is assigned to a local variable with |
1971 | | /// automatic storage. |
1972 | | LLVM_PREFERRED_TYPE(bool) |
1973 | | uint64_t CanAvoidCopyToHeap : 1; |
1974 | | }; |
1975 | | |
1976 | | /// Number of inherited and non-inherited bits in BlockDeclBitfields. |
1977 | | enum { NumBlockDeclBits = NumDeclContextBits + 5 }; |
1978 | | |
1979 | | /// Pointer to the data structure used to lookup declarations |
1980 | | /// within this context (or a DependentStoredDeclsMap if this is a |
1981 | | /// dependent context). We maintain the invariant that, if the map |
1982 | | /// contains an entry for a DeclarationName (and we haven't lazily |
1983 | | /// omitted anything), then it contains all relevant entries for that |
1984 | | /// name (modulo the hasExternalDecls() flag). |
1985 | | mutable StoredDeclsMap *LookupPtr = nullptr; |
1986 | | |
1987 | | protected: |
1988 | | /// This anonymous union stores the bits belonging to DeclContext and classes |
1989 | | /// deriving from it. The goal is to use otherwise wasted |
1990 | | /// space in DeclContext to store data belonging to derived classes. |
1991 | | /// The space saved is especially significient when pointers are aligned |
1992 | | /// to 8 bytes. In this case due to alignment requirements we have a |
1993 | | /// little less than 8 bytes free in DeclContext which we can use. |
1994 | | /// We check that none of the classes in this union is larger than |
1995 | | /// 8 bytes with static_asserts in the ctor of DeclContext. |
1996 | | union { |
1997 | | DeclContextBitfields DeclContextBits; |
1998 | | TagDeclBitfields TagDeclBits; |
1999 | | EnumDeclBitfields EnumDeclBits; |
2000 | | RecordDeclBitfields RecordDeclBits; |
2001 | | OMPDeclareReductionDeclBitfields OMPDeclareReductionDeclBits; |
2002 | | FunctionDeclBitfields FunctionDeclBits; |
2003 | | CXXConstructorDeclBitfields CXXConstructorDeclBits; |
2004 | | ObjCMethodDeclBitfields ObjCMethodDeclBits; |
2005 | | ObjCContainerDeclBitfields ObjCContainerDeclBits; |
2006 | | LinkageSpecDeclBitfields LinkageSpecDeclBits; |
2007 | | BlockDeclBitfields BlockDeclBits; |
2008 | | |
2009 | | static_assert(sizeof(DeclContextBitfields) <= 8, |
2010 | | "DeclContextBitfields is larger than 8 bytes!"); |
2011 | | static_assert(sizeof(TagDeclBitfields) <= 8, |
2012 | | "TagDeclBitfields is larger than 8 bytes!"); |
2013 | | static_assert(sizeof(EnumDeclBitfields) <= 8, |
2014 | | "EnumDeclBitfields is larger than 8 bytes!"); |
2015 | | static_assert(sizeof(RecordDeclBitfields) <= 8, |
2016 | | "RecordDeclBitfields is larger than 8 bytes!"); |
2017 | | static_assert(sizeof(OMPDeclareReductionDeclBitfields) <= 8, |
2018 | | "OMPDeclareReductionDeclBitfields is larger than 8 bytes!"); |
2019 | | static_assert(sizeof(FunctionDeclBitfields) <= 8, |
2020 | | "FunctionDeclBitfields is larger than 8 bytes!"); |
2021 | | static_assert(sizeof(CXXConstructorDeclBitfields) <= 8, |
2022 | | "CXXConstructorDeclBitfields is larger than 8 bytes!"); |
2023 | | static_assert(sizeof(ObjCMethodDeclBitfields) <= 8, |
2024 | | "ObjCMethodDeclBitfields is larger than 8 bytes!"); |
2025 | | static_assert(sizeof(ObjCContainerDeclBitfields) <= 8, |
2026 | | "ObjCContainerDeclBitfields is larger than 8 bytes!"); |
2027 | | static_assert(sizeof(LinkageSpecDeclBitfields) <= 8, |
2028 | | "LinkageSpecDeclBitfields is larger than 8 bytes!"); |
2029 | | static_assert(sizeof(BlockDeclBitfields) <= 8, |
2030 | | "BlockDeclBitfields is larger than 8 bytes!"); |
2031 | | }; |
2032 | | |
2033 | | /// FirstDecl - The first declaration stored within this declaration |
2034 | | /// context. |
2035 | | mutable Decl *FirstDecl = nullptr; |
2036 | | |
2037 | | /// LastDecl - The last declaration stored within this declaration |
2038 | | /// context. FIXME: We could probably cache this value somewhere |
2039 | | /// outside of the DeclContext, to reduce the size of DeclContext by |
2040 | | /// another pointer. |
2041 | | mutable Decl *LastDecl = nullptr; |
2042 | | |
2043 | | /// Build up a chain of declarations. |
2044 | | /// |
2045 | | /// \returns the first/last pair of declarations. |
2046 | | static std::pair<Decl *, Decl *> |
2047 | | BuildDeclChain(ArrayRef<Decl*> Decls, bool FieldsAlreadyLoaded); |
2048 | | |
2049 | | DeclContext(Decl::Kind K); |
2050 | | |
2051 | | public: |
2052 | | ~DeclContext(); |
2053 | | |
2054 | | // For use when debugging; hasValidDeclKind() will always return true for |
2055 | | // a correctly constructed object within its lifetime. |
2056 | | bool hasValidDeclKind() const; |
2057 | | |
2058 | 47.5G | Decl::Kind getDeclKind() const { |
2059 | 47.5G | return static_cast<Decl::Kind>(DeclContextBits.DeclKind); |
2060 | 47.5G | } |
2061 | | |
2062 | | const char *getDeclKindName() const; |
2063 | | |
2064 | | /// getParent - Returns the containing DeclContext. |
2065 | 4.52G | DeclContext *getParent() { |
2066 | 4.52G | return cast<Decl>(this)->getDeclContext(); |
2067 | 4.52G | } |
2068 | 568M | const DeclContext *getParent() const { |
2069 | 568M | return const_cast<DeclContext*>(this)->getParent(); |
2070 | 568M | } |
2071 | | |
2072 | | /// getLexicalParent - Returns the containing lexical DeclContext. May be |
2073 | | /// different from getParent, e.g.: |
2074 | | /// |
2075 | | /// namespace A { |
2076 | | /// struct S; |
2077 | | /// } |
2078 | | /// struct A::S {}; // getParent() == namespace 'A' |
2079 | | /// // getLexicalParent() == translation unit |
2080 | | /// |
2081 | 74.0M | DeclContext *getLexicalParent() { |
2082 | 74.0M | return cast<Decl>(this)->getLexicalDeclContext(); |
2083 | 74.0M | } |
2084 | 44.5M | const DeclContext *getLexicalParent() const { |
2085 | 44.5M | return const_cast<DeclContext*>(this)->getLexicalParent(); |
2086 | 44.5M | } |
2087 | | |
2088 | | DeclContext *getLookupParent(); |
2089 | | |
2090 | 139 | const DeclContext *getLookupParent() const { |
2091 | 139 | return const_cast<DeclContext*>(this)->getLookupParent(); |
2092 | 139 | } |
2093 | | |
2094 | 594M | ASTContext &getParentASTContext() const { |
2095 | 594M | return cast<Decl>(this)->getASTContext(); |
2096 | 594M | } |
2097 | | |
2098 | 1.73M | bool isClosure() const { return getDeclKind() == Decl::Block; } |
2099 | | |
2100 | | /// Return this DeclContext if it is a BlockDecl. Otherwise, return the |
2101 | | /// innermost enclosing BlockDecl or null if there are no enclosing blocks. |
2102 | | const BlockDecl *getInnermostBlockDecl() const; |
2103 | | |
2104 | 8.33M | bool isObjCContainer() const { |
2105 | 8.33M | switch (getDeclKind()) { |
2106 | 210k | case Decl::ObjCCategory: |
2107 | 211k | case Decl::ObjCCategoryImpl: |
2108 | 218k | case Decl::ObjCImplementation: |
2109 | 651k | case Decl::ObjCInterface: |
2110 | 709k | case Decl::ObjCProtocol: |
2111 | 709k | return true; |
2112 | 7.62M | default: |
2113 | 7.62M | return false; |
2114 | 8.33M | } |
2115 | 8.33M | } |
2116 | | |
2117 | 564M | bool isFunctionOrMethod() const { |
2118 | 564M | switch (getDeclKind()) { |
2119 | 82.9k | case Decl::Block: |
2120 | 10.4M | case Decl::Captured: |
2121 | 11.6M | case Decl::ObjCMethod: |
2122 | 11.6M | return true; |
2123 | 552M | default: |
2124 | 552M | return getDeclKind() >= Decl::firstFunction && |
2125 | 552M | getDeclKind() <= Decl::lastFunction324M ; |
2126 | 564M | } |
2127 | 564M | } |
2128 | | |
2129 | | /// Test whether the context supports looking up names. |
2130 | 100M | bool isLookupContext() const { |
2131 | 100M | return !isFunctionOrMethod() && getDeclKind() != Decl::LinkageSpec83.6M && |
2132 | 100M | getDeclKind() != Decl::Export68.8M ; |
2133 | 100M | } |
2134 | | |
2135 | 1.74G | bool isFileContext() const { |
2136 | 1.74G | return getDeclKind() == Decl::TranslationUnit || |
2137 | 1.74G | getDeclKind() == Decl::Namespace887M ; |
2138 | 1.74G | } |
2139 | | |
2140 | 7.65G | bool isTranslationUnit() const { |
2141 | 7.65G | return getDeclKind() == Decl::TranslationUnit; |
2142 | 7.65G | } |
2143 | | |
2144 | 563M | bool isRecord() const { |
2145 | 563M | return getDeclKind() >= Decl::firstRecord && |
2146 | 563M | getDeclKind() <= Decl::lastRecord437M ; |
2147 | 563M | } |
2148 | | |
2149 | 86.7M | bool isNamespace() const { return getDeclKind() == Decl::Namespace; } |
2150 | | |
2151 | | bool isStdNamespace() const; |
2152 | | |
2153 | | bool isInlineNamespace() const; |
2154 | | |
2155 | | /// Determines whether this context is dependent on a |
2156 | | /// template parameter. |
2157 | | bool isDependentContext() const; |
2158 | | |
2159 | | /// isTransparentContext - Determines whether this context is a |
2160 | | /// "transparent" context, meaning that the members declared in this |
2161 | | /// context are semantically declared in the nearest enclosing |
2162 | | /// non-transparent (opaque) context but are lexically declared in |
2163 | | /// this context. For example, consider the enumerators of an |
2164 | | /// enumeration type: |
2165 | | /// @code |
2166 | | /// enum E { |
2167 | | /// Val1 |
2168 | | /// }; |
2169 | | /// @endcode |
2170 | | /// Here, E is a transparent context, so its enumerator (Val1) will |
2171 | | /// appear (semantically) that it is in the same context of E. |
2172 | | /// Examples of transparent contexts include: enumerations (except for |
2173 | | /// C++0x scoped enums), C++ linkage specifications and export declaration. |
2174 | | bool isTransparentContext() const; |
2175 | | |
2176 | | /// Determines whether this context or some of its ancestors is a |
2177 | | /// linkage specification context that specifies C linkage. |
2178 | | bool isExternCContext() const; |
2179 | | |
2180 | | /// Retrieve the nearest enclosing C linkage specification context. |
2181 | | const LinkageSpecDecl *getExternCContext() const; |
2182 | | |
2183 | | /// Determines whether this context or some of its ancestors is a |
2184 | | /// linkage specification context that specifies C++ linkage. |
2185 | | bool isExternCXXContext() const; |
2186 | | |
2187 | | /// Determine whether this declaration context is equivalent |
2188 | | /// to the declaration context DC. |
2189 | 802M | bool Equals(const DeclContext *DC) const { |
2190 | 802M | return DC && this->getPrimaryContext() == DC->getPrimaryContext()718M ; |
2191 | 802M | } |
2192 | | |
2193 | | /// Determine whether this declaration context encloses the |
2194 | | /// declaration context DC. |
2195 | | bool Encloses(const DeclContext *DC) const; |
2196 | | |
2197 | | /// Find the nearest non-closure ancestor of this context, |
2198 | | /// i.e. the innermost semantic parent of this context which is not |
2199 | | /// a closure. A context may be its own non-closure ancestor. |
2200 | | Decl *getNonClosureAncestor(); |
2201 | 6 | const Decl *getNonClosureAncestor() const { |
2202 | 6 | return const_cast<DeclContext*>(this)->getNonClosureAncestor(); |
2203 | 6 | } |
2204 | | |
2205 | | // Retrieve the nearest context that is not a transparent context. |
2206 | | DeclContext *getNonTransparentContext(); |
2207 | 198k | const DeclContext *getNonTransparentContext() const { |
2208 | 198k | return const_cast<DeclContext *>(this)->getNonTransparentContext(); |
2209 | 198k | } |
2210 | | |
2211 | | /// getPrimaryContext - There may be many different |
2212 | | /// declarations of the same entity (including forward declarations |
2213 | | /// of classes, multiple definitions of namespaces, etc.), each with |
2214 | | /// a different set of declarations. This routine returns the |
2215 | | /// "primary" DeclContext structure, which will contain the |
2216 | | /// information needed to perform name lookup into this context. |
2217 | | DeclContext *getPrimaryContext(); |
2218 | 2.08G | const DeclContext *getPrimaryContext() const { |
2219 | 2.08G | return const_cast<DeclContext*>(this)->getPrimaryContext(); |
2220 | 2.08G | } |
2221 | | |
2222 | | /// getRedeclContext - Retrieve the context in which an entity conflicts with |
2223 | | /// other entities of the same name, or where it is a redeclaration if the |
2224 | | /// two entities are compatible. This skips through transparent contexts. |
2225 | | DeclContext *getRedeclContext(); |
2226 | 844M | const DeclContext *getRedeclContext() const { |
2227 | 844M | return const_cast<DeclContext *>(this)->getRedeclContext(); |
2228 | 844M | } |
2229 | | |
2230 | | /// Retrieve the nearest enclosing namespace context. |
2231 | | DeclContext *getEnclosingNamespaceContext(); |
2232 | 22.8k | const DeclContext *getEnclosingNamespaceContext() const { |
2233 | 22.8k | return const_cast<DeclContext *>(this)->getEnclosingNamespaceContext(); |
2234 | 22.8k | } |
2235 | | |
2236 | | /// Retrieve the outermost lexically enclosing record context. |
2237 | | RecordDecl *getOuterLexicalRecordContext(); |
2238 | 249 | const RecordDecl *getOuterLexicalRecordContext() const { |
2239 | 249 | return const_cast<DeclContext *>(this)->getOuterLexicalRecordContext(); |
2240 | 249 | } |
2241 | | |
2242 | | /// Test if this context is part of the enclosing namespace set of |
2243 | | /// the context NS, as defined in C++0x [namespace.def]p9. If either context |
2244 | | /// isn't a namespace, this is equivalent to Equals(). |
2245 | | /// |
2246 | | /// The enclosing namespace set of a namespace is the namespace and, if it is |
2247 | | /// inline, its enclosing namespace, recursively. |
2248 | | bool InEnclosingNamespaceSetOf(const DeclContext *NS) const; |
2249 | | |
2250 | | /// Collects all of the declaration contexts that are semantically |
2251 | | /// connected to this declaration context. |
2252 | | /// |
2253 | | /// For declaration contexts that have multiple semantically connected but |
2254 | | /// syntactically distinct contexts, such as C++ namespaces, this routine |
2255 | | /// retrieves the complete set of such declaration contexts in source order. |
2256 | | /// For example, given: |
2257 | | /// |
2258 | | /// \code |
2259 | | /// namespace N { |
2260 | | /// int x; |
2261 | | /// } |
2262 | | /// namespace N { |
2263 | | /// int y; |
2264 | | /// } |
2265 | | /// \endcode |
2266 | | /// |
2267 | | /// The \c Contexts parameter will contain both definitions of N. |
2268 | | /// |
2269 | | /// \param Contexts Will be cleared and set to the set of declaration |
2270 | | /// contexts that are semanticaly connected to this declaration context, |
2271 | | /// in source order, including this context (which may be the only result, |
2272 | | /// for non-namespace contexts). |
2273 | | void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts); |
2274 | | |
2275 | | /// decl_iterator - Iterates through the declarations stored |
2276 | | /// within this context. |
2277 | | class decl_iterator { |
2278 | | /// Current - The current declaration. |
2279 | | Decl *Current = nullptr; |
2280 | | |
2281 | | public: |
2282 | | using value_type = Decl *; |
2283 | | using reference = const value_type &; |
2284 | | using pointer = const value_type *; |
2285 | | using iterator_category = std::forward_iterator_tag; |
2286 | | using difference_type = std::ptrdiff_t; |
2287 | | |
2288 | 29.1M | decl_iterator() = default; |
2289 | 28.7M | explicit decl_iterator(Decl *C) : Current(C) {} |
2290 | | |
2291 | 255M | reference operator*() const { return Current; } |
2292 | | |
2293 | | // This doesn't meet the iterator requirements, but it's convenient |
2294 | 48.4k | value_type operator->() const { return Current; } |
2295 | | |
2296 | 142M | decl_iterator& operator++() { |
2297 | 142M | Current = Current->getNextDeclInContext(); |
2298 | 142M | return *this; |
2299 | 142M | } |
2300 | | |
2301 | 41 | decl_iterator operator++(int) { |
2302 | 41 | decl_iterator tmp(*this); |
2303 | 41 | ++(*this); |
2304 | 41 | return tmp; |
2305 | 41 | } |
2306 | | |
2307 | 1.22M | friend bool operator==(decl_iterator x, decl_iterator y) { |
2308 | 1.22M | return x.Current == y.Current; |
2309 | 1.22M | } |
2310 | | |
2311 | 107M | friend bool operator!=(decl_iterator x, decl_iterator y) { |
2312 | 107M | return x.Current != y.Current; |
2313 | 107M | } |
2314 | | }; |
2315 | | |
2316 | | using decl_range = llvm::iterator_range<decl_iterator>; |
2317 | | |
2318 | | /// decls_begin/decls_end - Iterate over the declarations stored in |
2319 | | /// this context. |
2320 | 16.0M | decl_range decls() const { return decl_range(decls_begin(), decls_end()); } |
2321 | | decl_iterator decls_begin() const; |
2322 | 19.4M | decl_iterator decls_end() const { return decl_iterator(); } |
2323 | | bool decls_empty() const; |
2324 | | |
2325 | | /// noload_decls_begin/end - Iterate over the declarations stored in this |
2326 | | /// context that are currently loaded; don't attempt to retrieve anything |
2327 | | /// from an external source. |
2328 | 1.80M | decl_range noload_decls() const { |
2329 | 1.80M | return decl_range(noload_decls_begin(), noload_decls_end()); |
2330 | 1.80M | } |
2331 | 1.80M | decl_iterator noload_decls_begin() const { return decl_iterator(FirstDecl); } |
2332 | 1.80M | decl_iterator noload_decls_end() const { return decl_iterator(); } |
2333 | | |
2334 | | /// specific_decl_iterator - Iterates over a subrange of |
2335 | | /// declarations stored in a DeclContext, providing only those that |
2336 | | /// are of type SpecificDecl (or a class derived from it). This |
2337 | | /// iterator is used, for example, to provide iteration over just |
2338 | | /// the fields within a RecordDecl (with SpecificDecl = FieldDecl). |
2339 | | template<typename SpecificDecl> |
2340 | | class specific_decl_iterator { |
2341 | | /// Current - The current, underlying declaration iterator, which |
2342 | | /// will either be NULL or will point to a declaration of |
2343 | | /// type SpecificDecl. |
2344 | | DeclContext::decl_iterator Current; |
2345 | | |
2346 | | /// SkipToNextDecl - Advances the current position up to the next |
2347 | | /// declaration of type SpecificDecl that also meets the criteria |
2348 | | /// required by Acceptable. |
2349 | 36.4M | void SkipToNextDecl() { |
2350 | 97.0M | while (*Current && !isa<SpecificDecl>(*Current)75.8M ) |
2351 | 60.6M | ++Current; |
2352 | 36.4M | } clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 272k | void SkipToNextDecl() { | 2350 | 272k | while (*Current && !isa<SpecificDecl>(*Current)158k ) | 2351 | 15 | ++Current; | 2352 | 272k | } |
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 24.3M | void SkipToNextDecl() { | 2350 | 70.0M | while (*Current && !isa<SpecificDecl>(*Current)55.0M ) | 2351 | 45.6M | ++Current; | 2352 | 24.3M | } |
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 9.34M | void SkipToNextDecl() { | 2350 | 18.9M | while (*Current && !isa<SpecificDecl>(*Current)14.0M ) | 2351 | 9.57M | ++Current; | 2352 | 9.34M | } |
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 47.2k | void SkipToNextDecl() { | 2350 | 247k | while (*Current && !isa<SpecificDecl>(*Current)226k ) | 2351 | 200k | ++Current; | 2352 | 47.2k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 1.17M | void SkipToNextDecl() { | 2350 | 4.84M | while (*Current && !isa<SpecificDecl>(*Current)4.16M ) | 2351 | 3.66M | ++Current; | 2352 | 1.17M | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 128k | void SkipToNextDecl() { | 2350 | 262k | while (*Current && !isa<SpecificDecl>(*Current)181k ) | 2351 | 133k | ++Current; | 2352 | 128k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 717k | void SkipToNextDecl() { | 2350 | 2.12M | while (*Current && !isa<SpecificDecl>(*Current)1.78M ) | 2351 | 1.40M | ++Current; | 2352 | 717k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 50.0k | void SkipToNextDecl() { | 2350 | 59.1k | while (*Current && !isa<SpecificDecl>(*Current)46.2k ) | 2351 | 9.12k | ++Current; | 2352 | 50.0k | } |
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 5 | void SkipToNextDecl() { | 2350 | 6 | while (*Current && !isa<SpecificDecl>(*Current)4 ) | 2351 | 1 | ++Current; | 2352 | 5 | } |
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 1.22k | void SkipToNextDecl() { | 2350 | 2.43k | while (*Current && !isa<SpecificDecl>(*Current)1.82k ) | 2351 | 1.21k | ++Current; | 2352 | 1.22k | } |
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 277k | void SkipToNextDecl() { | 2350 | 282k | while (*Current && !isa<SpecificDecl>(*Current)139k ) | 2351 | 5.12k | ++Current; | 2352 | 277k | } |
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 14.4k | void SkipToNextDecl() { | 2350 | 35.2k | while (*Current && !isa<SpecificDecl>(*Current)20.9k ) | 2351 | 20.8k | ++Current; | 2352 | 14.4k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::SkipToNextDecl() Line | Count | Source | 2349 | 282 | void SkipToNextDecl() { | 2350 | 2.82k | while (*Current && !isa<SpecificDecl>(*Current)2.64k ) | 2351 | 2.54k | ++Current; | 2352 | 282 | } |
|
2353 | | |
2354 | | public: |
2355 | | using value_type = SpecificDecl *; |
2356 | | // TODO: Add reference and pointer types (with some appropriate proxy type) |
2357 | | // if we ever have a need for them. |
2358 | | using reference = void; |
2359 | | using pointer = void; |
2360 | | using difference_type = |
2361 | | std::iterator_traits<DeclContext::decl_iterator>::difference_type; |
2362 | | using iterator_category = std::forward_iterator_tag; |
2363 | | |
2364 | 465k | specific_decl_iterator() = default; clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator() Line | Count | Source | 2364 | 275k | specific_decl_iterator() = default; |
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator() Line | Count | Source | 2364 | 190k | specific_decl_iterator() = default; |
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator() Line | Count | Source | 2364 | 12 | specific_decl_iterator() = default; |
|
2365 | | |
2366 | | /// specific_decl_iterator - Construct a new iterator over a |
2367 | | /// subset of the declarations the range [C, |
2368 | | /// end-of-declarations). If A is non-NULL, it is a pointer to a |
2369 | | /// member function of SpecificDecl that should return true for |
2370 | | /// all of the SpecificDecl instances that will be in the subset |
2371 | | /// of iterators. For example, if you want Objective-C instance |
2372 | | /// methods, SpecificDecl will be ObjCMethodDecl and A will be |
2373 | | /// &ObjCMethodDecl::isInstanceMethod. |
2374 | 21.5M | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { |
2375 | 21.5M | SkipToNextDecl(); |
2376 | 21.5M | } clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 839k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 839k | SkipToNextDecl(); | 2376 | 839k | } |
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 14.9M | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 14.9M | SkipToNextDecl(); | 2376 | 14.9M | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 85.5k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 85.5k | SkipToNextDecl(); | 2376 | 85.5k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 335k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 335k | SkipToNextDecl(); | 2376 | 335k | } |
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 4.95M | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 4.95M | SkipToNextDecl(); | 2376 | 4.95M | } |
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 196k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 196k | SkipToNextDecl(); | 2376 | 196k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 12.9k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 12.9k | SkipToNextDecl(); | 2376 | 12.9k | } |
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 2 | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 2 | SkipToNextDecl(); | 2376 | 2 | } |
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 1.22k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 1.22k | SkipToNextDecl(); | 2376 | 1.22k | } |
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 26.7k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 26.7k | SkipToNextDecl(); | 2376 | 26.7k | } |
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 142k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 142k | SkipToNextDecl(); | 2376 | 142k | } |
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 14.3k | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 14.3k | SkipToNextDecl(); | 2376 | 14.3k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2374 | 178 | explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2375 | 178 | SkipToNextDecl(); | 2376 | 178 | } |
|
2377 | | |
2378 | 14.6M | value_type operator*() const { return cast<SpecificDecl>(*Current); } clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator*() const Line | Count | Source | 2378 | 9.01M | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator*() const Line | Count | Source | 2378 | 399k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator*() const Line | Count | Source | 2378 | 47.7k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator*() const Line | Count | Source | 2378 | 382k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator*() const Line | Count | Source | 2378 | 4.48M | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator*() const Line | Count | Source | 2378 | 82.2k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator*() const Line | Count | Source | 2378 | 37.1k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator*() const Line | Count | Source | 2378 | 6 | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator*() const Line | Count | Source | 2378 | 610 | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator*() const Line | Count | Source | 2378 | 26.1k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator*() const Line | Count | Source | 2378 | 134k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::operator*() const Line | Count | Source | 2378 | 151 | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator*() const Line | Count | Source | 2378 | 104 | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
|
2379 | | |
2380 | | // This doesn't meet the iterator requirements, but it's convenient |
2381 | 2.45M | value_type operator->() const { return **this; } clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator->() const Line | Count | Source | 2381 | 2.93k | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator->() const Line | Count | Source | 2381 | 2.45M | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator->() const Line | Count | Source | 2381 | 3 | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator->() const Line | Count | Source | 2381 | 610 | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator->() const Line | Count | Source | 2381 | 95 | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator->() const Line | Count | Source | 2381 | 38 | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator->() const Line | Count | Source | 2381 | 6 | value_type operator->() const { return **this; } |
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator->() const Line | Count | Source | 2381 | 104 | value_type operator->() const { return **this; } |
|
2382 | | |
2383 | 14.8M | specific_decl_iterator& operator++() { |
2384 | 14.8M | ++Current; |
2385 | 14.8M | SkipToNextDecl(); |
2386 | 14.8M | return *this; |
2387 | 14.8M | } clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator++() Line | Count | Source | 2383 | 9.43M | specific_decl_iterator& operator++() { | 2384 | 9.43M | ++Current; | 2385 | 9.43M | SkipToNextDecl(); | 2386 | 9.43M | return *this; | 2387 | 9.43M | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator++() Line | Count | Source | 2383 | 337k | specific_decl_iterator& operator++() { | 2384 | 337k | ++Current; | 2385 | 337k | SkipToNextDecl(); | 2386 | 337k | return *this; | 2387 | 337k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator++() Line | Count | Source | 2383 | 43.3k | specific_decl_iterator& operator++() { | 2384 | 43.3k | ++Current; | 2385 | 43.3k | SkipToNextDecl(); | 2386 | 43.3k | return *this; | 2387 | 43.3k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator++() Line | Count | Source | 2383 | 382k | specific_decl_iterator& operator++() { | 2384 | 382k | ++Current; | 2385 | 382k | SkipToNextDecl(); | 2386 | 382k | return *this; | 2387 | 382k | } |
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator++() Line | Count | Source | 2383 | 4.39M | specific_decl_iterator& operator++() { | 2384 | 4.39M | ++Current; | 2385 | 4.39M | SkipToNextDecl(); | 2386 | 4.39M | return *this; | 2387 | 4.39M | } |
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator++() Line | Count | Source | 2383 | 76.5k | specific_decl_iterator& operator++() { | 2384 | 76.5k | ++Current; | 2385 | 76.5k | SkipToNextDecl(); | 2386 | 76.5k | return *this; | 2387 | 76.5k | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator++() Line | Count | Source | 2383 | 37.1k | specific_decl_iterator& operator++() { | 2384 | 37.1k | ++Current; | 2385 | 37.1k | SkipToNextDecl(); | 2386 | 37.1k | return *this; | 2387 | 37.1k | } |
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator++() Line | Count | Source | 2383 | 3 | specific_decl_iterator& operator++() { | 2384 | 3 | ++Current; | 2385 | 3 | SkipToNextDecl(); | 2386 | 3 | return *this; | 2387 | 3 | } |
Unexecuted instantiation: clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator++() clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator++() Line | Count | Source | 2383 | 20.5k | specific_decl_iterator& operator++() { | 2384 | 20.5k | ++Current; | 2385 | 20.5k | SkipToNextDecl(); | 2386 | 20.5k | return *this; | 2387 | 20.5k | } |
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator++() Line | Count | Source | 2383 | 134k | specific_decl_iterator& operator++() { | 2384 | 134k | ++Current; | 2385 | 134k | SkipToNextDecl(); | 2386 | 134k | return *this; | 2387 | 134k | } |
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::operator++() Line | Count | Source | 2383 | 151 | specific_decl_iterator& operator++() { | 2384 | 151 | ++Current; | 2385 | 151 | SkipToNextDecl(); | 2386 | 151 | return *this; | 2387 | 151 | } |
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator++() Line | Count | Source | 2383 | 104 | specific_decl_iterator& operator++() { | 2384 | 104 | ++Current; | 2385 | 104 | SkipToNextDecl(); | 2386 | 104 | return *this; | 2387 | 104 | } |
|
2388 | | |
2389 | 7.91k | specific_decl_iterator operator++(int) { |
2390 | 7.91k | specific_decl_iterator tmp(*this); |
2391 | 7.91k | ++(*this); |
2392 | 7.91k | return tmp; |
2393 | 7.91k | } |
2394 | | |
2395 | | friend bool operator==(const specific_decl_iterator& x, |
2396 | 1.22M | const specific_decl_iterator& y) { |
2397 | 1.22M | return x.Current == y.Current; |
2398 | 1.22M | } clang::operator==(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&) Line | Count | Source | 2396 | 841k | const specific_decl_iterator& y) { | 2397 | 841k | return x.Current == y.Current; | 2398 | 841k | } |
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&) Line | Count | Source | 2396 | 54 | const specific_decl_iterator& y) { | 2397 | 54 | return x.Current == y.Current; | 2398 | 54 | } |
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&) Line | Count | Source | 2396 | 80.0k | const specific_decl_iterator& y) { | 2397 | 80.0k | return x.Current == y.Current; | 2398 | 80.0k | } |
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&) Line | Count | Source | 2396 | 298k | const specific_decl_iterator& y) { | 2397 | 298k | return x.Current == y.Current; | 2398 | 298k | } |
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&) Line | Count | Source | 2396 | 214 | const specific_decl_iterator& y) { | 2397 | 214 | return x.Current == y.Current; | 2398 | 214 | } |
|
2399 | | |
2400 | | friend bool operator!=(const specific_decl_iterator& x, |
2401 | 23.2M | const specific_decl_iterator& y) { |
2402 | 23.2M | return x.Current != y.Current; |
2403 | 23.2M | } clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&) Line | Count | Source | 2401 | 14.9M | const specific_decl_iterator& y) { | 2402 | 14.9M | return x.Current != y.Current; | 2403 | 14.9M | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&) Line | Count | Source | 2401 | 449k | const specific_decl_iterator& y) { | 2402 | 449k | return x.Current != y.Current; | 2403 | 449k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&) Line | Count | Source | 2401 | 86.1k | const specific_decl_iterator& y) { | 2402 | 86.1k | return x.Current != y.Current; | 2403 | 86.1k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&) Line | Count | Source | 2401 | 549k | const specific_decl_iterator& y) { | 2402 | 549k | return x.Current != y.Current; | 2403 | 549k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&) Line | Count | Source | 2401 | 6.86M | const specific_decl_iterator& y) { | 2402 | 6.86M | return x.Current != y.Current; | 2403 | 6.86M | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&) Line | Count | Source | 2401 | 94.5k | const specific_decl_iterator& y) { | 2402 | 94.5k | return x.Current != y.Current; | 2403 | 94.5k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&) Line | Count | Source | 2401 | 43.5k | const specific_decl_iterator& y) { | 2402 | 43.5k | return x.Current != y.Current; | 2403 | 43.5k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&, clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&) Line | Count | Source | 2401 | 4 | const specific_decl_iterator& y) { | 2402 | 4 | return x.Current != y.Current; | 2403 | 4 | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&) Line | Count | Source | 2401 | 610 | const specific_decl_iterator& y) { | 2402 | 610 | return x.Current != y.Current; | 2403 | 610 | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&) Line | Count | Source | 2401 | 33.8k | const specific_decl_iterator& y) { | 2402 | 33.8k | return x.Current != y.Current; | 2403 | 33.8k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&) Line | Count | Source | 2401 | 205k | const specific_decl_iterator& y) { | 2402 | 205k | return x.Current != y.Current; | 2403 | 205k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::TypeDecl> const&, clang::DeclContext::specific_decl_iterator<clang::TypeDecl> const&) Line | Count | Source | 2401 | 7.32k | const specific_decl_iterator& y) { | 2402 | 7.32k | return x.Current != y.Current; | 2403 | 7.32k | } |
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&) Line | Count | Source | 2401 | 193 | const specific_decl_iterator& y) { | 2402 | 193 | return x.Current != y.Current; | 2403 | 193 | } |
|
2404 | | }; |
2405 | | |
2406 | | /// Iterates over a filtered subrange of declarations stored |
2407 | | /// in a DeclContext. |
2408 | | /// |
2409 | | /// This iterator visits only those declarations that are of type |
2410 | | /// SpecificDecl (or a class derived from it) and that meet some |
2411 | | /// additional run-time criteria. This iterator is used, for |
2412 | | /// example, to provide access to the instance methods within an |
2413 | | /// Objective-C interface (with SpecificDecl = ObjCMethodDecl and |
2414 | | /// Acceptable = ObjCMethodDecl::isInstanceMethod). |
2415 | | template<typename SpecificDecl, bool (SpecificDecl::*Acceptable)() const> |
2416 | | class filtered_decl_iterator { |
2417 | | /// Current - The current, underlying declaration iterator, which |
2418 | | /// will either be NULL or will point to a declaration of |
2419 | | /// type SpecificDecl. |
2420 | | DeclContext::decl_iterator Current; |
2421 | | |
2422 | | /// SkipToNextDecl - Advances the current position up to the next |
2423 | | /// declaration of type SpecificDecl that also meets the criteria |
2424 | | /// required by Acceptable. |
2425 | 213k | void SkipToNextDecl() { |
2426 | 354k | while (*Current && |
2427 | 354k | (239k !isa<SpecificDecl>(*Current)239k || |
2428 | 239k | (182k Acceptable182k && !(cast<SpecificDecl>(*Current)->*Acceptable)()182k ))) |
2429 | 140k | ++Current; |
2430 | 213k | } clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::SkipToNextDecl() Line | Count | Source | 2425 | 138k | void SkipToNextDecl() { | 2426 | 177k | while (*Current && | 2427 | 177k | (117k !isa<SpecificDecl>(*Current)117k || | 2428 | 117k | (93.6k Acceptable93.6k && !(cast<SpecificDecl>(*Current)->*Acceptable)()93.6k ))) | 2429 | 38.8k | ++Current; | 2430 | 138k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::SkipToNextDecl() Line | Count | Source | 2425 | 9.97k | void SkipToNextDecl() { | 2426 | 20.1k | while (*Current && | 2427 | 20.1k | (15.8k !isa<SpecificDecl>(*Current)15.8k || | 2428 | 15.8k | (5.91k Acceptable5.91k && !(cast<SpecificDecl>(*Current)->*Acceptable)()5.91k ))) | 2429 | 10.1k | ++Current; | 2430 | 9.97k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::SkipToNextDecl() Line | Count | Source | 2425 | 1.12k | void SkipToNextDecl() { | 2426 | 5.18k | while (*Current && | 2427 | 5.18k | (4.73k !isa<SpecificDecl>(*Current)4.73k || | 2428 | 4.73k | (1.34k Acceptable1.34k && !(cast<SpecificDecl>(*Current)->*Acceptable)()1.34k ))) | 2429 | 4.05k | ++Current; | 2430 | 1.12k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::SkipToNextDecl() Line | Count | Source | 2425 | 64.3k | void SkipToNextDecl() { | 2426 | 152k | while (*Current && | 2427 | 152k | (101k !isa<SpecificDecl>(*Current)101k || | 2428 | 101k | (82.0k Acceptable82.0k && !(cast<SpecificDecl>(*Current)->*Acceptable)()82.0k ))) | 2429 | 87.8k | ++Current; | 2430 | 64.3k | } |
|
2431 | | |
2432 | | public: |
2433 | | using value_type = SpecificDecl *; |
2434 | | // TODO: Add reference and pointer types (with some appropriate proxy type) |
2435 | | // if we ever have a need for them. |
2436 | | using reference = void; |
2437 | | using pointer = void; |
2438 | | using difference_type = |
2439 | | std::iterator_traits<DeclContext::decl_iterator>::difference_type; |
2440 | | using iterator_category = std::forward_iterator_tag; |
2441 | | |
2442 | | filtered_decl_iterator() = default; |
2443 | | |
2444 | | /// filtered_decl_iterator - Construct a new iterator over a |
2445 | | /// subset of the declarations the range [C, |
2446 | | /// end-of-declarations). If A is non-NULL, it is a pointer to a |
2447 | | /// member function of SpecificDecl that should return true for |
2448 | | /// all of the SpecificDecl instances that will be in the subset |
2449 | | /// of iterators. For example, if you want Objective-C instance |
2450 | | /// methods, SpecificDecl will be ObjCMethodDecl and A will be |
2451 | | /// &ObjCMethodDecl::isInstanceMethod. |
2452 | 117k | explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) { |
2453 | 117k | SkipToNextDecl(); |
2454 | 117k | } clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2452 | 59.8k | explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2453 | 59.8k | SkipToNextDecl(); | 2454 | 59.8k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2452 | 5.99k | explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2453 | 5.99k | SkipToNextDecl(); | 2454 | 5.99k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2452 | 880 | explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2453 | 880 | SkipToNextDecl(); | 2454 | 880 | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator) Line | Count | Source | 2452 | 50.7k | explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) { | 2453 | 50.7k | SkipToNextDecl(); | 2454 | 50.7k | } |
|
2455 | | |
2456 | 98.6k | value_type operator*() const { return cast<SpecificDecl>(*Current); } clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator*() const Line | Count | Source | 2456 | 5.71k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator*() const Line | Count | Source | 2456 | 678 | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator*() const Line | Count | Source | 2456 | 78.7k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator*() const Line | Count | Source | 2456 | 13.5k | value_type operator*() const { return cast<SpecificDecl>(*Current); } |
|
2457 | | value_type operator->() const { return cast<SpecificDecl>(*Current); } |
2458 | | |
2459 | 96.3k | filtered_decl_iterator& operator++() { |
2460 | 96.3k | ++Current; |
2461 | 96.3k | SkipToNextDecl(); |
2462 | 96.3k | return *this; |
2463 | 96.3k | } clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator++() Line | Count | Source | 2459 | 3.98k | filtered_decl_iterator& operator++() { | 2460 | 3.98k | ++Current; | 2461 | 3.98k | SkipToNextDecl(); | 2462 | 3.98k | return *this; | 2463 | 3.98k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator++() Line | Count | Source | 2459 | 249 | filtered_decl_iterator& operator++() { | 2460 | 249 | ++Current; | 2461 | 249 | SkipToNextDecl(); | 2462 | 249 | return *this; | 2463 | 249 | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator++() Line | Count | Source | 2459 | 78.5k | filtered_decl_iterator& operator++() { | 2460 | 78.5k | ++Current; | 2461 | 78.5k | SkipToNextDecl(); | 2462 | 78.5k | return *this; | 2463 | 78.5k | } |
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator++() Line | Count | Source | 2459 | 13.5k | filtered_decl_iterator& operator++() { | 2460 | 13.5k | ++Current; | 2461 | 13.5k | SkipToNextDecl(); | 2462 | 13.5k | return *this; | 2463 | 13.5k | } |
|
2464 | | |
2465 | | filtered_decl_iterator operator++(int) { |
2466 | | filtered_decl_iterator tmp(*this); |
2467 | | ++(*this); |
2468 | | return tmp; |
2469 | | } |
2470 | | |
2471 | | friend bool operator==(const filtered_decl_iterator& x, |
2472 | 87 | const filtered_decl_iterator& y) { |
2473 | 87 | return x.Current == y.Current; |
2474 | 87 | } clang::operator==(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&) Line | Count | Source | 2472 | 83 | const filtered_decl_iterator& y) { | 2473 | 83 | return x.Current == y.Current; | 2474 | 83 | } |
clang::operator==(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&) Line | Count | Source | 2472 | 4 | const filtered_decl_iterator& y) { | 2473 | 4 | return x.Current == y.Current; | 2474 | 4 | } |
|
2475 | | |
2476 | | friend bool operator!=(const filtered_decl_iterator& x, |
2477 | 155k | const filtered_decl_iterator& y) { |
2478 | 155k | return x.Current != y.Current; |
2479 | 155k | } clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)> const&) Line | Count | Source | 2477 | 7.08k | const filtered_decl_iterator& y) { | 2478 | 7.08k | return x.Current != y.Current; | 2479 | 7.08k | } |
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)> const&) Line | Count | Source | 2477 | 689 | const filtered_decl_iterator& y) { | 2478 | 689 | return x.Current != y.Current; | 2479 | 689 | } |
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&) Line | Count | Source | 2477 | 108k | const filtered_decl_iterator& y) { | 2478 | 108k | return x.Current != y.Current; | 2479 | 108k | } |
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&) Line | Count | Source | 2477 | 39.0k | const filtered_decl_iterator& y) { | 2478 | 39.0k | return x.Current != y.Current; | 2479 | 39.0k | } |
|
2480 | | }; |
2481 | | |
2482 | | /// Add the declaration D into this context. |
2483 | | /// |
2484 | | /// This routine should be invoked when the declaration D has first |
2485 | | /// been declared, to place D into the context where it was |
2486 | | /// (lexically) defined. Every declaration must be added to one |
2487 | | /// (and only one!) context, where it can be visited via |
2488 | | /// [decls_begin(), decls_end()). Once a declaration has been added |
2489 | | /// to its lexical context, the corresponding DeclContext owns the |
2490 | | /// declaration. |
2491 | | /// |
2492 | | /// If D is also a NamedDecl, it will be made visible within its |
2493 | | /// semantic context via makeDeclVisibleInContext. |
2494 | | void addDecl(Decl *D); |
2495 | | |
2496 | | /// Add the declaration D into this context, but suppress |
2497 | | /// searches for external declarations with the same name. |
2498 | | /// |
2499 | | /// Although analogous in function to addDecl, this removes an |
2500 | | /// important check. This is only useful if the Decl is being |
2501 | | /// added in response to an external search; in all other cases, |
2502 | | /// addDecl() is the right function to use. |
2503 | | /// See the ASTImporter for use cases. |
2504 | | void addDeclInternal(Decl *D); |
2505 | | |
2506 | | /// Add the declaration D to this context without modifying |
2507 | | /// any lookup tables. |
2508 | | /// |
2509 | | /// This is useful for some operations in dependent contexts where |
2510 | | /// the semantic context might not be dependent; this basically |
2511 | | /// only happens with friends. |
2512 | | void addHiddenDecl(Decl *D); |
2513 | | |
2514 | | /// Removes a declaration from this context. |
2515 | | void removeDecl(Decl *D); |
2516 | | |
2517 | | /// Checks whether a declaration is in this context. |
2518 | | bool containsDecl(Decl *D) const; |
2519 | | |
2520 | | /// Checks whether a declaration is in this context. |
2521 | | /// This also loads the Decls from the external source before the check. |
2522 | | bool containsDeclAndLoad(Decl *D) const; |
2523 | | |
2524 | | using lookup_result = DeclContextLookupResult; |
2525 | | using lookup_iterator = lookup_result::iterator; |
2526 | | |
2527 | | /// lookup - Find the declarations (if any) with the given Name in |
2528 | | /// this context. Returns a range of iterators that contains all of |
2529 | | /// the declarations with this name, with object, function, member, |
2530 | | /// and enumerator names preceding any tag name. Note that this |
2531 | | /// routine will not look into parent contexts. |
2532 | | lookup_result lookup(DeclarationName Name) const; |
2533 | | |
2534 | | /// Find the declarations with the given name that are visible |
2535 | | /// within this context; don't attempt to retrieve anything from an |
2536 | | /// external source. |
2537 | | lookup_result noload_lookup(DeclarationName Name); |
2538 | | |
2539 | | /// A simplistic name lookup mechanism that performs name lookup |
2540 | | /// into this declaration context without consulting the external source. |
2541 | | /// |
2542 | | /// This function should almost never be used, because it subverts the |
2543 | | /// usual relationship between a DeclContext and the external source. |
2544 | | /// See the ASTImporter for the (few, but important) use cases. |
2545 | | /// |
2546 | | /// FIXME: This is very inefficient; replace uses of it with uses of |
2547 | | /// noload_lookup. |
2548 | | void localUncachedLookup(DeclarationName Name, |
2549 | | SmallVectorImpl<NamedDecl *> &Results); |
2550 | | |
2551 | | /// Makes a declaration visible within this context. |
2552 | | /// |
2553 | | /// This routine makes the declaration D visible to name lookup |
2554 | | /// within this context and, if this is a transparent context, |
2555 | | /// within its parent contexts up to the first enclosing |
2556 | | /// non-transparent context. Making a declaration visible within a |
2557 | | /// context does not transfer ownership of a declaration, and a |
2558 | | /// declaration can be visible in many contexts that aren't its |
2559 | | /// lexical context. |
2560 | | /// |
2561 | | /// If D is a redeclaration of an existing declaration that is |
2562 | | /// visible from this context, as determined by |
2563 | | /// NamedDecl::declarationReplaces, the previous declaration will be |
2564 | | /// replaced with D. |
2565 | | void makeDeclVisibleInContext(NamedDecl *D); |
2566 | | |
2567 | | /// all_lookups_iterator - An iterator that provides a view over the results |
2568 | | /// of looking up every possible name. |
2569 | | class all_lookups_iterator; |
2570 | | |
2571 | | using lookups_range = llvm::iterator_range<all_lookups_iterator>; |
2572 | | |
2573 | | lookups_range lookups() const; |
2574 | | // Like lookups(), but avoids loading external declarations. |
2575 | | // If PreserveInternalState, avoids building lookup data structures too. |
2576 | | lookups_range noload_lookups(bool PreserveInternalState) const; |
2577 | | |
2578 | | /// Iterators over all possible lookups within this context. |
2579 | | all_lookups_iterator lookups_begin() const; |
2580 | | all_lookups_iterator lookups_end() const; |
2581 | | |
2582 | | /// Iterators over all possible lookups within this context that are |
2583 | | /// currently loaded; don't attempt to retrieve anything from an external |
2584 | | /// source. |
2585 | | all_lookups_iterator noload_lookups_begin() const; |
2586 | | all_lookups_iterator noload_lookups_end() const; |
2587 | | |
2588 | | struct udir_iterator; |
2589 | | |
2590 | | using udir_iterator_base = |
2591 | | llvm::iterator_adaptor_base<udir_iterator, lookup_iterator, |
2592 | | typename lookup_iterator::iterator_category, |
2593 | | UsingDirectiveDecl *>; |
2594 | | |
2595 | | struct udir_iterator : udir_iterator_base { |
2596 | 309M | udir_iterator(lookup_iterator I) : udir_iterator_base(I) {} |
2597 | | |
2598 | | UsingDirectiveDecl *operator*() const; |
2599 | | }; |
2600 | | |
2601 | | using udir_range = llvm::iterator_range<udir_iterator>; |
2602 | | |
2603 | | udir_range using_directives() const; |
2604 | | |
2605 | | // These are all defined in DependentDiagnostic.h. |
2606 | | class ddiag_iterator; |
2607 | | |
2608 | | using ddiag_range = llvm::iterator_range<DeclContext::ddiag_iterator>; |
2609 | | |
2610 | | inline ddiag_range ddiags() const; |
2611 | | |
2612 | | // Low-level accessors |
2613 | | |
2614 | | /// Mark that there are external lexical declarations that we need |
2615 | | /// to include in our lookup table (and that are not available as external |
2616 | | /// visible lookups). These extra lookup results will be found by walking |
2617 | | /// the lexical declarations of this context. This should be used only if |
2618 | | /// setHasExternalLexicalStorage() has been called on any decl context for |
2619 | | /// which this is the primary context. |
2620 | 87.9k | void setMustBuildLookupTable() { |
2621 | 87.9k | assert(this == getPrimaryContext() && |
2622 | 87.9k | "should only be called on primary context"); |
2623 | 87.9k | DeclContextBits.HasLazyExternalLexicalLookups = true; |
2624 | 87.9k | } |
2625 | | |
2626 | | /// Retrieve the internal representation of the lookup structure. |
2627 | | /// This may omit some names if we are lazily building the structure. |
2628 | 860k | StoredDeclsMap *getLookupPtr() const { return LookupPtr; } |
2629 | | |
2630 | | /// Ensure the lookup structure is fully-built and return it. |
2631 | | StoredDeclsMap *buildLookup(); |
2632 | | |
2633 | | /// Whether this DeclContext has external storage containing |
2634 | | /// additional declarations that are lexically in this context. |
2635 | 34.3M | bool hasExternalLexicalStorage() const { |
2636 | 34.3M | return DeclContextBits.ExternalLexicalStorage; |
2637 | 34.3M | } |
2638 | | |
2639 | | /// State whether this DeclContext has external storage for |
2640 | | /// declarations lexically in this context. |
2641 | 54.5M | void setHasExternalLexicalStorage(bool ES = true) const { |
2642 | 54.5M | DeclContextBits.ExternalLexicalStorage = ES; |
2643 | 54.5M | } |
2644 | | |
2645 | | /// Whether this DeclContext has external storage containing |
2646 | | /// additional declarations that are visible in this context. |
2647 | 410M | bool hasExternalVisibleStorage() const { |
2648 | 410M | return DeclContextBits.ExternalVisibleStorage; |
2649 | 410M | } |
2650 | | |
2651 | | /// State whether this DeclContext has external storage for |
2652 | | /// declarations visible in this context. |
2653 | 53.0M | void setHasExternalVisibleStorage(bool ES = true) const { |
2654 | 53.0M | DeclContextBits.ExternalVisibleStorage = ES; |
2655 | 53.0M | if (ES && LookupPtr357k ) |
2656 | 51.1k | DeclContextBits.NeedToReconcileExternalVisibleStorage = true; |
2657 | 53.0M | } |
2658 | | |
2659 | | /// Determine whether the given declaration is stored in the list of |
2660 | | /// declarations lexically within this context. |
2661 | 173k | bool isDeclInLexicalTraversal(const Decl *D) const { |
2662 | 173k | return D && (D->NextInContextAndBits.getPointer() || D == FirstDecl172k || |
2663 | 173k | D == LastDecl171k ); |
2664 | 173k | } |
2665 | | |
2666 | 103M | void setUseQualifiedLookup(bool use = true) const { |
2667 | 103M | DeclContextBits.UseQualifiedLookup = use; |
2668 | 103M | } |
2669 | | |
2670 | 25.9M | bool shouldUseQualifiedLookup() const { |
2671 | 25.9M | return DeclContextBits.UseQualifiedLookup; |
2672 | 25.9M | } |
2673 | | |
2674 | | static bool classof(const Decl *D); |
2675 | 0 | static bool classof(const DeclContext *D) { return true; } |
2676 | | |
2677 | | void dumpAsDecl() const; |
2678 | | void dumpAsDecl(const ASTContext *Ctx) const; |
2679 | | void dumpDeclContext() const; |
2680 | | void dumpLookups() const; |
2681 | | void dumpLookups(llvm::raw_ostream &OS, bool DumpDecls = false, |
2682 | | bool Deserialize = false) const; |
2683 | | |
2684 | | private: |
2685 | | /// Whether this declaration context has had externally visible |
2686 | | /// storage added since the last lookup. In this case, \c LookupPtr's |
2687 | | /// invariant may not hold and needs to be fixed before we perform |
2688 | | /// another lookup. |
2689 | 5.43M | bool hasNeedToReconcileExternalVisibleStorage() const { |
2690 | 5.43M | return DeclContextBits.NeedToReconcileExternalVisibleStorage; |
2691 | 5.43M | } |
2692 | | |
2693 | | /// State that this declaration context has had externally visible |
2694 | | /// storage added since the last lookup. In this case, \c LookupPtr's |
2695 | | /// invariant may not hold and needs to be fixed before we perform |
2696 | | /// another lookup. |
2697 | 52.6M | void setNeedToReconcileExternalVisibleStorage(bool Need = true) const { |
2698 | 52.6M | DeclContextBits.NeedToReconcileExternalVisibleStorage = Need; |
2699 | 52.6M | } |
2700 | | |
2701 | | /// If \c true, this context may have local lexical declarations |
2702 | | /// that are missing from the lookup table. |
2703 | 402M | bool hasLazyLocalLexicalLookups() const { |
2704 | 402M | return DeclContextBits.HasLazyLocalLexicalLookups; |
2705 | 402M | } |
2706 | | |
2707 | | /// If \c true, this context may have local lexical declarations |
2708 | | /// that are missing from the lookup table. |
2709 | 91.2M | void setHasLazyLocalLexicalLookups(bool HasLLLL = true) const { |
2710 | 91.2M | DeclContextBits.HasLazyLocalLexicalLookups = HasLLLL; |
2711 | 91.2M | } |
2712 | | |
2713 | | /// If \c true, the external source may have lexical declarations |
2714 | | /// that are missing from the lookup table. |
2715 | 399M | bool hasLazyExternalLexicalLookups() const { |
2716 | 399M | return DeclContextBits.HasLazyExternalLexicalLookups; |
2717 | 399M | } |
2718 | | |
2719 | | /// If \c true, the external source may have lexical declarations |
2720 | | /// that are missing from the lookup table. |
2721 | 52.6M | void setHasLazyExternalLexicalLookups(bool HasLELL = true) const { |
2722 | 52.6M | DeclContextBits.HasLazyExternalLexicalLookups = HasLELL; |
2723 | 52.6M | } |
2724 | | |
2725 | | void reconcileExternalVisibleStorage() const; |
2726 | | bool LoadLexicalDeclsFromExternalStorage() const; |
2727 | | |
2728 | | StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const; |
2729 | | |
2730 | | void loadLazyLocalLexicalLookups(); |
2731 | | void buildLookupImpl(DeclContext *DCtx, bool Internal); |
2732 | | void makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal, |
2733 | | bool Rediscoverable); |
2734 | | void makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal); |
2735 | | }; |
2736 | | |
2737 | 77.4M | inline bool Decl::isTemplateParameter() const { |
2738 | 77.4M | return getKind() == TemplateTypeParm || getKind() == NonTypeTemplateParm77.2M || |
2739 | 77.4M | getKind() == TemplateTemplateParm77.1M ; |
2740 | 77.4M | } |
2741 | | |
2742 | | // Specialization selected when ToTy is not a known subclass of DeclContext. |
2743 | | template <class ToTy, |
2744 | | bool IsKnownSubtype = ::std::is_base_of<DeclContext, ToTy>::value> |
2745 | | struct cast_convert_decl_context { |
2746 | 715M | static const ToTy *doit(const DeclContext *Val) { |
2747 | 715M | return static_cast<const ToTy*>(Decl::castFromDeclContext(Val)); |
2748 | 715M | } clang::cast_convert_decl_context<clang::Decl, false>::doit(clang::DeclContext const*) Line | Count | Source | 2746 | 711M | static const ToTy *doit(const DeclContext *Val) { | 2747 | 711M | return static_cast<const ToTy*>(Decl::castFromDeclContext(Val)); | 2748 | 711M | } |
clang::cast_convert_decl_context<clang::NamedDecl, false>::doit(clang::DeclContext const*) Line | Count | Source | 2746 | 4.59M | static const ToTy *doit(const DeclContext *Val) { | 2747 | 4.59M | return static_cast<const ToTy*>(Decl::castFromDeclContext(Val)); | 2748 | 4.59M | } |
Unexecuted instantiation: clang::cast_convert_decl_context<clang::TypedefNameDecl, false>::doit(clang::DeclContext const*) clang::cast_convert_decl_context<clang::TypeDecl, false>::doit(clang::DeclContext const*) Line | Count | Source | 2746 | 115 | static const ToTy *doit(const DeclContext *Val) { | 2747 | 115 | return static_cast<const ToTy*>(Decl::castFromDeclContext(Val)); | 2748 | 115 | } |
|
2749 | | |
2750 | 4.96G | static ToTy *doit(DeclContext *Val) { |
2751 | 4.96G | return static_cast<ToTy*>(Decl::castFromDeclContext(Val)); |
2752 | 4.96G | } clang::cast_convert_decl_context<clang::Decl, false>::doit(clang::DeclContext*) Line | Count | Source | 2750 | 4.95G | static ToTy *doit(DeclContext *Val) { | 2751 | 4.95G | return static_cast<ToTy*>(Decl::castFromDeclContext(Val)); | 2752 | 4.95G | } |
clang::cast_convert_decl_context<clang::TypeDecl, false>::doit(clang::DeclContext*) Line | Count | Source | 2750 | 4.10k | static ToTy *doit(DeclContext *Val) { | 2751 | 4.10k | return static_cast<ToTy*>(Decl::castFromDeclContext(Val)); | 2752 | 4.10k | } |
clang::cast_convert_decl_context<clang::NamedDecl, false>::doit(clang::DeclContext*) Line | Count | Source | 2750 | 5.47M | static ToTy *doit(DeclContext *Val) { | 2751 | 5.47M | return static_cast<ToTy*>(Decl::castFromDeclContext(Val)); | 2752 | 5.47M | } |
Unexecuted instantiation: clang::cast_convert_decl_context<clang::VarTemplatePartialSpecializationDecl, false>::doit(clang::DeclContext*) Unexecuted instantiation: clang::cast_convert_decl_context<clang::TemplateDecl, false>::doit(clang::DeclContext*) |
2753 | | }; |
2754 | | |
2755 | | // Specialization selected when ToTy is a known subclass of DeclContext. |
2756 | | template <class ToTy> |
2757 | | struct cast_convert_decl_context<ToTy, true> { |
2758 | 685M | static const ToTy *doit(const DeclContext *Val) { |
2759 | 685M | return static_cast<const ToTy*>(Val); |
2760 | 685M | } clang::cast_convert_decl_context<clang::RecordDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 7.29M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 7.29M | return static_cast<const ToTy*>(Val); | 2760 | 7.29M | } |
clang::cast_convert_decl_context<clang::FunctionDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 100M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 100M | return static_cast<const ToTy*>(Val); | 2760 | 100M | } |
clang::cast_convert_decl_context<clang::CXXRecordDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 156M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 156M | return static_cast<const ToTy*>(Val); | 2760 | 156M | } |
clang::cast_convert_decl_context<clang::ObjCInterfaceDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 362k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 362k | return static_cast<const ToTy*>(Val); | 2760 | 362k | } |
clang::cast_convert_decl_context<clang::ObjCCategoryDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 12.9k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 12.9k | return static_cast<const ToTy*>(Val); | 2760 | 12.9k | } |
clang::cast_convert_decl_context<clang::ObjCImplDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 342 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 342 | return static_cast<const ToTy*>(Val); | 2760 | 342 | } |
clang::cast_convert_decl_context<clang::CXXMethodDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 23.5M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 23.5M | return static_cast<const ToTy*>(Val); | 2760 | 23.5M | } |
clang::cast_convert_decl_context<clang::ClassTemplateSpecializationDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 82.0k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 82.0k | return static_cast<const ToTy*>(Val); | 2760 | 82.0k | } |
clang::cast_convert_decl_context<clang::TranslationUnitDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 332M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 332M | return static_cast<const ToTy*>(Val); | 2760 | 332M | } |
clang::cast_convert_decl_context<clang::NamespaceDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 22.2M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 22.2M | return static_cast<const ToTy*>(Val); | 2760 | 22.2M | } |
clang::cast_convert_decl_context<clang::BlockDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 250 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 250 | return static_cast<const ToTy*>(Val); | 2760 | 250 | } |
clang::cast_convert_decl_context<clang::EnumDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 9.17M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 9.17M | return static_cast<const ToTy*>(Val); | 2760 | 9.17M | } |
clang::cast_convert_decl_context<clang::LinkageSpecDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 32.8M | static const ToTy *doit(const DeclContext *Val) { | 2759 | 32.8M | return static_cast<const ToTy*>(Val); | 2760 | 32.8M | } |
clang::cast_convert_decl_context<clang::ObjCProtocolDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 25.7k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 25.7k | return static_cast<const ToTy*>(Val); | 2760 | 25.7k | } |
Unexecuted instantiation: clang::cast_convert_decl_context<clang::ObjCProtocolDecl const, true>::doit(clang::DeclContext const*) clang::cast_convert_decl_context<clang::ObjCInterfaceDecl const, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 189 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 189 | return static_cast<const ToTy*>(Val); | 2760 | 189 | } |
clang::cast_convert_decl_context<clang::ObjCContainerDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 591k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 591k | return static_cast<const ToTy*>(Val); | 2760 | 591k | } |
clang::cast_convert_decl_context<clang::ObjCCategoryImplDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 36 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 36 | return static_cast<const ToTy*>(Val); | 2760 | 36 | } |
clang::cast_convert_decl_context<clang::CXXConstructorDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 81 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 81 | return static_cast<const ToTy*>(Val); | 2760 | 81 | } |
clang::cast_convert_decl_context<clang::CXXDestructorDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 10 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 10 | return static_cast<const ToTy*>(Val); | 2760 | 10 | } |
clang::cast_convert_decl_context<clang::ObjCMethodDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 720 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 720 | return static_cast<const ToTy*>(Val); | 2760 | 720 | } |
clang::cast_convert_decl_context<clang::TagDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 1.88k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 1.88k | return static_cast<const ToTy*>(Val); | 2760 | 1.88k | } |
clang::cast_convert_decl_context<clang::CapturedDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 3.92k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 3.92k | return static_cast<const ToTy*>(Val); | 2760 | 3.92k | } |
clang::cast_convert_decl_context<clang::ExportDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 4 | static const ToTy *doit(const DeclContext *Val) { | 2759 | 4 | return static_cast<const ToTy*>(Val); | 2760 | 4 | } |
clang::cast_convert_decl_context<clang::ObjCImplementationDecl, true>::doit(clang::DeclContext const*) Line | Count | Source | 2758 | 1.11k | static const ToTy *doit(const DeclContext *Val) { | 2759 | 1.11k | return static_cast<const ToTy*>(Val); | 2760 | 1.11k | } |
|
2761 | | |
2762 | 4.76G | static ToTy *doit(DeclContext *Val) { |
2763 | 4.76G | return static_cast<ToTy*>(Val); |
2764 | 4.76G | } clang::cast_convert_decl_context<clang::RecordDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 1.87M | static ToTy *doit(DeclContext *Val) { | 2763 | 1.87M | return static_cast<ToTy*>(Val); | 2764 | 1.87M | } |
clang::cast_convert_decl_context<clang::CXXRecordDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 103M | static ToTy *doit(DeclContext *Val) { | 2763 | 103M | return static_cast<ToTy*>(Val); | 2764 | 103M | } |
clang::cast_convert_decl_context<clang::CXXMethodDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 30.3M | static ToTy *doit(DeclContext *Val) { | 2763 | 30.3M | return static_cast<ToTy*>(Val); | 2764 | 30.3M | } |
clang::cast_convert_decl_context<clang::TranslationUnitDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 4.20G | static ToTy *doit(DeclContext *Val) { | 2763 | 4.20G | return static_cast<ToTy*>(Val); | 2764 | 4.20G | } |
clang::cast_convert_decl_context<clang::ObjCInterfaceDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 9.47M | static ToTy *doit(DeclContext *Val) { | 2763 | 9.47M | return static_cast<ToTy*>(Val); | 2764 | 9.47M | } |
clang::cast_convert_decl_context<clang::ObjCProtocolDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 2.70M | static ToTy *doit(DeclContext *Val) { | 2763 | 2.70M | return static_cast<ToTy*>(Val); | 2764 | 2.70M | } |
clang::cast_convert_decl_context<clang::TagDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 338M | static ToTy *doit(DeclContext *Val) { | 2763 | 338M | return static_cast<ToTy*>(Val); | 2764 | 338M | } |
clang::cast_convert_decl_context<clang::FunctionDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 55.5M | static ToTy *doit(DeclContext *Val) { | 2763 | 55.5M | return static_cast<ToTy*>(Val); | 2764 | 55.5M | } |
clang::cast_convert_decl_context<clang::ObjCMethodDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 53.4k | static ToTy *doit(DeclContext *Val) { | 2763 | 53.4k | return static_cast<ToTy*>(Val); | 2764 | 53.4k | } |
clang::cast_convert_decl_context<clang::BlockDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 780 | static ToTy *doit(DeclContext *Val) { | 2763 | 780 | return static_cast<ToTy*>(Val); | 2764 | 780 | } |
clang::cast_convert_decl_context<clang::CapturedDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 41.5k | static ToTy *doit(DeclContext *Val) { | 2763 | 41.5k | return static_cast<ToTy*>(Val); | 2764 | 41.5k | } |
clang::cast_convert_decl_context<clang::ObjCCategoryDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 809k | static ToTy *doit(DeclContext *Val) { | 2763 | 809k | return static_cast<ToTy*>(Val); | 2764 | 809k | } |
clang::cast_convert_decl_context<clang::ObjCImplDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 69.0k | static ToTy *doit(DeclContext *Val) { | 2763 | 69.0k | return static_cast<ToTy*>(Val); | 2764 | 69.0k | } |
clang::cast_convert_decl_context<clang::ObjCCategoryImplDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 317 | static ToTy *doit(DeclContext *Val) { | 2763 | 317 | return static_cast<ToTy*>(Val); | 2764 | 317 | } |
clang::cast_convert_decl_context<clang::ObjCContainerDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 3.47M | static ToTy *doit(DeclContext *Val) { | 2763 | 3.47M | return static_cast<ToTy*>(Val); | 2764 | 3.47M | } |
clang::cast_convert_decl_context<clang::NamespaceDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 1.57M | static ToTy *doit(DeclContext *Val) { | 2763 | 1.57M | return static_cast<ToTy*>(Val); | 2764 | 1.57M | } |
clang::cast_convert_decl_context<clang::ClassTemplateSpecializationDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 13.0k | static ToTy *doit(DeclContext *Val) { | 2763 | 13.0k | return static_cast<ToTy*>(Val); | 2764 | 13.0k | } |
clang::cast_convert_decl_context<clang::EnumDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 23.4k | static ToTy *doit(DeclContext *Val) { | 2763 | 23.4k | return static_cast<ToTy*>(Val); | 2764 | 23.4k | } |
clang::cast_convert_decl_context<clang::CXXDeductionGuideDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 20 | static ToTy *doit(DeclContext *Val) { | 2763 | 20 | return static_cast<ToTy*>(Val); | 2764 | 20 | } |
clang::cast_convert_decl_context<clang::CXXConstructorDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 8.84k | static ToTy *doit(DeclContext *Val) { | 2763 | 8.84k | return static_cast<ToTy*>(Val); | 2764 | 8.84k | } |
Unexecuted instantiation: clang::cast_convert_decl_context<clang::ClassTemplatePartialSpecializationDecl, true>::doit(clang::DeclContext*) clang::cast_convert_decl_context<clang::LinkageSpecDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 13.7M | static ToTy *doit(DeclContext *Val) { | 2763 | 13.7M | return static_cast<ToTy*>(Val); | 2764 | 13.7M | } |
clang::cast_convert_decl_context<clang::ObjCImplementationDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 4.74k | static ToTy *doit(DeclContext *Val) { | 2763 | 4.74k | return static_cast<ToTy*>(Val); | 2764 | 4.74k | } |
clang::cast_convert_decl_context<clang::OMPDeclareReductionDecl, true>::doit(clang::DeclContext*) Line | Count | Source | 2762 | 2.12k | static ToTy *doit(DeclContext *Val) { | 2763 | 2.12k | return static_cast<ToTy*>(Val); | 2764 | 2.12k | } |
|
2765 | | }; |
2766 | | |
2767 | | } // namespace clang |
2768 | | |
2769 | | namespace llvm { |
2770 | | |
2771 | | /// isa<T>(DeclContext*) |
2772 | | template <typename To> |
2773 | | struct isa_impl<To, ::clang::DeclContext> { |
2774 | 20.6G | static bool doit(const ::clang::DeclContext &Val) { |
2775 | 20.6G | return To::classofKind(Val.getDeclKind()); |
2776 | 20.6G | } llvm::isa_impl<clang::Decl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 5.67G | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 5.67G | return To::classofKind(Val.getDeclKind()); | 2776 | 5.67G | } |
llvm::isa_impl<clang::EnumDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 240M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 240M | return To::classofKind(Val.getDeclKind()); | 2776 | 240M | } |
llvm::isa_impl<clang::RecordDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 61.9M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 61.9M | return To::classofKind(Val.getDeclKind()); | 2776 | 61.9M | } |
llvm::isa_impl<clang::CXXRecordDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 1.11G | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 1.11G | return To::classofKind(Val.getDeclKind()); | 2776 | 1.11G | } |
llvm::isa_impl<clang::FunctionDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 521M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 521M | return To::classofKind(Val.getDeclKind()); | 2776 | 521M | } |
llvm::isa_impl<clang::ObjCInterfaceDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 11.2M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 11.2M | return To::classofKind(Val.getDeclKind()); | 2776 | 11.2M | } |
llvm::isa_impl<clang::ObjCCategoryDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 2.00M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 2.00M | return To::classofKind(Val.getDeclKind()); | 2776 | 2.00M | } |
llvm::isa_impl<clang::ObjCImplDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 365k | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 365k | return To::classofKind(Val.getDeclKind()); | 2776 | 365k | } |
llvm::isa_impl<clang::CXXMethodDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 446M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 446M | return To::classofKind(Val.getDeclKind()); | 2776 | 446M | } |
llvm::isa_impl<clang::NamedDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 10.7M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 10.7M | return To::classofKind(Val.getDeclKind()); | 2776 | 10.7M | } |
llvm::isa_impl<clang::ClassTemplateSpecializationDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 1.44M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 1.44M | return To::classofKind(Val.getDeclKind()); | 2776 | 1.44M | } |
llvm::isa_impl<clang::NamespaceDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 40.6M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 40.6M | return To::classofKind(Val.getDeclKind()); | 2776 | 40.6M | } |
llvm::isa_impl<clang::TranslationUnitDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 4.58G | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 4.58G | return To::classofKind(Val.getDeclKind()); | 2776 | 4.58G | } |
llvm::isa_impl<clang::BlockDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 201M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 201M | return To::classofKind(Val.getDeclKind()); | 2776 | 201M | } |
llvm::isa_impl<clang::ObjCProtocolDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 5.34M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 5.34M | return To::classofKind(Val.getDeclKind()); | 2776 | 5.34M | } |
llvm::isa_impl<clang::TagDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 371M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 371M | return To::classofKind(Val.getDeclKind()); | 2776 | 371M | } |
llvm::isa_impl<clang::ExportDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 1.87G | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 1.87G | return To::classofKind(Val.getDeclKind()); | 2776 | 1.87G | } |
llvm::isa_impl<clang::ObjCMethodDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 85.1M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 85.1M | return To::classofKind(Val.getDeclKind()); | 2776 | 85.1M | } |
llvm::isa_impl<clang::CapturedDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 234M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 234M | return To::classofKind(Val.getDeclKind()); | 2776 | 234M | } |
llvm::isa_impl<clang::ClassTemplatePartialSpecializationDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 269M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 269M | return To::classofKind(Val.getDeclKind()); | 2776 | 269M | } |
llvm::isa_impl<clang::HLSLBufferDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 1.82G | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 1.82G | return To::classofKind(Val.getDeclKind()); | 2776 | 1.82G | } |
llvm::isa_impl<clang::LinkageSpecDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 2.56G | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 2.56G | return To::classofKind(Val.getDeclKind()); | 2776 | 2.56G | } |
llvm::isa_impl<clang::ObjCProtocolDecl const, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 189 | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 189 | return To::classofKind(Val.getDeclKind()); | 2776 | 189 | } |
llvm::isa_impl<clang::ObjCInterfaceDecl const, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 189 | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 189 | return To::classofKind(Val.getDeclKind()); | 2776 | 189 | } |
llvm::isa_impl<clang::ObjCContainerDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 50.7M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 50.7M | return To::classofKind(Val.getDeclKind()); | 2776 | 50.7M | } |
llvm::isa_impl<clang::ObjCCategoryImplDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 12.2k | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 12.2k | return To::classofKind(Val.getDeclKind()); | 2776 | 12.2k | } |
llvm::isa_impl<clang::OMPDeclareReductionDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 205M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 205M | return To::classofKind(Val.getDeclKind()); | 2776 | 205M | } |
llvm::isa_impl<clang::OMPDeclareMapperDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 29.7M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 29.7M | return To::classofKind(Val.getDeclKind()); | 2776 | 29.7M | } |
llvm::isa_impl<clang::CXXConstructorDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 301k | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 301k | return To::classofKind(Val.getDeclKind()); | 2776 | 301k | } |
llvm::isa_impl<clang::CXXDestructorDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 280k | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 280k | return To::classofKind(Val.getDeclKind()); | 2776 | 280k | } |
llvm::isa_impl<clang::TypedefNameDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 69 | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 69 | return To::classofKind(Val.getDeclKind()); | 2776 | 69 | } |
llvm::isa_impl<clang::RequiresExprBodyDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 193M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 193M | return To::classofKind(Val.getDeclKind()); | 2776 | 193M | } |
llvm::isa_impl<clang::CXXDeductionGuideDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 1.53M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 1.53M | return To::classofKind(Val.getDeclKind()); | 2776 | 1.53M | } |
llvm::isa_impl<clang::TypeDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 605k | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 605k | return To::classofKind(Val.getDeclKind()); | 2776 | 605k | } |
llvm::isa_impl<clang::VarTemplatePartialSpecializationDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 5 | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 5 | return To::classofKind(Val.getDeclKind()); | 2776 | 5 | } |
llvm::isa_impl<clang::ObjCImplementationDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 278k | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 278k | return To::classofKind(Val.getDeclKind()); | 2776 | 278k | } |
llvm::isa_impl<clang::ClassTemplateDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 119 | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 119 | return To::classofKind(Val.getDeclKind()); | 2776 | 119 | } |
llvm::isa_impl<clang::TemplateDecl, clang::DeclContext, void>::doit(clang::DeclContext const&) Line | Count | Source | 2774 | 10.3M | static bool doit(const ::clang::DeclContext &Val) { | 2775 | 10.3M | return To::classofKind(Val.getDeclKind()); | 2776 | 10.3M | } |
|
2777 | | }; |
2778 | | |
2779 | | /// cast<T>(DeclContext*) |
2780 | | template<class ToTy> |
2781 | | struct cast_convert_val<ToTy, |
2782 | | const ::clang::DeclContext,const ::clang::DeclContext> { |
2783 | | static const ToTy &doit(const ::clang::DeclContext &Val) { |
2784 | | return *::clang::cast_convert_decl_context<ToTy>::doit(&Val); |
2785 | | } |
2786 | | }; |
2787 | | |
2788 | | template<class ToTy> |
2789 | | struct cast_convert_val<ToTy, ::clang::DeclContext, ::clang::DeclContext> { |
2790 | | static ToTy &doit(::clang::DeclContext &Val) { |
2791 | | return *::clang::cast_convert_decl_context<ToTy>::doit(&Val); |
2792 | | } |
2793 | | }; |
2794 | | |
2795 | | template<class ToTy> |
2796 | | struct cast_convert_val<ToTy, |
2797 | | const ::clang::DeclContext*, const ::clang::DeclContext*> { |
2798 | 1.40G | static const ToTy *doit(const ::clang::DeclContext *Val) { |
2799 | 1.40G | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); |
2800 | 1.40G | } llvm::cast_convert_val<clang::Decl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 711M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 711M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 711M | } |
llvm::cast_convert_val<clang::RecordDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 7.29M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 7.29M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 7.29M | } |
llvm::cast_convert_val<clang::FunctionDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 100M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 100M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 100M | } |
llvm::cast_convert_val<clang::CXXRecordDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 156M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 156M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 156M | } |
llvm::cast_convert_val<clang::ObjCInterfaceDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 362k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 362k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 362k | } |
llvm::cast_convert_val<clang::ObjCCategoryDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 12.9k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 12.9k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 12.9k | } |
llvm::cast_convert_val<clang::ObjCImplDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 342 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 342 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 342 | } |
llvm::cast_convert_val<clang::CXXMethodDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 23.5M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 23.5M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 23.5M | } |
llvm::cast_convert_val<clang::NamedDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 4.59M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 4.59M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 4.59M | } |
llvm::cast_convert_val<clang::ClassTemplateSpecializationDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 82.0k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 82.0k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 82.0k | } |
llvm::cast_convert_val<clang::TranslationUnitDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 332M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 332M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 332M | } |
llvm::cast_convert_val<clang::NamespaceDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 22.2M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 22.2M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 22.2M | } |
llvm::cast_convert_val<clang::BlockDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 250 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 250 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 250 | } |
llvm::cast_convert_val<clang::EnumDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 9.17M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 9.17M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 9.17M | } |
llvm::cast_convert_val<clang::LinkageSpecDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 32.8M | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 32.8M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 32.8M | } |
llvm::cast_convert_val<clang::ObjCProtocolDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 25.7k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 25.7k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 25.7k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::ObjCProtocolDecl const, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) llvm::cast_convert_val<clang::ObjCInterfaceDecl const, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 189 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 189 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 189 | } |
llvm::cast_convert_val<clang::ObjCContainerDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 591k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 591k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 591k | } |
llvm::cast_convert_val<clang::ObjCCategoryImplDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 36 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 36 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 36 | } |
llvm::cast_convert_val<clang::CXXConstructorDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 81 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 81 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 81 | } |
llvm::cast_convert_val<clang::CXXDestructorDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 10 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 10 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 10 | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::TypedefNameDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) llvm::cast_convert_val<clang::ObjCMethodDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 720 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 720 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 720 | } |
llvm::cast_convert_val<clang::TagDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 1.88k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 1.88k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 1.88k | } |
llvm::cast_convert_val<clang::TypeDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 115 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 115 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 115 | } |
llvm::cast_convert_val<clang::CapturedDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 3.92k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 3.92k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 3.92k | } |
llvm::cast_convert_val<clang::ExportDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 4 | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 4 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 4 | } |
llvm::cast_convert_val<clang::ObjCImplementationDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*) Line | Count | Source | 2798 | 1.11k | static const ToTy *doit(const ::clang::DeclContext *Val) { | 2799 | 1.11k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2800 | 1.11k | } |
|
2801 | | }; |
2802 | | |
2803 | | template<class ToTy> |
2804 | | struct cast_convert_val<ToTy, ::clang::DeclContext*, ::clang::DeclContext*> { |
2805 | 9.72G | static ToTy *doit(::clang::DeclContext *Val) { |
2806 | 9.72G | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); |
2807 | 9.72G | } llvm::cast_convert_val<clang::Decl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 4.95G | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 4.95G | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 4.95G | } |
llvm::cast_convert_val<clang::RecordDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 1.87M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 1.87M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 1.87M | } |
llvm::cast_convert_val<clang::CXXRecordDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 103M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 103M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 103M | } |
llvm::cast_convert_val<clang::CXXMethodDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 30.3M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 30.3M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 30.3M | } |
llvm::cast_convert_val<clang::TypeDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 4.10k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 4.10k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 4.10k | } |
llvm::cast_convert_val<clang::NamedDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 5.47M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 5.47M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 5.47M | } |
llvm::cast_convert_val<clang::TranslationUnitDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 4.20G | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 4.20G | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 4.20G | } |
llvm::cast_convert_val<clang::ObjCInterfaceDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 9.47M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 9.47M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 9.47M | } |
llvm::cast_convert_val<clang::ObjCProtocolDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 2.70M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 2.70M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 2.70M | } |
llvm::cast_convert_val<clang::TagDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 338M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 338M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 338M | } |
llvm::cast_convert_val<clang::FunctionDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 55.5M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 55.5M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 55.5M | } |
llvm::cast_convert_val<clang::ObjCMethodDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 53.4k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 53.4k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 53.4k | } |
llvm::cast_convert_val<clang::BlockDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 780 | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 780 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 780 | } |
llvm::cast_convert_val<clang::CapturedDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 41.5k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 41.5k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 41.5k | } |
llvm::cast_convert_val<clang::ObjCCategoryDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 809k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 809k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 809k | } |
llvm::cast_convert_val<clang::ObjCImplDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 69.0k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 69.0k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 69.0k | } |
llvm::cast_convert_val<clang::ObjCCategoryImplDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 317 | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 317 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 317 | } |
llvm::cast_convert_val<clang::ObjCContainerDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 3.47M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 3.47M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 3.47M | } |
llvm::cast_convert_val<clang::NamespaceDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 1.57M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 1.57M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 1.57M | } |
llvm::cast_convert_val<clang::ClassTemplateSpecializationDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 13.0k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 13.0k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 13.0k | } |
llvm::cast_convert_val<clang::EnumDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 23.4k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 23.4k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 23.4k | } |
llvm::cast_convert_val<clang::CXXDeductionGuideDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 20 | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 20 | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 20 | } |
llvm::cast_convert_val<clang::CXXConstructorDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 8.84k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 8.84k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 8.84k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::ClassTemplatePartialSpecializationDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Unexecuted instantiation: llvm::cast_convert_val<clang::VarTemplatePartialSpecializationDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) llvm::cast_convert_val<clang::LinkageSpecDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 13.7M | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 13.7M | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 13.7M | } |
llvm::cast_convert_val<clang::ObjCImplementationDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 4.74k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 4.74k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 4.74k | } |
llvm::cast_convert_val<clang::OMPDeclareReductionDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) Line | Count | Source | 2805 | 2.12k | static ToTy *doit(::clang::DeclContext *Val) { | 2806 | 2.12k | return ::clang::cast_convert_decl_context<ToTy>::doit(Val); | 2807 | 2.12k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::TemplateDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*) |
2808 | | }; |
2809 | | |
2810 | | /// Implement cast_convert_val for Decl -> DeclContext conversions. |
2811 | | template<class FromTy> |
2812 | | struct cast_convert_val< ::clang::DeclContext, FromTy, FromTy> { |
2813 | | static ::clang::DeclContext &doit(const FromTy &Val) { |
2814 | | return *FromTy::castToDeclContext(&Val); |
2815 | | } |
2816 | | }; |
2817 | | |
2818 | | template<class FromTy> |
2819 | | struct cast_convert_val< ::clang::DeclContext, FromTy*, FromTy*> { |
2820 | 68.1M | static ::clang::DeclContext *doit(const FromTy *Val) { |
2821 | 68.1M | return FromTy::castToDeclContext(Val); |
2822 | 68.1M | } llvm::cast_convert_val<clang::DeclContext, clang::Decl const*, clang::Decl const*>::doit(clang::Decl const*) Line | Count | Source | 2820 | 53.0M | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 53.0M | return FromTy::castToDeclContext(Val); | 2822 | 53.0M | } |
llvm::cast_convert_val<clang::DeclContext, clang::Decl*, clang::Decl*>::doit(clang::Decl const*) Line | Count | Source | 2820 | 12.9M | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 12.9M | return FromTy::castToDeclContext(Val); | 2822 | 12.9M | } |
llvm::cast_convert_val<clang::DeclContext, clang::ObjCContainerDecl const*, clang::ObjCContainerDecl const*>::doit(clang::ObjCContainerDecl const*) Line | Count | Source | 2820 | 30.8k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 30.8k | return FromTy::castToDeclContext(Val); | 2822 | 30.8k | } |
llvm::cast_convert_val<clang::DeclContext, clang::ObjCInterfaceDecl const*, clang::ObjCInterfaceDecl const*>::doit(clang::ObjCInterfaceDecl const*) Line | Count | Source | 2820 | 6.53k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 6.53k | return FromTy::castToDeclContext(Val); | 2822 | 6.53k | } |
llvm::cast_convert_val<clang::DeclContext, clang::NamedDecl*, clang::NamedDecl*>::doit(clang::NamedDecl const*) Line | Count | Source | 2820 | 1.69M | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 1.69M | return FromTy::castToDeclContext(Val); | 2822 | 1.69M | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::AccessSpecDecl*, clang::AccessSpecDecl*>::doit(clang::AccessSpecDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::BlockDecl*, clang::BlockDecl*>::doit(clang::BlockDecl const*) Line | Count | Source | 2820 | 45 | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 45 | return FromTy::castToDeclContext(Val); | 2822 | 45 | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CapturedDecl*, clang::CapturedDecl*>::doit(clang::CapturedDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::EmptyDecl*, clang::EmptyDecl*>::doit(clang::EmptyDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::ExportDecl*, clang::ExportDecl*>::doit(clang::ExportDecl const*) Line | Count | Source | 2820 | 17 | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 17 | return FromTy::castToDeclContext(Val); | 2822 | 17 | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ExternCContextDecl*, clang::ExternCContextDecl*>::doit(clang::ExternCContextDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FileScopeAsmDecl*, clang::FileScopeAsmDecl*>::doit(clang::FileScopeAsmDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FriendDecl*, clang::FriendDecl*>::doit(clang::FriendDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FriendTemplateDecl*, clang::FriendTemplateDecl*>::doit(clang::FriendTemplateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ImplicitConceptSpecializationDecl*, clang::ImplicitConceptSpecializationDecl*>::doit(clang::ImplicitConceptSpecializationDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ImportDecl*, clang::ImportDecl*>::doit(clang::ImportDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::LifetimeExtendedTemporaryDecl*, clang::LifetimeExtendedTemporaryDecl*>::doit(clang::LifetimeExtendedTemporaryDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::LinkageSpecDecl*, clang::LinkageSpecDecl*>::doit(clang::LinkageSpecDecl const*) Line | Count | Source | 2820 | 5.30k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 5.30k | return FromTy::castToDeclContext(Val); | 2822 | 5.30k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingDecl*, clang::UsingDecl*>::doit(clang::UsingDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingEnumDecl*, clang::UsingEnumDecl*>::doit(clang::UsingEnumDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::HLSLBufferDecl*, clang::HLSLBufferDecl*>::doit(clang::HLSLBufferDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::LabelDecl*, clang::LabelDecl*>::doit(clang::LabelDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::NamespaceDecl*, clang::NamespaceDecl*>::doit(clang::NamespaceDecl const*) Line | Count | Source | 2820 | 17.0k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 17.0k | return FromTy::castToDeclContext(Val); | 2822 | 17.0k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::NamespaceAliasDecl*, clang::NamespaceAliasDecl*>::doit(clang::NamespaceAliasDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCCompatibleAliasDecl*, clang::ObjCCompatibleAliasDecl*>::doit(clang::ObjCCompatibleAliasDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::ObjCCategoryDecl*, clang::ObjCCategoryDecl*>::doit(clang::ObjCCategoryDecl const*) Line | Count | Source | 2820 | 1.12k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 1.12k | return FromTy::castToDeclContext(Val); | 2822 | 1.12k | } |
llvm::cast_convert_val<clang::DeclContext, clang::ObjCCategoryImplDecl*, clang::ObjCCategoryImplDecl*>::doit(clang::ObjCCategoryImplDecl const*) Line | Count | Source | 2820 | 91 | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 91 | return FromTy::castToDeclContext(Val); | 2822 | 91 | } |
llvm::cast_convert_val<clang::DeclContext, clang::ObjCImplementationDecl*, clang::ObjCImplementationDecl*>::doit(clang::ObjCImplementationDecl const*) Line | Count | Source | 2820 | 2.25k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 2.25k | return FromTy::castToDeclContext(Val); | 2822 | 2.25k | } |
llvm::cast_convert_val<clang::DeclContext, clang::ObjCInterfaceDecl*, clang::ObjCInterfaceDecl*>::doit(clang::ObjCInterfaceDecl const*) Line | Count | Source | 2820 | 12.6k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 12.6k | return FromTy::castToDeclContext(Val); | 2822 | 12.6k | } |
llvm::cast_convert_val<clang::DeclContext, clang::ObjCProtocolDecl*, clang::ObjCProtocolDecl*>::doit(clang::ObjCProtocolDecl const*) Line | Count | Source | 2820 | 2.45k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 2.45k | return FromTy::castToDeclContext(Val); | 2822 | 2.45k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCMethodDecl*, clang::ObjCMethodDecl*>::doit(clang::ObjCMethodDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCPropertyDecl*, clang::ObjCPropertyDecl*>::doit(clang::ObjCPropertyDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::BuiltinTemplateDecl*, clang::BuiltinTemplateDecl*>::doit(clang::BuiltinTemplateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ConceptDecl*, clang::ConceptDecl*>::doit(clang::ConceptDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ClassTemplateDecl*, clang::ClassTemplateDecl*>::doit(clang::ClassTemplateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FunctionTemplateDecl*, clang::FunctionTemplateDecl*>::doit(clang::FunctionTemplateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TypeAliasTemplateDecl*, clang::TypeAliasTemplateDecl*>::doit(clang::TypeAliasTemplateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarTemplateDecl*, clang::VarTemplateDecl*>::doit(clang::VarTemplateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TemplateTemplateParmDecl*, clang::TemplateTemplateParmDecl*>::doit(clang::TemplateTemplateParmDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::EnumDecl*, clang::EnumDecl*>::doit(clang::EnumDecl const*) Line | Count | Source | 2820 | 10.5k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 10.5k | return FromTy::castToDeclContext(Val); | 2822 | 10.5k | } |
llvm::cast_convert_val<clang::DeclContext, clang::RecordDecl*, clang::RecordDecl*>::doit(clang::RecordDecl const*) Line | Count | Source | 2820 | 12.2k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 12.2k | return FromTy::castToDeclContext(Val); | 2822 | 12.2k | } |
llvm::cast_convert_val<clang::DeclContext, clang::CXXRecordDecl*, clang::CXXRecordDecl*>::doit(clang::CXXRecordDecl const*) Line | Count | Source | 2820 | 208k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 208k | return FromTy::castToDeclContext(Val); | 2822 | 208k | } |
llvm::cast_convert_val<clang::DeclContext, clang::ClassTemplateSpecializationDecl*, clang::ClassTemplateSpecializationDecl*>::doit(clang::ClassTemplateSpecializationDecl const*) Line | Count | Source | 2820 | 30.6k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 30.6k | return FromTy::castToDeclContext(Val); | 2822 | 30.6k | } |
llvm::cast_convert_val<clang::DeclContext, clang::ClassTemplatePartialSpecializationDecl*, clang::ClassTemplatePartialSpecializationDecl*>::doit(clang::ClassTemplatePartialSpecializationDecl const*) Line | Count | Source | 2820 | 11.0k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 11.0k | return FromTy::castToDeclContext(Val); | 2822 | 11.0k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TemplateTypeParmDecl*, clang::TemplateTypeParmDecl*>::doit(clang::TemplateTypeParmDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCTypeParamDecl*, clang::ObjCTypeParamDecl*>::doit(clang::ObjCTypeParamDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TypeAliasDecl*, clang::TypeAliasDecl*>::doit(clang::TypeAliasDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TypedefDecl*, clang::TypedefDecl*>::doit(clang::TypedefDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UnresolvedUsingTypenameDecl*, clang::UnresolvedUsingTypenameDecl*>::doit(clang::UnresolvedUsingTypenameDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UnresolvedUsingIfExistsDecl*, clang::UnresolvedUsingIfExistsDecl*>::doit(clang::UnresolvedUsingIfExistsDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingDirectiveDecl*, clang::UsingDirectiveDecl*>::doit(clang::UsingDirectiveDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingPackDecl*, clang::UsingPackDecl*>::doit(clang::UsingPackDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingShadowDecl*, clang::UsingShadowDecl*>::doit(clang::UsingShadowDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ConstructorUsingShadowDecl*, clang::ConstructorUsingShadowDecl*>::doit(clang::ConstructorUsingShadowDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::BindingDecl*, clang::BindingDecl*>::doit(clang::BindingDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FieldDecl*, clang::FieldDecl*>::doit(clang::FieldDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCAtDefsFieldDecl*, clang::ObjCAtDefsFieldDecl*>::doit(clang::ObjCAtDefsFieldDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCIvarDecl*, clang::ObjCIvarDecl*>::doit(clang::ObjCIvarDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::FunctionDecl*, clang::FunctionDecl*>::doit(clang::FunctionDecl const*) Line | Count | Source | 2820 | 576 | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 576 | return FromTy::castToDeclContext(Val); | 2822 | 576 | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXDeductionGuideDecl*, clang::CXXDeductionGuideDecl*>::doit(clang::CXXDeductionGuideDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXMethodDecl*, clang::CXXMethodDecl*>::doit(clang::CXXMethodDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXConstructorDecl*, clang::CXXConstructorDecl*>::doit(clang::CXXConstructorDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXConversionDecl*, clang::CXXConversionDecl*>::doit(clang::CXXConversionDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXDestructorDecl*, clang::CXXDestructorDecl*>::doit(clang::CXXDestructorDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::MSPropertyDecl*, clang::MSPropertyDecl*>::doit(clang::MSPropertyDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::NonTypeTemplateParmDecl*, clang::NonTypeTemplateParmDecl*>::doit(clang::NonTypeTemplateParmDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarDecl*, clang::VarDecl*>::doit(clang::VarDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::DecompositionDecl*, clang::DecompositionDecl*>::doit(clang::DecompositionDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ImplicitParamDecl*, clang::ImplicitParamDecl*>::doit(clang::ImplicitParamDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPCapturedExprDecl*, clang::OMPCapturedExprDecl*>::doit(clang::OMPCapturedExprDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ParmVarDecl*, clang::ParmVarDecl*>::doit(clang::ParmVarDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarTemplateSpecializationDecl*, clang::VarTemplateSpecializationDecl*>::doit(clang::VarTemplateSpecializationDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarTemplatePartialSpecializationDecl*, clang::VarTemplatePartialSpecializationDecl*>::doit(clang::VarTemplatePartialSpecializationDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::EnumConstantDecl*, clang::EnumConstantDecl*>::doit(clang::EnumConstantDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::IndirectFieldDecl*, clang::IndirectFieldDecl*>::doit(clang::IndirectFieldDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::MSGuidDecl*, clang::MSGuidDecl*>::doit(clang::MSGuidDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TemplateParamObjectDecl*, clang::TemplateParamObjectDecl*>::doit(clang::TemplateParamObjectDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UnnamedGlobalConstantDecl*, clang::UnnamedGlobalConstantDecl*>::doit(clang::UnnamedGlobalConstantDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UnresolvedUsingValueDecl*, clang::UnresolvedUsingValueDecl*>::doit(clang::UnresolvedUsingValueDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPAllocateDecl*, clang::OMPAllocateDecl*>::doit(clang::OMPAllocateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPRequiresDecl*, clang::OMPRequiresDecl*>::doit(clang::OMPRequiresDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPThreadPrivateDecl*, clang::OMPThreadPrivateDecl*>::doit(clang::OMPThreadPrivateDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCPropertyImplDecl*, clang::ObjCPropertyImplDecl*>::doit(clang::ObjCPropertyImplDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::PragmaCommentDecl*, clang::PragmaCommentDecl*>::doit(clang::PragmaCommentDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::PragmaDetectMismatchDecl*, clang::PragmaDetectMismatchDecl*>::doit(clang::PragmaDetectMismatchDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::RequiresExprBodyDecl*, clang::RequiresExprBodyDecl*>::doit(clang::RequiresExprBodyDecl const*) Line | Count | Source | 2820 | 133 | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 133 | return FromTy::castToDeclContext(Val); | 2822 | 133 | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::StaticAssertDecl*, clang::StaticAssertDecl*>::doit(clang::StaticAssertDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TopLevelStmtDecl*, clang::TopLevelStmtDecl*>::doit(clang::TopLevelStmtDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::TranslationUnitDecl*, clang::TranslationUnitDecl*>::doit(clang::TranslationUnitDecl const*) Line | Count | Source | 2820 | 43.7k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 43.7k | return FromTy::castToDeclContext(Val); | 2822 | 43.7k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPDeclareReductionDecl*, clang::OMPDeclareReductionDecl*>::doit(clang::OMPDeclareReductionDecl const*) Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPDeclareMapperDecl*, clang::OMPDeclareMapperDecl*>::doit(clang::OMPDeclareMapperDecl const*) llvm::cast_convert_val<clang::DeclContext, clang::ValueDecl*, clang::ValueDecl*>::doit(clang::ValueDecl const*) Line | Count | Source | 2820 | 1.43k | static ::clang::DeclContext *doit(const FromTy *Val) { | 2821 | 1.43k | return FromTy::castToDeclContext(Val); | 2822 | 1.43k | } |
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TagDecl*, clang::TagDecl*>::doit(clang::TagDecl const*) |
2823 | | }; |
2824 | | |
2825 | | template<class FromTy> |
2826 | | struct cast_convert_val< const ::clang::DeclContext, FromTy, FromTy> { |
2827 | | static const ::clang::DeclContext &doit(const FromTy &Val) { |
2828 | | return *FromTy::castToDeclContext(&Val); |
2829 | | } |
2830 | | }; |
2831 | | |
2832 | | template<class FromTy> |
2833 | | struct cast_convert_val< const ::clang::DeclContext, FromTy*, FromTy*> { |
2834 | | static const ::clang::DeclContext *doit(const FromTy *Val) { |
2835 | | return FromTy::castToDeclContext(Val); |
2836 | | } |
2837 | | }; |
2838 | | |
2839 | | } // namespace llvm |
2840 | | |
2841 | | #endif // LLVM_CLANG_AST_DECLBASE_H |