Coverage Report

Created: 2021-08-24 07:12

/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/Basic/IdentifierTable.h"
20
#include "clang/Basic/LLVM.h"
21
#include "clang/Basic/SourceLocation.h"
22
#include "clang/Basic/Specifiers.h"
23
#include "llvm/ADT/ArrayRef.h"
24
#include "llvm/ADT/PointerIntPair.h"
25
#include "llvm/ADT/PointerUnion.h"
26
#include "llvm/ADT/iterator.h"
27
#include "llvm/ADT/iterator_range.h"
28
#include "llvm/Support/Casting.h"
29
#include "llvm/Support/Compiler.h"
30
#include "llvm/Support/PrettyStackTrace.h"
31
#include "llvm/Support/VersionTuple.h"
32
#include <algorithm>
33
#include <cassert>
34
#include <cstddef>
35
#include <iterator>
36
#include <string>
37
#include <type_traits>
38
#include <utility>
39
40
namespace clang {
41
42
class ASTContext;
43
class ASTMutationListener;
44
class Attr;
45
class BlockDecl;
46
class DeclContext;
47
class ExternalSourceSymbolAttr;
48
class FunctionDecl;
49
class FunctionType;
50
class IdentifierInfo;
51
enum Linkage : unsigned char;
52
class LinkageSpecDecl;
53
class Module;
54
class NamedDecl;
55
class ObjCCategoryDecl;
56
class ObjCCategoryImplDecl;
57
class ObjCContainerDecl;
58
class ObjCImplDecl;
59
class ObjCImplementationDecl;
60
class ObjCInterfaceDecl;
61
class ObjCMethodDecl;
62
class ObjCProtocolDecl;
63
struct PrintingPolicy;
64
class RecordDecl;
65
class SourceManager;
66
class Stmt;
67
class StoredDeclsMap;
68
class TemplateDecl;
69
class TemplateParameterList;
70
class TranslationUnitDecl;
71
class UsingDirectiveDecl;
72
73
/// Captures the result of checking the availability of a
74
/// declaration.
75
enum AvailabilityResult {
76
  AR_Available = 0,
77
  AR_NotYetIntroduced,
78
  AR_Deprecated,
79
  AR_Unavailable
80
};
81
82
/// Decl - This represents one declaration (or definition), e.g. a variable,
83
/// typedef, function, struct, etc.
84
///
85
/// Note: There are objects tacked on before the *beginning* of Decl
86
/// (and its subclasses) in its Decl::operator new(). Proper alignment
87
/// of all subclasses (not requiring more than the alignment of Decl) is
88
/// asserted in DeclBase.cpp.
89
class alignas(8) Decl {
90
public:
91
  /// Lists the kind of concrete classes of Decl.
92
  enum Kind {
93
#define DECL(DERIVED, BASE) DERIVED,
94
#define ABSTRACT_DECL(DECL)
95
#define DECL_RANGE(BASE, START, END) \
96
        first##BASE = START, last##BASE = END,
97
#define LAST_DECL_RANGE(BASE, START, END) \
98
        first##BASE = START, last##BASE = END
99
#include "clang/AST/DeclNodes.inc"
100
  };
101
102
  /// A placeholder type used to construct an empty shell of a
103
  /// decl-derived type that will be filled in later (e.g., by some
104
  /// deserialization method).
105
  struct EmptyShell {};
106
107
  /// IdentifierNamespace - The different namespaces in which
108
  /// declarations may appear.  According to C99 6.2.3, there are
109
  /// four namespaces, labels, tags, members and ordinary
110
  /// identifiers.  C++ describes lookup completely differently:
111
  /// certain lookups merely "ignore" certain kinds of declarations,
112
  /// usually based on whether the declaration is of a type, etc.
113
  ///
114
  /// These are meant as bitmasks, so that searches in
115
  /// C++ can look into the "tag" namespace during ordinary lookup.
116
  ///
117
  /// Decl currently provides 15 bits of IDNS bits.
118
  enum IdentifierNamespace {
119
    /// Labels, declared with 'x:' and referenced with 'goto x'.
120
    IDNS_Label               = 0x0001,
121
122
    /// Tags, declared with 'struct foo;' and referenced with
123
    /// 'struct foo'.  All tags are also types.  This is what
124
    /// elaborated-type-specifiers look for in C.
125
    /// This also contains names that conflict with tags in the
126
    /// same scope but that are otherwise ordinary names (non-type
127
    /// template parameters and indirect field declarations).
128
    IDNS_Tag                 = 0x0002,
129
130
    /// Types, declared with 'struct foo', typedefs, etc.
131
    /// This is what elaborated-type-specifiers look for in C++,
132
    /// but note that it's ill-formed to find a non-tag.
133
    IDNS_Type                = 0x0004,
134
135
    /// Members, declared with object declarations within tag
136
    /// definitions.  In C, these can only be found by "qualified"
137
    /// lookup in member expressions.  In C++, they're found by
138
    /// normal lookup.
139
    IDNS_Member              = 0x0008,
140
141
    /// Namespaces, declared with 'namespace foo {}'.
142
    /// Lookup for nested-name-specifiers find these.
143
    IDNS_Namespace           = 0x0010,
144
145
    /// Ordinary names.  In C, everything that's not a label, tag,
146
    /// member, or function-local extern ends up here.
147
    IDNS_Ordinary            = 0x0020,
148
149
    /// Objective C \@protocol.
150
    IDNS_ObjCProtocol        = 0x0040,
151
152
    /// This declaration is a friend function.  A friend function
153
    /// declaration is always in this namespace but may also be in
154
    /// IDNS_Ordinary if it was previously declared.
155
    IDNS_OrdinaryFriend      = 0x0080,
156
157
    /// This declaration is a friend class.  A friend class
158
    /// declaration is always in this namespace but may also be in
159
    /// IDNS_Tag|IDNS_Type if it was previously declared.
160
    IDNS_TagFriend           = 0x0100,
161
162
    /// This declaration is a using declaration.  A using declaration
163
    /// *introduces* a number of other declarations into the current
164
    /// scope, and those declarations use the IDNS of their targets,
165
    /// but the actual using declarations go in this namespace.
166
    IDNS_Using               = 0x0200,
167
168
    /// This declaration is a C++ operator declared in a non-class
169
    /// context.  All such operators are also in IDNS_Ordinary.
170
    /// C++ lexical operator lookup looks for these.
171
    IDNS_NonMemberOperator   = 0x0400,
172
173
    /// This declaration is a function-local extern declaration of a
174
    /// variable or function. This may also be IDNS_Ordinary if it
175
    /// has been declared outside any function. These act mostly like
176
    /// invisible friend declarations, but are also visible to unqualified
177
    /// lookup within the scope of the declaring function.
178
    IDNS_LocalExtern         = 0x0800,
179
180
    /// This declaration is an OpenMP user defined reduction construction.
181
    IDNS_OMPReduction        = 0x1000,
182
183
    /// This declaration is an OpenMP user defined mapper.
184
    IDNS_OMPMapper           = 0x2000,
185
  };
186
187
  /// ObjCDeclQualifier - 'Qualifiers' written next to the return and
188
  /// parameter types in method declarations.  Other than remembering
189
  /// them and mangling them into the method's signature string, these
190
  /// are ignored by the compiler; they are consumed by certain
191
  /// remote-messaging frameworks.
192
  ///
193
  /// in, inout, and out are mutually exclusive and apply only to
194
  /// method parameters.  bycopy and byref are mutually exclusive and
195
  /// apply only to method parameters (?).  oneway applies only to
196
  /// results.  All of these expect their corresponding parameter to
197
  /// have a particular type.  None of this is currently enforced by
198
  /// clang.
199
  ///
200
  /// This should be kept in sync with ObjCDeclSpec::ObjCDeclQualifier.
201
  enum ObjCDeclQualifier {
202
    OBJC_TQ_None = 0x0,
203
    OBJC_TQ_In = 0x1,
204
    OBJC_TQ_Inout = 0x2,
205
    OBJC_TQ_Out = 0x4,
206
    OBJC_TQ_Bycopy = 0x8,
207
    OBJC_TQ_Byref = 0x10,
208
    OBJC_TQ_Oneway = 0x20,
209
210
    /// The nullability qualifier is set when the nullability of the
211
    /// result or parameter was expressed via a context-sensitive
212
    /// keyword.
213
    OBJC_TQ_CSNullability = 0x40
214
  };
215
216
  /// The kind of ownership a declaration has, for visibility purposes.
217
  /// This enumeration is designed such that higher values represent higher
218
  /// levels of name hiding.
219
  enum class ModuleOwnershipKind : unsigned {
220
    /// This declaration is not owned by a module.
221
    Unowned,
222
223
    /// This declaration has an owning module, but is globally visible
224
    /// (typically because its owning module is visible and we know that
225
    /// modules cannot later become hidden in this compilation).
226
    /// After serialization and deserialization, this will be converted
227
    /// to VisibleWhenImported.
228
    Visible,
229
230
    /// This declaration has an owning module, and is visible when that
231
    /// module is imported.
232
    VisibleWhenImported,
233
234
    /// This declaration has an owning module, but is only visible to
235
    /// lookups that occur within that module.
236
    ModulePrivate
237
  };
238
239
protected:
240
  /// The next declaration within the same lexical
241
  /// DeclContext. These pointers form the linked list that is
242
  /// traversed via DeclContext's decls_begin()/decls_end().
243
  ///
244
  /// The extra two bits are used for the ModuleOwnershipKind.
245
  llvm::PointerIntPair<Decl *, 2, ModuleOwnershipKind> NextInContextAndBits;
246
247
private:
248
  friend class DeclContext;
249
250
  struct MultipleDC {
251
    DeclContext *SemanticDC;
252
    DeclContext *LexicalDC;
253
  };
254
255
  /// DeclCtx - Holds either a DeclContext* or a MultipleDC*.
256
  /// For declarations that don't contain C++ scope specifiers, it contains
257
  /// the DeclContext where the Decl was declared.
258
  /// For declarations with C++ scope specifiers, it contains a MultipleDC*
259
  /// with the context where it semantically belongs (SemanticDC) and the
260
  /// context where it was lexically declared (LexicalDC).
261
  /// e.g.:
262
  ///
263
  ///   namespace A {
264
  ///      void f(); // SemanticDC == LexicalDC == 'namespace A'
265
  ///   }
266
  ///   void A::f(); // SemanticDC == namespace 'A'
267
  ///                // LexicalDC == global namespace
268
  llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
269
270
11.3G
  bool isInSemaDC() const { return DeclCtx.is<DeclContext*>(); }
271
0
  bool isOutOfSemaDC() const { return DeclCtx.is<MultipleDC*>(); }
272
273
133M
  MultipleDC *getMultipleDC() const {
274
133M
    return DeclCtx.get<MultipleDC*>();
275
133M
  }
276
277
11.1G
  DeclContext *getSemanticDC() const {
278
11.1G
    return DeclCtx.get<DeclContext*>();
279
11.1G
  }
280
281
  /// Loc - The location of this decl.
282
  SourceLocation Loc;
283
284
  /// DeclKind - This indicates which class this is.
285
  unsigned DeclKind : 7;
286
287
  /// InvalidDecl - This indicates a semantic error occurred.
288
  unsigned InvalidDecl :  1;
289
290
  /// HasAttrs - This indicates whether the decl has attributes or not.
291
  unsigned HasAttrs : 1;
292
293
  /// Implicit - Whether this declaration was implicitly generated by
294
  /// the implementation rather than explicitly written by the user.
295
  unsigned Implicit : 1;
296
297
  /// Whether this declaration was "used", meaning that a definition is
298
  /// required.
299
  unsigned Used : 1;
300
301
  /// Whether this declaration was "referenced".
302
  /// The difference with 'Used' is whether the reference appears in a
303
  /// evaluated context or not, e.g. functions used in uninstantiated templates
304
  /// are regarded as "referenced" but not "used".
305
  unsigned Referenced : 1;
306
307
  /// Whether this declaration is a top-level declaration (function,
308
  /// global variable, etc.) that is lexically inside an objc container
309
  /// definition.
310
  unsigned TopLevelDeclInObjCContainer : 1;
311
312
  /// Whether statistic collection is enabled.
313
  static bool StatisticsEnabled;
314
315
protected:
316
  friend class ASTDeclReader;
317
  friend class ASTDeclWriter;
318
  friend class ASTNodeImporter;
319
  friend class ASTReader;
320
  friend class CXXClassMemberWrapper;
321
  friend class LinkageComputer;
322
  template<typename decl_type> friend class Redeclarable;
323
324
  /// Access - Used by C++ decls for the access specifier.
325
  // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum
326
  unsigned Access : 2;
327
328
  /// Whether this declaration was loaded from an AST file.
329
  unsigned FromASTFile : 1;
330
331
  /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
332
  unsigned IdentifierNamespace : 14;
333
334
  /// If 0, we have not computed the linkage of this declaration.
335
  /// Otherwise, it is the linkage + 1.
336
  mutable unsigned CacheValidAndLinkage : 3;
337
338
  /// Allocate memory for a deserialized declaration.
339
  ///
340
  /// This routine must be used to allocate memory for any declaration that is
341
  /// deserialized from a module file.
342
  ///
343
  /// \param Size The size of the allocated object.
344
  /// \param Ctx The context in which we will allocate memory.
345
  /// \param ID The global ID of the deserialized declaration.
346
  /// \param Extra The amount of extra space to allocate after the object.
347
  void *operator new(std::size_t Size, const ASTContext &Ctx, unsigned ID,
348
                     std::size_t Extra = 0);
349
350
  /// Allocate memory for a non-deserialized declaration.
351
  void *operator new(std::size_t Size, const ASTContext &Ctx,
352
                     DeclContext *Parent, std::size_t Extra = 0);
353
354
private:
355
  bool AccessDeclContextSanity() const;
356
357
  /// Get the module ownership kind to use for a local lexical child of \p DC,
358
  /// which may be either a local or (rarely) an imported declaration.
359
174M
  static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) {
360
174M
    if (DC) {
361
166M
      auto *D = cast<Decl>(DC);
362
166M
      auto MOK = D->getModuleOwnershipKind();
363
166M
      if (MOK != ModuleOwnershipKind::Unowned &&
364
166M
          
(2.81M
!D->isFromASTFile()2.81M
||
D->hasLocalOwningModuleStorage()157k
))
365
2.68M
        return MOK;
366
      // If D is not local and we have no local module storage, then we don't
367
      // need to track module ownership at all.
368
166M
    }
369
171M
    return ModuleOwnershipKind::Unowned;
370
174M
  }
371
372
public:
373
  Decl() = delete;
374
  Decl(const Decl&) = delete;
375
  Decl(Decl &&) = delete;
376
  Decl &operator=(const Decl&) = delete;
377
  Decl &operator=(Decl&&) = delete;
378
379
protected:
380
  Decl(Kind DK, DeclContext *DC, SourceLocation L)
381
      : NextInContextAndBits(nullptr, getModuleOwnershipKindForChildOf(DC)),
382
        DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(false), HasAttrs(false),
383
        Implicit(false), Used(false), Referenced(false),
384
        TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0),
385
        IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
386
173M
        CacheValidAndLinkage(0) {
387
173M
    if (StatisticsEnabled) 
add(DK)61
;
388
173M
  }
389
390
  Decl(Kind DK, EmptyShell Empty)
391
      : DeclKind(DK), InvalidDecl(false), HasAttrs(false), Implicit(false),
392
        Used(false), Referenced(false), TopLevelDeclInObjCContainer(false),
393
        Access(AS_none), FromASTFile(0),
394
        IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
395
50.9k
        CacheValidAndLinkage(0) {
396
50.9k
    if (StatisticsEnabled) 
add(DK)0
;
397
50.9k
  }
398
399
  virtual ~Decl();
400
401
  /// Update a potentially out-of-date declaration.
402
  void updateOutOfDate(IdentifierInfo &II) const;
403
404
96.2M
  Linkage getCachedLinkage() const {
405
96.2M
    return Linkage(CacheValidAndLinkage - 1);
406
96.2M
  }
407
408
41.9M
  void setCachedLinkage(Linkage L) const {
409
41.9M
    CacheValidAndLinkage = L + 1;
410
41.9M
  }
411
412
181M
  bool hasCachedLinkage() const {
413
181M
    return CacheValidAndLinkage;
414
181M
  }
415
416
public:
417
  /// Source range that this declaration covers.
418
1.72k
  virtual SourceRange getSourceRange() const LLVM_READONLY {
419
1.72k
    return SourceRange(getLocation(), getLocation());
420
1.72k
  }
421
422
2.99M
  SourceLocation getBeginLoc() const LLVM_READONLY {
423
2.99M
    return getSourceRange().getBegin();
424
2.99M
  }
425
426
2.09M
  SourceLocation getEndLoc() const LLVM_READONLY {
427
2.09M
    return getSourceRange().getEnd();
428
2.09M
  }
429
430
382M
  SourceLocation getLocation() const { return Loc; }
431
8.38M
  void setLocation(SourceLocation L) { Loc = L; }
432
433
27.3G
  Kind getKind() const { return static_cast<Kind>(DeclKind); }
434
  const char *getDeclKindName() const;
435
436
255M
  Decl *getNextDeclInContext() { return NextInContextAndBits.getPointer(); }
437
4.07k
  const Decl *getNextDeclInContext() const {return NextInContextAndBits.getPointer();}
438
439
10.8G
  DeclContext *getDeclContext() {
440
10.8G
    if (isInSemaDC())
441
10.7G
      return getSemanticDC();
442
114M
    return getMultipleDC()->SemanticDC;
443
10.8G
  }
444
2.72G
  const DeclContext *getDeclContext() const {
445
2.72G
    return const_cast<Decl*>(this)->getDeclContext();
446
2.72G
  }
447
448
  /// Find the innermost non-closure ancestor of this declaration,
449
  /// walking up through blocks, lambdas, etc.  If that ancestor is
450
  /// not a code context (!isFunctionOrMethod()), returns null.
451
  ///
452
  /// A declaration may be its own non-closure context.
453
  Decl *getNonClosureContext();
454
367k
  const Decl *getNonClosureContext() const {
455
367k
    return const_cast<Decl*>(this)->getNonClosureContext();
456
367k
  }
457
458
  TranslationUnitDecl *getTranslationUnitDecl();
459
4.34G
  const TranslationUnitDecl *getTranslationUnitDecl() const {
460
4.34G
    return const_cast<Decl*>(this)->getTranslationUnitDecl();
461
4.34G
  }
462
463
  bool isInAnonymousNamespace() const;
464
465
  bool isInStdNamespace() const;
466
467
  ASTContext &getASTContext() const LLVM_READONLY;
468
469
  /// Helper to get the language options from the ASTContext.
470
  /// Defined out of line to avoid depending on ASTContext.h.
471
  const LangOptions &getLangOpts() const LLVM_READONLY;
472
473
28.4M
  void setAccess(AccessSpecifier AS) {
474
28.4M
    Access = AS;
475
28.4M
    assert(AccessDeclContextSanity());
476
28.4M
  }
477
478
515M
  AccessSpecifier getAccess() const {
479
515M
    assert(AccessDeclContextSanity());
480
0
    return AccessSpecifier(Access);
481
515M
  }
482
483
  /// Retrieve the access specifier for this declaration, even though
484
  /// it may not yet have been properly set.
485
33.9k
  AccessSpecifier getAccessUnsafe() const {
486
33.9k
    return AccessSpecifier(Access);
487
33.9k
  }
488
489
4.97G
  bool hasAttrs() const { return HasAttrs; }
490
491
37.0M
  void setAttrs(const AttrVec& Attrs) {
492
37.0M
    return setAttrsImpl(Attrs, getASTContext());
493
37.0M
  }
494
495
106M
  AttrVec &getAttrs() {
496
106M
    return const_cast<AttrVec&>(const_cast<const Decl*>(this)->getAttrs());
497
106M
  }
498
499
  const AttrVec &getAttrs() const;
500
  void dropAttrs();
501
  void addAttr(Attr *A);
502
503
  using attr_iterator = AttrVec::const_iterator;
504
  using attr_range = llvm::iterator_range<attr_iterator>;
505
506
174M
  attr_range attrs() const {
507
174M
    return attr_range(attr_begin(), attr_end());
508
174M
  }
509
510
354M
  attr_iterator attr_begin() const {
511
354M
    return hasAttrs() ? 
getAttrs().begin()42.3M
:
nullptr311M
;
512
354M
  }
513
354M
  attr_iterator attr_end() const {
514
354M
    return hasAttrs() ? 
getAttrs().end()42.3M
:
nullptr311M
;
515
354M
  }
516
517
  template <typename T>
518
11.4k
  void dropAttr() {
519
11.4k
    if (!HasAttrs) 
return8.77k
;
520
521
2.63k
    AttrVec &Vec = getAttrs();
522
2.68k
    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
522
1.96k
    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
522
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
522
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
522
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
522
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
522
3
    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
522
4
    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
522
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
522
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
522
2
    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
522
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
522
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
522
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
522
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
522
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
522
11
    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
522
6
    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
522
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
522
11
    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
522
6
    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
522
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
522
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
522
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
522
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
522
33
    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
522
10
    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
522
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
522
505
    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
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
2.63k
    if (Vec.empty())
525
1.85k
      HasAttrs = false;
526
2.63k
  }
void clang::Decl::dropAttr<clang::DLLImportAttr>()
Line
Count
Source
518
6.28k
  void dropAttr() {
519
6.28k
    if (!HasAttrs) 
return4.33k
;
520
521
1.95k
    AttrVec &Vec = getAttrs();
522
1.95k
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
1.95k
    if (Vec.empty())
525
1.49k
      HasAttrs = false;
526
1.95k
  }
void clang::Decl::dropAttr<clang::WeakAttr>()
Line
Count
Source
518
10
  void dropAttr() {
519
10
    if (!HasAttrs) 
return0
;
520
521
10
    AttrVec &Vec = getAttrs();
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
10
    if (Vec.empty())
525
10
      HasAttrs = false;
526
10
  }
void clang::Decl::dropAttr<clang::WeakRefAttr>()
Line
Count
Source
518
5
  void dropAttr() {
519
5
    if (!HasAttrs) 
return0
;
520
521
5
    AttrVec &Vec = getAttrs();
522
5
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
5
    if (Vec.empty())
525
2
      HasAttrs = false;
526
5
  }
void clang::Decl::dropAttr<clang::SelectAnyAttr>()
Line
Count
Source
518
19
  void dropAttr() {
519
19
    if (!HasAttrs) 
return0
;
520
521
19
    AttrVec &Vec = getAttrs();
522
19
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
19
    if (Vec.empty())
525
19
      HasAttrs = false;
526
19
  }
void clang::Decl::dropAttr<clang::ConstInitAttr>()
Line
Count
Source
518
12
  void dropAttr() {
519
12
    if (!HasAttrs) 
return0
;
520
521
12
    AttrVec &Vec = getAttrs();
522
12
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
12
    if (Vec.empty())
525
12
      HasAttrs = false;
526
12
  }
void clang::Decl::dropAttr<clang::InternalLinkageAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
3
    if (Vec.empty())
525
3
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::OverloadableAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
3
    if (Vec.empty())
525
2
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::WeakImportAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::AliasAttr>()
Line
Count
Source
518
5
  void dropAttr() {
519
5
    if (!HasAttrs) 
return0
;
520
521
5
    AttrVec &Vec = getAttrs();
522
5
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
5
    if (Vec.empty())
525
5
      HasAttrs = false;
526
5
  }
void clang::Decl::dropAttr<clang::SectionAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::UsedAttr>()
Line
Count
Source
518
4
  void dropAttr() {
519
4
    if (!HasAttrs) 
return0
;
520
521
4
    AttrVec &Vec = getAttrs();
522
4
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
4
    if (Vec.empty())
525
4
      HasAttrs = false;
526
4
  }
void clang::Decl::dropAttr<clang::RetainAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::IFuncAttr>()
Line
Count
Source
518
1
  void dropAttr() {
519
1
    if (!HasAttrs) 
return0
;
520
521
1
    AttrVec &Vec = getAttrs();
522
1
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
1
    if (Vec.empty())
525
1
      HasAttrs = false;
526
1
  }
Unexecuted instantiation: void clang::Decl::dropAttr<clang::CUDAConstantAttr>()
void clang::Decl::dropAttr<clang::NoBuiltinAttr>()
Line
Count
Source
518
8
  void dropAttr() {
519
8
    if (!HasAttrs) 
return0
;
520
521
8
    AttrVec &Vec = getAttrs();
522
8
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
8
    if (Vec.empty())
525
8
      HasAttrs = false;
526
8
  }
void clang::Decl::dropAttr<clang::CUDADeviceAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
6
    if (Vec.empty())
525
0
      HasAttrs = false;
526
6
  }
void clang::Decl::dropAttr<clang::CodeSegAttr>()
Line
Count
Source
518
8
  void dropAttr() {
519
8
    if (!HasAttrs) 
return0
;
520
521
8
    AttrVec &Vec = getAttrs();
522
8
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
8
    if (Vec.empty())
525
5
      HasAttrs = false;
526
8
  }
void clang::Decl::dropAttr<clang::EnforceTCBAttr>()
Line
Count
Source
518
5
  void dropAttr() {
519
5
    if (!HasAttrs) 
return0
;
520
521
5
    AttrVec &Vec = getAttrs();
522
5
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
5
    if (Vec.empty())
525
3
      HasAttrs = false;
526
5
  }
void clang::Decl::dropAttr<clang::VisibilityAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
6
    if (Vec.empty())
525
6
      HasAttrs = false;
526
6
  }
Unexecuted instantiation: void clang::Decl::dropAttr<clang::TypeVisibilityAttr>()
void clang::Decl::dropAttr<clang::SwiftNameAttr>()
Line
Count
Source
518
11
  void dropAttr() {
519
11
    if (!HasAttrs) 
return0
;
520
521
11
    AttrVec &Vec = getAttrs();
522
11
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
11
    if (Vec.empty())
525
11
      HasAttrs = false;
526
11
  }
void clang::Decl::dropAttr<clang::AlwaysInlineAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
6
    if (Vec.empty())
525
6
      HasAttrs = false;
526
6
  }
void clang::Decl::dropAttr<clang::MinSizeAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
3
    if (Vec.empty())
525
3
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::UuidAttr>()
Line
Count
Source
518
16
  void dropAttr() {
519
16
    if (!HasAttrs) 
return0
;
520
521
16
    AttrVec &Vec = getAttrs();
522
16
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
16
    if (Vec.empty())
525
16
      HasAttrs = false;
526
16
  }
void clang::Decl::dropAttr<clang::MSInheritanceAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
3
    if (Vec.empty())
525
3
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::ObjCDesignatedInitializerAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::TrivialABIAttr>()
Line
Count
Source
518
33
  void dropAttr() {
519
33
    if (!HasAttrs) 
return0
;
520
521
33
    AttrVec &Vec = getAttrs();
522
33
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
33
    if (Vec.empty())
525
33
      HasAttrs = false;
526
33
  }
void clang::Decl::dropAttr<clang::OverrideAttr>()
Line
Count
Source
518
10
  void dropAttr() {
519
10
    if (!HasAttrs) 
return0
;
520
521
10
    AttrVec &Vec = getAttrs();
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
10
    if (Vec.empty())
525
10
      HasAttrs = false;
526
10
  }
void clang::Decl::dropAttr<clang::FinalAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
6
    if (Vec.empty())
525
6
      HasAttrs = false;
526
6
  }
void clang::Decl::dropAttr<clang::DLLExportAttr>()
Line
Count
Source
518
4.93k
  void dropAttr() {
519
4.93k
    if (!HasAttrs) 
return4.44k
;
520
521
490
    AttrVec &Vec = getAttrs();
522
490
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
490
    if (Vec.empty())
525
182
      HasAttrs = false;
526
490
  }
void clang::Decl::dropAttr<clang::AvailabilityAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
524
6
    if (Vec.empty())
525
2
      HasAttrs = false;
526
6
  }
527
528
  template <typename T>
529
179M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
179M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
179M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
529
146k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
146k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
146k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AlignedAttr>() const
Line
Count
Source
529
2.26M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
2.26M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
2.26M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NonNullAttr>() const
Line
Count
Source
529
3.89M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.89M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.89M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::PreferredNameAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::PreferredNameAttr>() const
Line
Count
Source
529
851k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
851k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
851k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnableIfAttr>() const
Line
Count
Source
529
5.80M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
5.80M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
5.80M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatArgAttr>() const
Line
Count
Source
529
21
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
21
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
21
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
529
3.65M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.65M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.65M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AnnotateAttr>() const
Line
Count
Source
529
8.26k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
8.26k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
8.26k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableParamAttr>() const
Line
Count
Source
529
5.33k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
5.33k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
5.33k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableAttr>() const
Line
Count
Source
529
291k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
291k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
291k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
529
101
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
101
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
101
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::BTFTagAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::BTFTagAttr>() const
Line
Count
Source
529
47
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
47
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
47
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OwnershipAttr>() const
Line
Count
Source
529
2.29k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
2.29k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
2.29k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::EnforceTCBLeafAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnforceTCBLeafAttr>() const
Line
Count
Source
529
71
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
71
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
71
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::EnforceTCBAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnforceTCBAttr>() const
Line
Count
Source
529
73
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
73
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
73
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatAttr>() const
Line
Count
Source
529
3.95M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.95M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.95M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
529
4.26k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
4.26k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
4.26k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::DiagnoseIfAttr>() const
Line
Count
Source
529
157M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
157M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
157M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::PtGuardedByAttr>() const
Line
Count
Source
529
442
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
442
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
442
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::GuardedByAttr>() const
Line
Count
Source
529
2.57k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
2.57k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
2.57k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AssumptionAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AssumptionAttr>() const
Line
Count
Source
529
765k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
765k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
765k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
529
177
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
177
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
177
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NoSanitizeAttr>() const
Line
Count
Source
529
367k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
367k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
367k
  }
532
533
  template <typename T>
534
180M
  specific_attr_iterator<T> specific_attr_begin() const {
535
180M
    return specific_attr_iterator<T>(attr_begin());
536
180M
  }
clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
534
146k
  specific_attr_iterator<T> specific_attr_begin() const {
535
146k
    return specific_attr_iterator<T>(attr_begin());
536
146k
  }
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AlignedAttr>() const
Line
Count
Source
534
2.26M
  specific_attr_iterator<T> specific_attr_begin() const {
535
2.26M
    return specific_attr_iterator<T>(attr_begin());
536
2.26M
  }
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NonNullAttr>() const
Line
Count
Source
534
3.89M
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.89M
    return specific_attr_iterator<T>(attr_begin());
536
3.89M
  }
clang::specific_attr_iterator<clang::PreferredNameAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::PreferredNameAttr>() const
Line
Count
Source
534
851k
  specific_attr_iterator<T> specific_attr_begin() const {
535
851k
    return specific_attr_iterator<T>(attr_begin());
536
851k
  }
clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnableIfAttr>() const
Line
Count
Source
534
6.33M
  specific_attr_iterator<T> specific_attr_begin() const {
535
6.33M
    return specific_attr_iterator<T>(attr_begin());
536
6.33M
  }
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatArgAttr>() const
Line
Count
Source
534
21
  specific_attr_iterator<T> specific_attr_begin() const {
535
21
    return specific_attr_iterator<T>(attr_begin());
536
21
  }
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
534
3.65M
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.65M
    return specific_attr_iterator<T>(attr_begin());
536
3.65M
  }
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AnnotateAttr>() const
Line
Count
Source
534
8.65k
  specific_attr_iterator<T> specific_attr_begin() const {
535
8.65k
    return specific_attr_iterator<T>(attr_begin());
536
8.65k
  }
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableParamAttr>() const
Line
Count
Source
534
5.33k
  specific_attr_iterator<T> specific_attr_begin() const {
535
5.33k
    return specific_attr_iterator<T>(attr_begin());
536
5.33k
  }
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableAttr>() const
Line
Count
Source
534
291k
  specific_attr_iterator<T> specific_attr_begin() const {
535
291k
    return specific_attr_iterator<T>(attr_begin());
536
291k
  }
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
534
101
  specific_attr_iterator<T> specific_attr_begin() const {
535
101
    return specific_attr_iterator<T>(attr_begin());
536
101
  }
clang::specific_attr_iterator<clang::BTFTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::BTFTagAttr>() const
Line
Count
Source
534
47
  specific_attr_iterator<T> specific_attr_begin() const {
535
47
    return specific_attr_iterator<T>(attr_begin());
536
47
  }
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OwnershipAttr>() const
Line
Count
Source
534
2.29k
  specific_attr_iterator<T> specific_attr_begin() const {
535
2.29k
    return specific_attr_iterator<T>(attr_begin());
536
2.29k
  }
clang::specific_attr_iterator<clang::EnforceTCBLeafAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnforceTCBLeafAttr>() const
Line
Count
Source
534
71
  specific_attr_iterator<T> specific_attr_begin() const {
535
71
    return specific_attr_iterator<T>(attr_begin());
536
71
  }
clang::specific_attr_iterator<clang::EnforceTCBAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnforceTCBAttr>() const
Line
Count
Source
534
73
  specific_attr_iterator<T> specific_attr_begin() const {
535
73
    return specific_attr_iterator<T>(attr_begin());
536
73
  }
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatAttr>() const
Line
Count
Source
534
3.95M
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.95M
    return specific_attr_iterator<T>(attr_begin());
536
3.95M
  }
clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
534
4.27k
  specific_attr_iterator<T> specific_attr_begin() const {
535
4.27k
    return specific_attr_iterator<T>(attr_begin());
536
4.27k
  }
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::DiagnoseIfAttr>() const
Line
Count
Source
534
157M
  specific_attr_iterator<T> specific_attr_begin() const {
535
157M
    return specific_attr_iterator<T>(attr_begin());
536
157M
  }
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::PtGuardedByAttr>() const
Line
Count
Source
534
442
  specific_attr_iterator<T> specific_attr_begin() const {
535
442
    return specific_attr_iterator<T>(attr_begin());
536
442
  }
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::GuardedByAttr>() const
Line
Count
Source
534
2.57k
  specific_attr_iterator<T> specific_attr_begin() const {
535
2.57k
    return specific_attr_iterator<T>(attr_begin());
536
2.57k
  }
clang::specific_attr_iterator<clang::AssumptionAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AssumptionAttr>() const
Line
Count
Source
534
765k
  specific_attr_iterator<T> specific_attr_begin() const {
535
765k
    return specific_attr_iterator<T>(attr_begin());
536
765k
  }
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
534
177
  specific_attr_iterator<T> specific_attr_begin() const {
535
177
    return specific_attr_iterator<T>(attr_begin());
536
177
  }
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NoSanitizeAttr>() const
Line
Count
Source
534
367k
  specific_attr_iterator<T> specific_attr_begin() const {
535
367k
    return specific_attr_iterator<T>(attr_begin());
536
367k
  }
537
538
  template <typename T>
539
180M
  specific_attr_iterator<T> specific_attr_end() const {
540
180M
    return specific_attr_iterator<T>(attr_end());
541
180M
  }
clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
539
146k
  specific_attr_iterator<T> specific_attr_end() const {
540
146k
    return specific_attr_iterator<T>(attr_end());
541
146k
  }
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AlignedAttr>() const
Line
Count
Source
539
2.26M
  specific_attr_iterator<T> specific_attr_end() const {
540
2.26M
    return specific_attr_iterator<T>(attr_end());
541
2.26M
  }
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NonNullAttr>() const
Line
Count
Source
539
3.89M
  specific_attr_iterator<T> specific_attr_end() const {
540
3.89M
    return specific_attr_iterator<T>(attr_end());
541
3.89M
  }
clang::specific_attr_iterator<clang::PreferredNameAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::PreferredNameAttr>() const
Line
Count
Source
539
851k
  specific_attr_iterator<T> specific_attr_end() const {
540
851k
    return specific_attr_iterator<T>(attr_end());
541
851k
  }
clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnableIfAttr>() const
Line
Count
Source
539
6.33M
  specific_attr_iterator<T> specific_attr_end() const {
540
6.33M
    return specific_attr_iterator<T>(attr_end());
541
6.33M
  }
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatArgAttr>() const
Line
Count
Source
539
21
  specific_attr_iterator<T> specific_attr_end() const {
540
21
    return specific_attr_iterator<T>(attr_end());
541
21
  }
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
539
3.65M
  specific_attr_iterator<T> specific_attr_end() const {
540
3.65M
    return specific_attr_iterator<T>(attr_end());
541
3.65M
  }
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AnnotateAttr>() const
Line
Count
Source
539
8.65k
  specific_attr_iterator<T> specific_attr_end() const {
540
8.65k
    return specific_attr_iterator<T>(attr_end());
541
8.65k
  }
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableParamAttr>() const
Line
Count
Source
539
5.33k
  specific_attr_iterator<T> specific_attr_end() const {
540
5.33k
    return specific_attr_iterator<T>(attr_end());
541
5.33k
  }
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableAttr>() const
Line
Count
Source
539
291k
  specific_attr_iterator<T> specific_attr_end() const {
540
291k
    return specific_attr_iterator<T>(attr_end());
541
291k
  }
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
539
101
  specific_attr_iterator<T> specific_attr_end() const {
540
101
    return specific_attr_iterator<T>(attr_end());
541
101
  }
clang::specific_attr_iterator<clang::BTFTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::BTFTagAttr>() const
Line
Count
Source
539
47
  specific_attr_iterator<T> specific_attr_end() const {
540
47
    return specific_attr_iterator<T>(attr_end());
541
47
  }
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OwnershipAttr>() const
Line
Count
Source
539
2.29k
  specific_attr_iterator<T> specific_attr_end() const {
540
2.29k
    return specific_attr_iterator<T>(attr_end());
541
2.29k
  }
clang::specific_attr_iterator<clang::EnforceTCBLeafAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnforceTCBLeafAttr>() const
Line
Count
Source
539
71
  specific_attr_iterator<T> specific_attr_end() const {
540
71
    return specific_attr_iterator<T>(attr_end());
541
71
  }
clang::specific_attr_iterator<clang::EnforceTCBAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnforceTCBAttr>() const
Line
Count
Source
539
73
  specific_attr_iterator<T> specific_attr_end() const {
540
73
    return specific_attr_iterator<T>(attr_end());
541
73
  }
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatAttr>() const
Line
Count
Source
539
3.95M
  specific_attr_iterator<T> specific_attr_end() const {
540
3.95M
    return specific_attr_iterator<T>(attr_end());
541
3.95M
  }
clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
539
4.26k
  specific_attr_iterator<T> specific_attr_end() const {
540
4.26k
    return specific_attr_iterator<T>(attr_end());
541
4.26k
  }
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::DiagnoseIfAttr>() const
Line
Count
Source
539
157M
  specific_attr_iterator<T> specific_attr_end() const {
540
157M
    return specific_attr_iterator<T>(attr_end());
541
157M
  }
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::PtGuardedByAttr>() const
Line
Count
Source
539
442
  specific_attr_iterator<T> specific_attr_end() const {
540
442
    return specific_attr_iterator<T>(attr_end());
541
442
  }
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::GuardedByAttr>() const
Line
Count
Source
539
2.57k
  specific_attr_iterator<T> specific_attr_end() const {
540
2.57k
    return specific_attr_iterator<T>(attr_end());
541
2.57k
  }
clang::specific_attr_iterator<clang::AssumptionAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AssumptionAttr>() const
Line
Count
Source
539
765k
  specific_attr_iterator<T> specific_attr_end() const {
540
765k
    return specific_attr_iterator<T>(attr_end());
541
765k
  }
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
539
177
  specific_attr_iterator<T> specific_attr_end() const {
540
177
    return specific_attr_iterator<T>(attr_end());
541
177
  }
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NoSanitizeAttr>() const
Line
Count
Source
539
367k
  specific_attr_iterator<T> specific_attr_end() const {
540
367k
    return specific_attr_iterator<T>(attr_end());
541
367k
  }
542
543
1.62G
  template<typename T> T *getAttr() const {
544
1.62G
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.19G
:
nullptr425M
;
545
1.62G
  }
clang::TargetAttr* clang::Decl::getAttr<clang::TargetAttr>() const
Line
Count
Source
543
34.4M
  template<typename T> T *getAttr() const {
544
34.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())31.2M
:
nullptr3.21M
;
545
34.4M
  }
clang::CPUSpecificAttr* clang::Decl::getAttr<clang::CPUSpecificAttr>() const
Line
Count
Source
543
34.3M
  template<typename T> T *getAttr() const {
544
34.3M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())31.1M
:
nullptr3.14M
;
545
34.3M
  }
clang::CUDADeviceAttr* clang::Decl::getAttr<clang::CUDADeviceAttr>() const
Line
Count
Source
543
41.4k
  template<typename T> T *getAttr() const {
544
41.4k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())35.9k
:
nullptr5.47k
;
545
41.4k
  }
clang::CUDAConstantAttr* clang::Decl::getAttr<clang::CUDAConstantAttr>() const
Line
Count
Source
543
2.22k
  template<typename T> T *getAttr() const {
544
2.22k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.51k
:
nullptr706
;
545
2.22k
  }
clang::TypeVisibilityAttr* clang::Decl::getAttr<clang::TypeVisibilityAttr>() const
Line
Count
Source
543
1.44M
  template<typename T> T *getAttr() const {
544
1.44M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())602k
:
nullptr847k
;
545
1.44M
  }
clang::VisibilityAttr* clang::Decl::getAttr<clang::VisibilityAttr>() const
Line
Count
Source
543
4.97M
  template<typename T> T *getAttr() const {
544
4.97M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.02M
:
nullptr3.95M
;
545
4.97M
  }
clang::SelectAnyAttr* clang::Decl::getAttr<clang::SelectAnyAttr>() const
Line
Count
Source
543
51.9M
  template<typename T> T *getAttr() const {
544
51.9M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())33.6M
:
nullptr18.3M
;
545
51.9M
  }
clang::ArmBuiltinAliasAttr* clang::Decl::getAttr<clang::ArmBuiltinAliasAttr>() const
Line
Count
Source
543
317M
  template<typename T> T *getAttr() const {
544
317M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())306M
:
nullptr11.5M
;
545
317M
  }
clang::BuiltinAliasAttr* clang::Decl::getAttr<clang::BuiltinAliasAttr>() const
Line
Count
Source
543
240M
  template<typename T> T *getAttr() const {
544
240M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())229M
:
nullptr11.5M
;
545
240M
  }
clang::BuiltinAttr* clang::Decl::getAttr<clang::BuiltinAttr>() const
Line
Count
Source
543
53.4M
  template<typename T> T *getAttr() const {
544
53.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())41.9M
:
nullptr11.5M
;
545
53.4M
  }
clang::EnumExtensibilityAttr* clang::Decl::getAttr<clang::EnumExtensibilityAttr>() const
Line
Count
Source
543
468k
  template<typename T> T *getAttr() const {
544
468k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())100k
:
nullptr367k
;
545
468k
  }
clang::ExternalSourceSymbolAttr* clang::Decl::getAttr<clang::ExternalSourceSymbolAttr>() const
Line
Count
Source
543
62.6k
  template<typename T> T *getAttr() const {
544
62.6k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())717
:
nullptr61.8k
;
545
62.6k
  }
clang::AliasAttr* clang::Decl::getAttr<clang::AliasAttr>() const
Line
Count
Source
543
4.65M
  template<typename T> T *getAttr() const {
544
4.65M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.09M
:
nullptr1.56M
;
545
4.65M
  }
clang::IFuncAttr* clang::Decl::getAttr<clang::IFuncAttr>() const
Line
Count
Source
543
3.71M
  template<typename T> T *getAttr() const {
544
3.71M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.08M
:
nullptr633k
;
545
3.71M
  }
Unexecuted instantiation: clang::LoaderUninitializedAttr* clang::Decl::getAttr<clang::LoaderUninitializedAttr>() const
clang::UuidAttr* clang::Decl::getAttr<clang::UuidAttr>() const
Line
Count
Source
543
368
  template<typename T> T *getAttr() const {
544
368
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())215
:
nullptr153
;
545
368
  }
clang::ObjCMethodFamilyAttr* clang::Decl::getAttr<clang::ObjCMethodFamilyAttr>() const
Line
Count
Source
543
202k
  template<typename T> T *getAttr() const {
544
202k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())98.6k
:
nullptr103k
;
545
202k
  }
clang::ObjCRuntimeNameAttr* clang::Decl::getAttr<clang::ObjCRuntimeNameAttr>() const
Line
Count
Source
543
22.6k
  template<typename T> T *getAttr() const {
544
22.6k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.47k
:
nullptr20.1k
;
545
22.6k
  }
clang::WarnUnusedResultAttr* clang::Decl::getAttr<clang::WarnUnusedResultAttr>() const
Line
Count
Source
543
494k
  template<typename T> T *getAttr() const {
544
494k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())216k
:
nullptr278k
;
545
494k
  }
clang::AllocSizeAttr* clang::Decl::getAttr<clang::AllocSizeAttr>() const
Line
Count
Source
543
772k
  template<typename T> T *getAttr() const {
544
772k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())332k
:
nullptr440k
;
545
772k
  }
clang::AbiTagAttr* clang::Decl::getAttr<clang::AbiTagAttr>() const
Line
Count
Source
543
4.98M
  template<typename T> T *getAttr() const {
544
4.98M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.57M
:
nullptr2.40M
;
545
4.98M
  }
clang::PassObjectSizeAttr* clang::Decl::getAttr<clang::PassObjectSizeAttr>() const
Line
Count
Source
543
9.56M
  template<typename T> T *getAttr() const {
544
9.56M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4.43k
:
nullptr9.55M
;
545
9.56M
  }
clang::AsmLabelAttr* clang::Decl::getAttr<clang::AsmLabelAttr>() const
Line
Count
Source
543
1.71M
  template<typename T> T *getAttr() const {
544
1.71M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.22M
:
nullptr494k
;
545
1.71M
  }
clang::MSInheritanceAttr* clang::Decl::getAttr<clang::MSInheritanceAttr>() const
Line
Count
Source
543
2.45M
  template<typename T> T *getAttr() const {
544
2.45M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())608k
:
nullptr1.84M
;
545
2.45M
  }
clang::MSVtorDispAttr* clang::Decl::getAttr<clang::MSVtorDispAttr>() const
Line
Count
Source
543
1.71k
  template<typename T> T *getAttr() const {
544
1.71k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())168
:
nullptr1.54k
;
545
1.71k
  }
clang::MaxFieldAlignmentAttr* clang::Decl::getAttr<clang::MaxFieldAlignmentAttr>() const
Line
Count
Source
543
399k
  template<typename T> T *getAttr() const {
544
399k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())92.8k
:
nullptr307k
;
545
399k
  }
clang::LayoutVersionAttr* clang::Decl::getAttr<clang::LayoutVersionAttr>() const
Line
Count
Source
543
5.99k
  template<typename T> T *getAttr() const {
544
5.99k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())885
:
nullptr5.10k
;
545
5.99k
  }
clang::OMPThreadPrivateDeclAttr* clang::Decl::getAttr<clang::OMPThreadPrivateDeclAttr>() const
Line
Count
Source
543
76
  template<typename T> T *getAttr() const {
544
76
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
76
  }
clang::OMPAllocateDeclAttr* clang::Decl::getAttr<clang::OMPAllocateDeclAttr>() const
Line
Count
Source
543
495
  template<typename T> T *getAttr() const {
544
495
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
495
  }
Unexecuted instantiation: clang::OMPDeclareTargetDeclAttr* clang::Decl::getAttr<clang::OMPDeclareTargetDeclAttr>() const
clang::NoDestroyAttr* clang::Decl::getAttr<clang::NoDestroyAttr>() const
Line
Count
Source
543
36
  template<typename T> T *getAttr() const {
544
36
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr32
;
545
36
  }
clang::NotTailCalledAttr* clang::Decl::getAttr<clang::NotTailCalledAttr>() const
Line
Count
Source
543
26.4M
  template<typename T> T *getAttr() const {
544
26.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())231k
:
nullptr26.2M
;
545
26.4M
  }
clang::CFUnknownTransferAttr* clang::Decl::getAttr<clang::CFUnknownTransferAttr>() const
Line
Count
Source
543
876
  template<typename T> T *getAttr() const {
544
876
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
876
  }
clang::CFAuditedTransferAttr* clang::Decl::getAttr<clang::CFAuditedTransferAttr>() const
Line
Count
Source
543
1
  template<typename T> T *getAttr() const {
544
1
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
545
1
  }
clang::CUDASharedAttr* clang::Decl::getAttr<clang::CUDASharedAttr>() const
Line
Count
Source
543
409
  template<typename T> T *getAttr() const {
544
409
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())29
:
nullptr380
;
545
409
  }
clang::HIPManagedAttr* clang::Decl::getAttr<clang::HIPManagedAttr>() const
Line
Count
Source
543
629
  template<typename T> T *getAttr() const {
544
629
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())28
:
nullptr601
;
545
629
  }
clang::CUDAGlobalAttr* clang::Decl::getAttr<clang::CUDAGlobalAttr>() const
Line
Count
Source
543
9.57k
  template<typename T> T *getAttr() const {
544
9.57k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.33k
:
nullptr6.23k
;
545
9.57k
  }
clang::CUDADeviceBuiltinTextureTypeAttr* clang::Decl::getAttr<clang::CUDADeviceBuiltinTextureTypeAttr>() const
Line
Count
Source
543
10
  template<typename T> T *getAttr() const {
544
10
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
545
10
  }
clang::CUDADeviceBuiltinSurfaceTypeAttr* clang::Decl::getAttr<clang::CUDADeviceBuiltinSurfaceTypeAttr>() const
Line
Count
Source
543
10
  template<typename T> T *getAttr() const {
544
10
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
545
10
  }
clang::CUDAHostAttr* clang::Decl::getAttr<clang::CUDAHostAttr>() const
Line
Count
Source
543
3.91k
  template<typename T> T *getAttr() const {
544
3.91k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.53k
:
nullptr375
;
545
3.91k
  }
clang::HotAttr* clang::Decl::getAttr<clang::HotAttr>() const
Line
Count
Source
543
3.50k
  template<typename T> T *getAttr() const {
544
3.50k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())582
:
nullptr2.92k
;
545
3.50k
  }
clang::InternalLinkageAttr* clang::Decl::getAttr<clang::InternalLinkageAttr>() const
Line
Count
Source
543
305k
  template<typename T> T *getAttr() const {
544
305k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())38.3k
:
nullptr267k
;
545
305k
  }
clang::NakedAttr* clang::Decl::getAttr<clang::NakedAttr>() const
Line
Count
Source
543
363
  template<typename T> T *getAttr() const {
544
363
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())278
:
nullptr85
;
545
363
  }
clang::ColdAttr* clang::Decl::getAttr<clang::ColdAttr>() const
Line
Count
Source
543
22
  template<typename T> T *getAttr() const {
544
22
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())6
:
nullptr16
;
545
22
  }
clang::CommonAttr* clang::Decl::getAttr<clang::CommonAttr>() const
Line
Count
Source
543
1.18k
  template<typename T> T *getAttr() const {
544
1.18k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.13k
:
nullptr42
;
545
1.18k
  }
clang::Mips16Attr* clang::Decl::getAttr<clang::Mips16Attr>() const
Line
Count
Source
543
29
  template<typename T> T *getAttr() const {
544
29
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr25
;
545
29
  }
clang::MipsInterruptAttr* clang::Decl::getAttr<clang::MipsInterruptAttr>() const
Line
Count
Source
543
416
  template<typename T> T *getAttr() const {
544
416
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())69
:
nullptr347
;
545
416
  }
clang::MicroMipsAttr* clang::Decl::getAttr<clang::MicroMipsAttr>() const
Line
Count
Source
543
12
  template<typename T> T *getAttr() const {
544
12
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr10
;
545
12
  }
clang::MipsShortCallAttr* clang::Decl::getAttr<clang::MipsShortCallAttr>() const
Line
Count
Source
543
20
  template<typename T> T *getAttr() const {
544
20
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr16
;
545
20
  }
clang::MipsLongCallAttr* clang::Decl::getAttr<clang::MipsLongCallAttr>() const
Line
Count
Source
543
20
  template<typename T> T *getAttr() const {
544
20
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr16
;
545
20
  }
clang::DisableTailCallsAttr* clang::Decl::getAttr<clang::DisableTailCallsAttr>() const
Line
Count
Source
543
37
  template<typename T> T *getAttr() const {
544
37
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
:
nullptr34
;
545
37
  }
clang::AlwaysDestroyAttr* clang::Decl::getAttr<clang::AlwaysDestroyAttr>() const
Line
Count
Source
543
50
  template<typename T> T *getAttr() const {
544
50
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr46
;
545
50
  }
clang::SpeculativeLoadHardeningAttr* clang::Decl::getAttr<clang::SpeculativeLoadHardeningAttr>() const
Line
Count
Source
543
30
  template<typename T> T *getAttr() const {
544
30
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
:
nullptr27
;
545
30
  }
clang::AlwaysInlineAttr* clang::Decl::getAttr<clang::AlwaysInlineAttr>() const
Line
Count
Source
543
666
  template<typename T> T *getAttr() const {
544
666
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())537
:
nullptr129
;
545
666
  }
clang::PointerAttr* clang::Decl::getAttr<clang::PointerAttr>() const
Line
Count
Source
543
2.67k
  template<typename T> T *getAttr() const {
544
2.67k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.60k
:
nullptr62
;
545
2.67k
  }
clang::OwnerAttr* clang::Decl::getAttr<clang::OwnerAttr>() const
Line
Count
Source
543
1.22k
  template<typename T> T *getAttr() const {
544
1.22k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.17k
:
nullptr50
;
545
1.22k
  }
clang::NoSpeculativeLoadHardeningAttr* clang::Decl::getAttr<clang::NoSpeculativeLoadHardeningAttr>() const
Line
Count
Source
543
30
  template<typename T> T *getAttr() const {
544
30
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
:
nullptr27
;
545
30
  }
clang::OMPDeclareVariantAttr* clang::Decl::getAttr<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
543
1.25k
  template<typename T> T *getAttr() const {
544
1.25k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.05k
:
nullptr200
;
545
1.25k
  }
clang::SectionAttr* clang::Decl::getAttr<clang::SectionAttr>() const
Line
Count
Source
543
1.37M
  template<typename T> T *getAttr() const {
544
1.37M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())386k
:
nullptr985k
;
545
1.37M
  }
clang::DeprecatedAttr* clang::Decl::getAttr<clang::DeprecatedAttr>() const
Line
Count
Source
543
65.4k
  template<typename T> T *getAttr() const {
544
65.4k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())65.4k
:
nullptr6
;
545
65.4k
  }
clang::UnavailableAttr* clang::Decl::getAttr<clang::UnavailableAttr>() const
Line
Count
Source
543
397
  template<typename T> T *getAttr() const {
544
397
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
397
  }
clang::FormatArgAttr* clang::Decl::getAttr<clang::FormatArgAttr>() const
Line
Count
Source
543
13
  template<typename T> T *getAttr() const {
544
13
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())12
:
nullptr1
;
545
13
  }
clang::TypeTagForDatatypeAttr* clang::Decl::getAttr<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
543
274
  template<typename T> T *getAttr() const {
544
274
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())261
:
nullptr13
;
545
274
  }
clang::AllocAlignAttr* clang::Decl::getAttr<clang::AllocAlignAttr>() const
Line
Count
Source
543
368k
  template<typename T> T *getAttr() const {
544
368k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())197k
:
nullptr171k
;
545
368k
  }
clang::ReturnsNonNullAttr* clang::Decl::getAttr<clang::ReturnsNonNullAttr>() const
Line
Count
Source
543
1.99k
  template<typename T> T *getAttr() const {
544
1.99k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.16k
:
nullptr829
;
545
1.99k
  }
clang::NonNullAttr* clang::Decl::getAttr<clang::NonNullAttr>() const
Line
Count
Source
543
138k
  template<typename T> T *getAttr() const {
544
138k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())369
:
nullptr138k
;
545
138k
  }
clang::SentinelAttr* clang::Decl::getAttr<clang::SentinelAttr>() const
Line
Count
Source
543
3.78M
  template<typename T> T *getAttr() const {
544
3.78M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.95M
:
nullptr834k
;
545
3.78M
  }
clang::DLLImportAttr* clang::Decl::getAttr<clang::DLLImportAttr>() const
Line
Count
Source
543
38.9M
  template<typename T> T *getAttr() const {
544
38.9M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.3M
:
nullptr6.60M
;
545
38.9M
  }
clang::DLLExportAttr* clang::Decl::getAttr<clang::DLLExportAttr>() const
Line
Count
Source
543
38.9M
  template<typename T> T *getAttr() const {
544
38.9M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.3M
:
nullptr6.60M
;
545
38.9M
  }
clang::WeakAttr* clang::Decl::getAttr<clang::WeakAttr>() const
Line
Count
Source
543
34.4M
  template<typename T> T *getAttr() const {
544
34.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())31.0M
:
nullptr3.35M
;
545
34.4M
  }
clang::WeakRefAttr* clang::Decl::getAttr<clang::WeakRefAttr>() const
Line
Count
Source
543
34.4M
  template<typename T> T *getAttr() const {
544
34.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())31.0M
:
nullptr3.35M
;
545
34.4M
  }
clang::CPUDispatchAttr* clang::Decl::getAttr<clang::CPUDispatchAttr>() const
Line
Count
Source
543
33.4M
  template<typename T> T *getAttr() const {
544
33.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())30.9M
:
nullptr2.57M
;
545
33.4M
  }
clang::UsedAttr* clang::Decl::getAttr<clang::UsedAttr>() const
Line
Count
Source
543
3.16M
  template<typename T> T *getAttr() const {
544
3.16M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.02M
:
nullptr2.13M
;
545
3.16M
  }
clang::RetainAttr* clang::Decl::getAttr<clang::RetainAttr>() const
Line
Count
Source
543
3.16M
  template<typename T> T *getAttr() const {
544
3.16M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.02M
:
nullptr2.13M
;
545
3.16M
  }
clang::ConstInitAttr* clang::Decl::getAttr<clang::ConstInitAttr>() const
Line
Count
Source
543
628k
  template<typename T> T *getAttr() const {
544
628k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())423k
:
nullptr205k
;
545
628k
  }
clang::CodeSegAttr* clang::Decl::getAttr<clang::CodeSegAttr>() const
Line
Count
Source
543
3.12M
  template<typename T> T *getAttr() const {
544
3.12M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.21M
:
nullptr1.90M
;
545
3.12M
  }
clang::CarriesDependencyAttr* clang::Decl::getAttr<clang::CarriesDependencyAttr>() const
Line
Count
Source
543
697k
  template<typename T> T *getAttr() const {
544
697k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())34.3k
:
nullptr662k
;
545
697k
  }
clang::OverloadableAttr* clang::Decl::getAttr<clang::OverloadableAttr>() const
Line
Count
Source
543
10.2M
  template<typename T> T *getAttr() const {
544
10.2M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())10.2M
:
nullptr16
;
545
10.2M
  }
clang::AnyX86NoCallerSavedRegistersAttr* clang::Decl::getAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const
Line
Count
Source
543
1
  template<typename T> T *getAttr() const {
544
1
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
1
  }
clang::CXX11NoReturnAttr* clang::Decl::getAttr<clang::CXX11NoReturnAttr>() const
Line
Count
Source
543
224k
  template<typename T> T *getAttr() const {
544
224k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())28.8k
:
nullptr195k
;
545
224k
  }
clang::NoBuiltinAttr* clang::Decl::getAttr<clang::NoBuiltinAttr>() const
Line
Count
Source
543
32.1M
  template<typename T> T *getAttr() const {
544
32.1M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())30.3M
:
nullptr1.78M
;
545
32.1M
  }
clang::DLLExportStaticLocalAttr* clang::Decl::getAttr<clang::DLLExportStaticLocalAttr>() const
Line
Count
Source
543
5
  template<typename T> T *getAttr() const {
544
5
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
5
  }
clang::DLLImportStaticLocalAttr* clang::Decl::getAttr<clang::DLLImportStaticLocalAttr>() const
Line
Count
Source
543
1
  template<typename T> T *getAttr() const {
544
1
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
1
  }
clang::RISCVInterruptAttr* clang::Decl::getAttr<clang::RISCVInterruptAttr>() const
Line
Count
Source
543
93.2k
  template<typename T> T *getAttr() const {
544
93.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())48
:
nullptr93.1k
;
545
93.2k
  }
clang::VecReturnAttr* clang::Decl::getAttr<clang::VecReturnAttr>() const
Line
Count
Source
543
17
  template<typename T> T *getAttr() const {
544
17
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
:
nullptr16
;
545
17
  }
clang::MinVectorWidthAttr* clang::Decl::getAttr<clang::MinVectorWidthAttr>() const
Line
Count
Source
543
1.39M
  template<typename T> T *getAttr() const {
544
1.39M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.14M
:
nullptr244k
;
545
1.39M
  }
clang::SwiftBridgeAttr* clang::Decl::getAttr<clang::SwiftBridgeAttr>() const
Line
Count
Source
543
9
  template<typename T> T *getAttr() const {
544
9
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr7
;
545
9
  }
clang::SwiftAsyncErrorAttr* clang::Decl::getAttr<clang::SwiftAsyncErrorAttr>() const
Line
Count
Source
543
33
  template<typename T> T *getAttr() const {
544
33
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
33
  }
clang::SwiftAsyncAttr* clang::Decl::getAttr<clang::SwiftAsyncAttr>() const
Line
Count
Source
543
6.03k
  template<typename T> T *getAttr() const {
544
6.03k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())252
:
nullptr5.77k
;
545
6.03k
  }
clang::OpenCLIntelReqdSubGroupSizeAttr* clang::Decl::getAttr<clang::OpenCLIntelReqdSubGroupSizeAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::VecTypeHintAttr* clang::Decl::getAttr<clang::VecTypeHintAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::OptimizeNoneAttr* clang::Decl::getAttr<clang::OptimizeNoneAttr>() const
Line
Count
Source
543
26.4M
  template<typename T> T *getAttr() const {
544
26.4M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())231k
:
nullptr26.2M
;
545
26.4M
  }
clang::SwiftNameAttr* clang::Decl::getAttr<clang::SwiftNameAttr>() const
Line
Count
Source
543
13
  template<typename T> T *getAttr() const {
544
13
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
13
  }
clang::MinSizeAttr* clang::Decl::getAttr<clang::MinSizeAttr>() const
Line
Count
Source
543
143
  template<typename T> T *getAttr() const {
544
143
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())19
:
nullptr124
;
545
143
  }
clang::WebAssemblyImportModuleAttr* clang::Decl::getAttr<clang::WebAssemblyImportModuleAttr>() const
Line
Count
Source
543
2.27k
  template<typename T> T *getAttr() const {
544
2.27k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())562
:
nullptr1.71k
;
545
2.27k
  }
clang::WebAssemblyImportNameAttr* clang::Decl::getAttr<clang::WebAssemblyImportNameAttr>() const
Line
Count
Source
543
2.27k
  template<typename T> T *getAttr() const {
544
2.27k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())562
:
nullptr1.71k
;
545
2.27k
  }
clang::ReqdWorkGroupSizeAttr* clang::Decl::getAttr<clang::ReqdWorkGroupSizeAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::WorkGroupSizeHintAttr* clang::Decl::getAttr<clang::WorkGroupSizeHintAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::AMDGPUFlatWorkGroupSizeAttr* clang::Decl::getAttr<clang::AMDGPUFlatWorkGroupSizeAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::AMDGPUWavesPerEUAttr* clang::Decl::getAttr<clang::AMDGPUWavesPerEUAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::AMDGPUNumSGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumSGPRAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::AMDGPUNumVGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumVGPRAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.7M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32.8M
:
nullptr1.88M
;
545
34.7M
  }
clang::TrivialABIAttr* clang::Decl::getAttr<clang::TrivialABIAttr>() const
Line
Count
Source
543
56
  template<typename T> T *getAttr() const {
544
56
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
56
  }
clang::FinalAttr* clang::Decl::getAttr<clang::FinalAttr>() const
Line
Count
Source
543
423k
  template<typename T> T *getAttr() const {
544
423k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())33.6k
:
nullptr390k
;
545
423k
  }
clang::OverrideAttr* clang::Decl::getAttr<clang::OverrideAttr>() const
Line
Count
Source
543
20
  template<typename T> T *getAttr() const {
544
20
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
20
  }
clang::ObjCDirectAttr* clang::Decl::getAttr<clang::ObjCDirectAttr>() const
Line
Count
Source
543
130
  template<typename T> T *getAttr() const {
544
130
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
130
  }
clang::AvailabilityAttr* clang::Decl::getAttr<clang::AvailabilityAttr>() const
Line
Count
Source
543
32.0M
  template<typename T> T *getAttr() const {
544
32.0M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())30.2M
:
nullptr1.79M
;
545
32.0M
  }
clang::UnusedAttr* clang::Decl::getAttr<clang::UnusedAttr>() const
Line
Count
Source
543
153M
  template<typename T> T *getAttr() const {
544
153M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())8.82M
:
nullptr145M
;
545
153M
  }
clang::ObjCBridgeRelatedAttr* clang::Decl::getAttr<clang::ObjCBridgeRelatedAttr>() const
Line
Count
Source
543
1.40k
  template<typename T> T *getAttr() const {
544
1.40k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.08k
:
nullptr319
;
545
1.40k
  }
clang::ObjCBridgeAttr* clang::Decl::getAttr<clang::ObjCBridgeAttr>() const
Line
Count
Source
543
9.84k
  template<typename T> T *getAttr() const {
544
9.84k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.42k
:
nullptr7.42k
;
545
9.84k
  }
clang::ObjCBridgeMutableAttr* clang::Decl::getAttr<clang::ObjCBridgeMutableAttr>() const
Line
Count
Source
543
8.16k
  template<typename T> T *getAttr() const {
544
8.16k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())743
:
nullptr7.42k
;
545
8.16k
  }
clang::WarnUnusedAttr* clang::Decl::getAttr<clang::WarnUnusedAttr>() const
Line
Count
Source
543
12
  template<typename T> T *getAttr() const {
544
12
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr10
;
545
12
  }
clang::OpenCLAccessAttr* clang::Decl::getAttr<clang::OpenCLAccessAttr>() const
Line
Count
Source
543
117
  template<typename T> T *getAttr() const {
544
117
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())99
:
nullptr18
;
545
117
  }
clang::ParameterABIAttr* clang::Decl::getAttr<clang::ParameterABIAttr>() const
Line
Count
Source
543
91.1M
  template<typename T> T *getAttr() const {
544
91.1M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())48.6k
:
nullptr91.1M
;
545
91.1M
  }
clang::TestTypestateAttr* clang::Decl::getAttr<clang::TestTypestateAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
43
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
43
  }
clang::ConsumableAttr* clang::Decl::getAttr<clang::ConsumableAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
43
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
43
  }
clang::CallableWhenAttr* clang::Decl::getAttr<clang::CallableWhenAttr>() const
Line
Count
Source
543
291
  template<typename T> T *getAttr() const {
544
291
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())277
:
nullptr14
;
545
291
  }
clang::ParamTypestateAttr* clang::Decl::getAttr<clang::ParamTypestateAttr>() const
Line
Count
Source
543
543
  template<typename T> T *getAttr() const {
544
543
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())19
:
nullptr524
;
545
543
  }
clang::ReturnTypestateAttr* clang::Decl::getAttr<clang::ReturnTypestateAttr>() const
Line
Count
Source
543
546
  template<typename T> T *getAttr() const {
544
546
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())39
:
nullptr507
;
545
546
  }
clang::SetTypestateAttr* clang::Decl::getAttr<clang::SetTypestateAttr>() const
Line
Count
Source
543
215
  template<typename T> T *getAttr() const {
544
215
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())202
:
nullptr13
;
545
215
  }
clang::CapabilityAttr* clang::Decl::getAttr<clang::CapabilityAttr>() const
Line
Count
Source
543
4.31k
  template<typename T> T *getAttr() const {
544
4.31k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4.16k
:
nullptr152
;
545
4.31k
  }
clang::LockReturnedAttr* clang::Decl::getAttr<clang::LockReturnedAttr>() const
Line
Count
Source
543
360
  template<typename T> T *getAttr() const {
544
360
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())172
:
nullptr188
;
545
360
  }
clang::AcquireHandleAttr* clang::Decl::getAttr<clang::AcquireHandleAttr>() const
Line
Count
Source
543
151
  template<typename T> T *getAttr() const {
544
151
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
151
  }
clang::ReleaseHandleAttr* clang::Decl::getAttr<clang::ReleaseHandleAttr>() const
Line
Count
Source
543
165
  template<typename T> T *getAttr() const {
544
165
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
165
  }
clang::UseHandleAttr* clang::Decl::getAttr<clang::UseHandleAttr>() const
Line
Count
Source
543
47
  template<typename T> T *getAttr() const {
544
47
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
47
  }
clang::PcsAttr* clang::Decl::getAttr<clang::PcsAttr>() const
Line
Count
Source
543
27.5k
  template<typename T> T *getAttr() const {
544
27.5k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())5.70k
:
nullptr21.8k
;
545
27.5k
  }
clang::AssumeAlignedAttr* clang::Decl::getAttr<clang::AssumeAlignedAttr>() const
Line
Count
Source
543
368k
  template<typename T> T *getAttr() const {
544
368k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())196k
:
nullptr171k
;
545
368k
  }
clang::AlignValueAttr* clang::Decl::getAttr<clang::AlignValueAttr>() const
Line
Count
Source
543
1.08M
  template<typename T> T *getAttr() const {
544
1.08M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())24.8k
:
nullptr1.06M
;
545
1.08M
  }
clang::CFGuardAttr* clang::Decl::getAttr<clang::CFGuardAttr>() const
Line
Count
Source
543
376k
  template<typename T> T *getAttr() const {
544
376k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())108k
:
nullptr267k
;
545
376k
  }
clang::UninitializedAttr* clang::Decl::getAttr<clang::UninitializedAttr>() const
Line
Count
Source
543
239k
  template<typename T> T *getAttr() const {
544
239k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())6.86k
:
nullptr232k
;
545
239k
  }
clang::CleanupAttr* clang::Decl::getAttr<clang::CleanupAttr>() const
Line
Count
Source
543
257k
  template<typename T> T *getAttr() const {
544
257k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())24.0k
:
nullptr233k
;
545
257k
  }
clang::InitSegAttr* clang::Decl::getAttr<clang::InitSegAttr>() const
Line
Count
Source
543
5.79k
  template<typename T> T *getAttr() const {
544
5.79k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.14k
:
nullptr4.64k
;
545
5.79k
  }
clang::InitPriorityAttr* clang::Decl::getAttr<clang::InitPriorityAttr>() const
Line
Count
Source
543
5.63k
  template<typename T> T *getAttr() const {
544
5.63k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.12k
:
nullptr4.50k
;
545
5.63k
  }
clang::OMPCaptureKindAttr* clang::Decl::getAttr<clang::OMPCaptureKindAttr>() const
Line
Count
Source
543
200
  template<typename T> T *getAttr() const {
544
200
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
200
  }
clang::XRayInstrumentAttr* clang::Decl::getAttr<clang::XRayInstrumentAttr>() const
Line
Count
Source
543
366k
  template<typename T> T *getAttr() const {
544
366k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())117k
:
nullptr248k
;
545
366k
  }
clang::XRayLogArgsAttr* clang::Decl::getAttr<clang::XRayLogArgsAttr>() const
Line
Count
Source
543
82
  template<typename T> T *getAttr() const {
544
82
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
82
  }
clang::PatchableFunctionEntryAttr* clang::Decl::getAttr<clang::PatchableFunctionEntryAttr>() const
Line
Count
Source
543
366k
  template<typename T> T *getAttr() const {
544
366k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())117k
:
nullptr248k
;
545
366k
  }
clang::TLSModelAttr* clang::Decl::getAttr<clang::TLSModelAttr>() const
Line
Count
Source
543
569
  template<typename T> T *getAttr() const {
544
569
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())131
:
nullptr438
;
545
569
  }
clang::PragmaClangBSSSectionAttr* clang::Decl::getAttr<clang::PragmaClangBSSSectionAttr>() const
Line
Count
Source
543
38.2k
  template<typename T> T *getAttr() const {
544
38.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.24k
:
nullptr34.9k
;
545
38.2k
  }
clang::PragmaClangDataSectionAttr* clang::Decl::getAttr<clang::PragmaClangDataSectionAttr>() const
Line
Count
Source
543
38.2k
  template<typename T> T *getAttr() const {
544
38.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.24k
:
nullptr34.9k
;
545
38.2k
  }
clang::PragmaClangRodataSectionAttr* clang::Decl::getAttr<clang::PragmaClangRodataSectionAttr>() const
Line
Count
Source
543
38.2k
  template<typename T> T *getAttr() const {
544
38.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.24k
:
nullptr34.9k
;
545
38.2k
  }
clang::PragmaClangRelroSectionAttr* clang::Decl::getAttr<clang::PragmaClangRelroSectionAttr>() const
Line
Count
Source
543
38.2k
  template<typename T> T *getAttr() const {
544
38.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.24k
:
nullptr34.9k
;
545
38.2k
  }
clang::PragmaClangTextSectionAttr* clang::Decl::getAttr<clang::PragmaClangTextSectionAttr>() const
Line
Count
Source
543
360k
  template<typename T> T *getAttr() const {
544
360k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())116k
:
nullptr243k
;
545
360k
  }
clang::CallbackAttr* clang::Decl::getAttr<clang::CallbackAttr>() const
Line
Count
Source
543
367k
  template<typename T> T *getAttr() const {
544
367k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())128k
:
nullptr239k
;
545
367k
  }
clang::ConstructorAttr* clang::Decl::getAttr<clang::ConstructorAttr>() const
Line
Count
Source
543
274k
  template<typename T> T *getAttr() const {
544
274k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())91.5k
:
nullptr182k
;
545
274k
  }
clang::DestructorAttr* clang::Decl::getAttr<clang::DestructorAttr>() const
Line
Count
Source
543
274k
  template<typename T> T *getAttr() const {
544
274k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())91.5k
:
nullptr182k
;
545
274k
  }
Unexecuted instantiation: clang::M68kInterruptAttr* clang::Decl::getAttr<clang::M68kInterruptAttr>() const
clang::AVRInterruptAttr* clang::Decl::getAttr<clang::AVRInterruptAttr>() const
Line
Count
Source
543
49
  template<typename T> T *getAttr() const {
544
49
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr47
;
545
49
  }
clang::AVRSignalAttr* clang::Decl::getAttr<clang::AVRSignalAttr>() const
Line
Count
Source
543
49
  template<typename T> T *getAttr() const {
544
49
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr47
;
545
49
  }
clang::WebAssemblyExportNameAttr* clang::Decl::getAttr<clang::WebAssemblyExportNameAttr>() const
Line
Count
Source
543
2.26k
  template<typename T> T *getAttr() const {
544
2.26k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())555
:
nullptr1.71k
;
545
2.26k
  }
clang::ARMInterruptAttr* clang::Decl::getAttr<clang::ARMInterruptAttr>() const
Line
Count
Source
543
12.7k
  template<typename T> T *getAttr() const {
544
12.7k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.87k
:
nullptr10.8k
;
545
12.7k
  }
clang::CUDALaunchBoundsAttr* clang::Decl::getAttr<clang::CUDALaunchBoundsAttr>() const
Line
Count
Source
543
379
  template<typename T> T *getAttr() const {
544
379
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())371
:
nullptr8
;
545
379
  }
clang::MSP430InterruptAttr* clang::Decl::getAttr<clang::MSP430InterruptAttr>() const
Line
Count
Source
543
24
  template<typename T> T *getAttr() const {
544
24
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
:
nullptr23
;
545
24
  }
clang::IBOutletCollectionAttr* clang::Decl::getAttr<clang::IBOutletCollectionAttr>() const
Line
Count
Source
543
33
  template<typename T> T *getAttr() const {
544
33
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())7
:
nullptr26
;
545
33
  }
clang::AnnotateAttr* clang::Decl::getAttr<clang::AnnotateAttr>() const
Line
Count
Source
543
65
  template<typename T> T *getAttr() const {
544
65
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())11
:
nullptr54
;
545
65
  }
clang::BlocksAttr* clang::Decl::getAttr<clang::BlocksAttr>() const
Line
Count
Source
543
4
  template<typename T> T *getAttr() const {
544
4
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
4
  }
546
547
2.46G
  template<typename T> bool hasAttr() const {
548
2.46G
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.67G
;
549
2.46G
  }
bool clang::Decl::hasAttr<clang::DLLImportAttr>() const
Line
Count
Source
547
55.7M
  template<typename T> bool hasAttr() const {
548
55.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())41.1M
;
549
55.7M
  }
bool clang::Decl::hasAttr<clang::DLLExportAttr>() const
Line
Count
Source
547
10.3M
  template<typename T> bool hasAttr() const {
548
10.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.18M
;
549
10.3M
  }
bool clang::Decl::hasAttr<clang::CUDAGlobalAttr>() const
Line
Count
Source
547
102M
  template<typename T> bool hasAttr() const {
548
102M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())91.1M
;
549
102M
  }
bool clang::Decl::hasAttr<clang::GNUInlineAttr>() const
Line
Count
Source
547
17.4M
  template<typename T> bool hasAttr() const {
548
17.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())16.5M
;
549
17.4M
  }
bool clang::Decl::hasAttr<clang::PackedAttr>() const
Line
Count
Source
547
1.74M
  template<typename T> bool hasAttr() const {
548
1.74M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198k
;
549
1.74M
  }
bool clang::Decl::hasAttr<clang::AlignedAttr>() const
Line
Count
Source
547
1.60M
  template<typename T> bool hasAttr() const {
548
1.60M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())253k
;
549
1.60M
  }
bool clang::Decl::hasAttr<clang::BlocksAttr>() const
Line
Count
Source
547
108M
  template<typename T> bool hasAttr() const {
548
108M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.02M
;
549
108M
  }
bool clang::Decl::hasAttr<clang::TransparentUnionAttr>() const
Line
Count
Source
547
265
  template<typename T> bool hasAttr() const {
548
265
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())151
;
549
265
  }
bool clang::Decl::hasAttr<clang::WeakRefAttr>() const
Line
Count
Source
547
88.6M
  template<typename T> bool hasAttr() const {
548
88.6M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())63.7M
;
549
88.6M
  }
bool clang::Decl::hasAttr<clang::AliasAttr>() const
Line
Count
Source
547
62.7M
  template<typename T> bool hasAttr() const {
548
62.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())40.0M
;
549
62.7M
  }
bool clang::Decl::hasAttr<clang::UsedAttr>() const
Line
Count
Source
547
78.6M
  template<typename T> bool hasAttr() const {
548
78.6M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())37.7M
;
549
78.6M
  }
bool clang::Decl::hasAttr<clang::ConstructorAttr>() const
Line
Count
Source
547
5.69M
  template<typename T> bool hasAttr() const {
548
5.69M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.24M
;
549
5.69M
  }
bool clang::Decl::hasAttr<clang::DestructorAttr>() const
Line
Count
Source
547
5.69M
  template<typename T> bool hasAttr() const {
548
5.69M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.24M
;
549
5.69M
  }
bool clang::Decl::hasAttr<clang::UnavailableAttr>() const
Line
Count
Source
547
2.40M
  template<typename T> bool hasAttr() const {
548
2.40M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())235k
;
549
2.40M
  }
bool clang::Decl::hasAttr<clang::DeprecatedAttr>() const
Line
Count
Source
547
101
  template<typename T> bool hasAttr() const {
548
101
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())19
;
549
101
  }
bool clang::Decl::hasAttr<clang::CUDADeviceAttr>() const
Line
Count
Source
547
3.02M
  template<typename T> bool hasAttr() const {
548
3.02M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.41M
;
549
3.02M
  }
bool clang::Decl::hasAttr<clang::CUDAConstantAttr>() const
Line
Count
Source
547
2.98M
  template<typename T> bool hasAttr() const {
548
2.98M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.37M
;
549
2.98M
  }
bool clang::Decl::hasAttr<clang::HIPManagedAttr>() const
Line
Count
Source
547
61.3k
  template<typename T> bool hasAttr() const {
548
61.3k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11.1k
;
549
61.3k
  }
bool clang::Decl::hasAttr<clang::AvailabilityAttr>() const
Line
Count
Source
547
118
  template<typename T> bool hasAttr() const {
548
118
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())17
;
549
118
  }
bool clang::Decl::hasAttr<clang::VisibilityAttr>() const
Line
Count
Source
547
268k
  template<typename T> bool hasAttr() const {
548
268k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11.0k
;
549
268k
  }
bool clang::Decl::hasAttr<clang::TypeVisibilityAttr>() const
Line
Count
Source
547
52.8k
  template<typename T> bool hasAttr() const {
548
52.8k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())51.8k
;
549
52.8k
  }
bool clang::Decl::hasAttr<clang::InternalLinkageAttr>() const
Line
Count
Source
547
172M
  template<typename T> bool hasAttr() const {
548
172M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())138M
;
549
172M
  }
bool clang::Decl::hasAttr<clang::ThreadAttr>() const
Line
Count
Source
547
6.59M
  template<typename T> bool hasAttr() const {
548
6.59M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())139k
;
549
6.59M
  }
bool clang::Decl::hasAttr<clang::OMPThreadPrivateDeclAttr>() const
Line
Count
Source
547
6.48M
  template<typename T> bool hasAttr() const {
548
6.48M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())71.7k
;
549
6.48M
  }
bool clang::Decl::hasAttr<clang::CUDASharedAttr>() const
Line
Count
Source
547
52.9k
  template<typename T> bool hasAttr() const {
548
52.9k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.16k
;
549
52.9k
  }
bool clang::Decl::hasAttr<clang::NoDestroyAttr>() const
Line
Count
Source
547
1.24M
  template<typename T> bool hasAttr() const {
548
1.24M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())20.4k
;
549
1.24M
  }
bool clang::Decl::hasAttr<clang::AlwaysDestroyAttr>() const
Line
Count
Source
547
44
  template<typename T> bool hasAttr() const {
548
44
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())21
;
549
44
  }
bool clang::Decl::hasAttr<clang::NSConsumedAttr>() const
Line
Count
Source
547
280k
  template<typename T> bool hasAttr() const {
548
280k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11.7k
;
549
280k
  }
bool clang::Decl::hasAttr<clang::OpenCLKernelAttr>() const
Line
Count
Source
547
64.3M
  template<typename T> bool hasAttr() const {
548
64.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())55.6M
;
549
64.3M
  }
bool clang::Decl::hasAttr<clang::NoReturnAttr>() const
Line
Count
Source
547
6.23M
  template<typename T> bool hasAttr() const {
548
6.23M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.99M
;
549
6.23M
  }
bool clang::Decl::hasAttr<clang::CXX11NoReturnAttr>() const
Line
Count
Source
547
5.45M
  template<typename T> bool hasAttr() const {
548
5.45M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.66M
;
549
5.45M
  }
bool clang::Decl::hasAttr<clang::C11NoReturnAttr>() const
Line
Count
Source
547
5.44M
  template<typename T> bool hasAttr() const {
548
5.44M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.66M
;
549
5.44M
  }
bool clang::Decl::hasAttr<clang::TargetAttr>() const
Line
Count
Source
547
33.5M
  template<typename T> bool hasAttr() const {
548
33.5M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())30.9M
;
549
33.5M
  }
bool clang::Decl::hasAttr<clang::CPUDispatchAttr>() const
Line
Count
Source
547
59.9M
  template<typename T> bool hasAttr() const {
548
59.9M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())55.7M
;
549
59.9M
  }
bool clang::Decl::hasAttr<clang::CPUSpecificAttr>() const
Line
Count
Source
547
32.3M
  template<typename T> bool hasAttr() const {
548
32.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())29.8M
;
549
32.3M
  }
bool clang::Decl::hasAttr<clang::OverloadableAttr>() const
Line
Count
Source
547
333M
  template<typename T> bool hasAttr() const {
548
333M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())330M
;
549
333M
  }
bool clang::Decl::hasAttr<clang::ArmBuiltinAliasAttr>() const
Line
Count
Source
547
252M
  template<typename T> bool hasAttr() const {
548
252M
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
252M
  }
bool clang::Decl::hasAttr<clang::BuiltinAliasAttr>() const
Line
Count
Source
547
187M
  template<typename T> bool hasAttr() const {
548
187M
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
187M
  }
bool clang::Decl::hasAttr<clang::FlagEnumAttr>() const
Line
Count
Source
547
371k
  template<typename T> bool hasAttr() const {
548
371k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.19k
;
549
371k
  }
bool clang::Decl::hasAttr<clang::CapturedRecordAttr>() const
Line
Count
Source
547
8.89k
  template<typename T> bool hasAttr() const {
548
8.89k
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
8.89k
  }
bool clang::Decl::hasAttr<clang::MSStructAttr>() const
Line
Count
Source
547
1.87M
  template<typename T> bool hasAttr() const {
548
1.87M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())319k
;
549
1.87M
  }
bool clang::Decl::hasAttr<clang::WeakAttr>() const
Line
Count
Source
547
19.2M
  template<typename T> bool hasAttr() const {
548
19.2M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())658k
;
549
19.2M
  }
bool clang::Decl::hasAttr<clang::IFuncAttr>() const
Line
Count
Source
547
55.6M
  template<typename T> bool hasAttr() const {
548
55.6M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())35.5M
;
549
55.6M
  }
bool clang::Decl::hasAttr<clang::LoaderUninitializedAttr>() const
Line
Count
Source
547
31.4M
  template<typename T> bool hasAttr() const {
548
31.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10.5M
;
549
31.4M
  }
bool clang::Decl::hasAttr<clang::FinalAttr>() const
Line
Count
Source
547
7.25M
  template<typename T> bool hasAttr() const {
548
7.25M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.93M
;
549
7.25M
  }
bool clang::Decl::hasAttr<clang::ArcWeakrefUnavailableAttr>() const
Line
Count
Source
547
570
  template<typename T> bool hasAttr() const {
548
570
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())81
;
549
570
  }
bool clang::Decl::hasAttr<clang::ObjCRequiresPropertyDefsAttr>() const
Line
Count
Source
547
18.7k
  template<typename T> bool hasAttr() const {
548
18.7k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.99k
;
549
18.7k
  }
bool clang::Decl::hasAttr<clang::ObjCDirectAttr>() const
Line
Count
Source
547
2.52M
  template<typename T> bool hasAttr() const {
548
2.52M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.37M
;
549
2.52M
  }
bool clang::Decl::hasAttr<clang::ObjCDesignatedInitializerAttr>() const
Line
Count
Source
547
34.7M
  template<typename T> bool hasAttr() const {
548
34.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32.8M
;
549
34.7M
  }
bool clang::Decl::hasAttr<clang::NSConsumesSelfAttr>() const
Line
Count
Source
547
41.8k
  template<typename T> bool hasAttr() const {
548
41.8k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())18.7k
;
549
41.8k
  }
bool clang::Decl::hasAttr<clang::ObjCNonRuntimeProtocolAttr>() const
Line
Count
Source
547
245
  template<typename T> bool hasAttr() const {
548
245
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())55
;
549
245
  }
bool clang::Decl::hasAttr<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
547
12.6k
  template<typename T> bool hasAttr() const {
548
12.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())877
;
549
12.6k
  }
bool clang::Decl::hasAttr<clang::PureAttr>() const
Line
Count
Source
547
1.29M
  template<typename T> bool hasAttr() const {
548
1.29M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())556k
;
549
1.29M
  }
bool clang::Decl::hasAttr<clang::ConstAttr>() const
Line
Count
Source
547
49.1M
  template<typename T> bool hasAttr() const {
548
49.1M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())48.3M
;
549
49.1M
  }
bool clang::Decl::hasAttr<clang::WarnUnusedAttr>() const
Line
Count
Source
547
65.3k
  template<typename T> bool hasAttr() const {
548
65.3k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())19.1k
;
549
65.3k
  }
bool clang::Decl::hasAttr<clang::WarnUnusedResultAttr>() const
Line
Count
Source
547
9.13k
  template<typename T> bool hasAttr() const {
548
9.13k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())618
;
549
9.13k
  }
bool clang::Decl::hasAttr<clang::AsmLabelAttr>() const
Line
Count
Source
547
4.31M
  template<typename T> bool hasAttr() const {
548
4.31M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.57M
;
549
4.31M
  }
bool clang::Decl::hasAttr<clang::NonNullAttr>() const
Line
Count
Source
547
6.73M
  template<typename T> bool hasAttr() const {
548
6.73M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())275k
;
549
6.73M
  }
bool clang::Decl::hasAttr<clang::ReturnsNonNullAttr>() const
Line
Count
Source
547
773k
  template<typename T> bool hasAttr() const {
548
773k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())334k
;
549
773k
  }
bool clang::Decl::hasAttr<clang::EnableIfAttr>() const
Line
Count
Source
547
2.22M
  template<typename T> bool hasAttr() const {
548
2.22M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.91M
;
549
2.22M
  }
bool clang::Decl::hasAttr<clang::EmptyBasesAttr>() const
Line
Count
Source
547
6.00k
  template<typename T> bool hasAttr() const {
548
6.00k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())901
;
549
6.00k
  }
bool clang::Decl::hasAttr<clang::AlignMac68kAttr>() const
Line
Count
Source
547
392k
  template<typename T> bool hasAttr() const {
548
392k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())91.7k
;
549
392k
  }
bool clang::Decl::hasAttr<clang::AlignNaturalAttr>() const
Line
Count
Source
547
392k
  template<typename T> bool hasAttr() const {
548
392k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())91.7k
;
549
392k
  }
bool clang::Decl::hasAttr<clang::NoUniqueAddressAttr>() const
Line
Count
Source
547
4.14M
  template<typename T> bool hasAttr() const {
548
4.14M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10.9k
;
549
4.14M
  }
bool clang::Decl::hasAttr<clang::CUDAHostAttr>() const
Line
Count
Source
547
9.70k
  template<typename T> bool hasAttr() const {
548
9.70k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.39k
;
549
9.70k
  }
bool clang::Decl::hasAttr<clang::ObjCBoxableAttr>() const
Line
Count
Source
547
141
  template<typename T> bool hasAttr() const {
548
141
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())135
;
549
141
  }
bool clang::Decl::hasAttr<clang::MSInheritanceAttr>() const
Line
Count
Source
547
13.3k
  template<typename T> bool hasAttr() const {
548
13.3k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11.0k
;
549
13.3k
  }
bool clang::Decl::hasAttr<clang::ObjCNSObjectAttr>() const
Line
Count
Source
547
777k
  template<typename T> bool hasAttr() const {
548
777k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())49.4k
;
549
777k
  }
bool clang::Decl::hasAttr<clang::ObjCIndependentClassAttr>() const
Line
Count
Source
547
2.76k
  template<typename T> bool hasAttr() const {
548
2.76k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1
;
549
2.76k
  }
bool clang::Decl::hasAttr<clang::CUDADeviceBuiltinSurfaceTypeAttr>() const
Line
Count
Source
547
2.66k
  template<typename T> bool hasAttr() const {
548
2.66k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())86
;
549
2.66k
  }
bool clang::Decl::hasAttr<clang::CUDADeviceBuiltinTextureTypeAttr>() const
Line
Count
Source
547
2.63k
  template<typename T> bool hasAttr() const {
548
2.63k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())51
;
549
2.63k
  }
bool clang::Decl::hasAttr<clang::ExcludeFromExplicitInstantiationAttr>() const
Line
Count
Source
547
77.2k
  template<typename T> bool hasAttr() const {
548
77.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())33.4k
;
549
77.2k
  }
bool clang::Decl::hasAttr<clang::OwnerAttr>() const
Line
Count
Source
547
314k
  template<typename T> bool hasAttr() const {
548
314k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())155k
;
549
314k
  }
bool clang::Decl::hasAttr<clang::PointerAttr>() const
Line
Count
Source
547
424k
  template<typename T> bool hasAttr() const {
548
424k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())184k
;
549
424k
  }
bool clang::Decl::hasAttr<clang::CFAuditedTransferAttr>() const
Line
Count
Source
547
486k
  template<typename T> bool hasAttr() const {
548
486k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())332k
;
549
486k
  }
bool clang::Decl::hasAttr<clang::CFUnknownTransferAttr>() const
Line
Count
Source
547
468k
  template<typename T> bool hasAttr() const {
548
468k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())318k
;
549
468k
  }
bool clang::Decl::hasAttr<clang::MinSizeAttr>() const
Line
Count
Source
547
722k
  template<typename T> bool hasAttr() const {
548
722k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())233k
;
549
722k
  }
bool clang::Decl::hasAttr<clang::AlwaysInlineAttr>() const
Line
Count
Source
547
27.3M
  template<typename T> bool hasAttr() const {
548
27.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())579k
;
549
27.3M
  }
bool clang::Decl::hasAttr<clang::OptimizeNoneAttr>() const
Line
Count
Source
547
1.25M
  template<typename T> bool hasAttr() const {
548
1.25M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())475k
;
549
1.25M
  }
bool clang::Decl::hasAttr<clang::NoInlineAttr>() const
Line
Count
Source
547
129k
  template<typename T> bool hasAttr() const {
548
129k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32.9k
;
549
129k
  }
bool clang::Decl::hasAttr<clang::EnforceTCBAttr>() const
Line
Count
Source
547
3.31M
  template<typename T> bool hasAttr() const {
548
3.31M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.68M
;
549
3.31M
  }
bool clang::Decl::hasAttr<clang::CUDAInvalidTargetAttr>() const
Line
Count
Source
547
148k
  template<typename T> bool hasAttr() const {
548
148k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())126k
;
549
148k
  }
bool clang::Decl::hasAttr<clang::ObjCPreciseLifetimeAttr>() const
Line
Count
Source
547
36.7M
  template<typename T> bool hasAttr() const {
548
36.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())829k
;
549
36.7M
  }
bool clang::Decl::hasAttr<clang::UnusedAttr>() const
Line
Count
Source
547
76.5M
  template<typename T> bool hasAttr() const {
548
76.5M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32.2M
;
549
76.5M
  }
bool clang::Decl::hasAttr<clang::SectionAttr>() const
Line
Count
Source
547
32.5M
  template<typename T> bool hasAttr() const {
548
32.5M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())222k
;
549
32.5M
  }
bool clang::Decl::hasAttr<clang::CodeSegAttr>() const
Line
Count
Source
547
31.9M
  template<typename T> bool hasAttr() const {
548
31.9M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())54.0k
;
549
31.9M
  }
bool clang::Decl::hasAttr<clang::CarriesDependencyAttr>() const
Line
Count
Source
547
5
  template<typename T> bool hasAttr() const {
548
5
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2
;
549
5
  }
bool clang::Decl::hasAttr<clang::WeakImportAttr>() const
Line
Count
Source
547
60.1k
  template<typename T> bool hasAttr() const {
548
60.1k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.92k
;
549
60.1k
  }
bool clang::Decl::hasAttr<clang::CleanupAttr>() const
Line
Count
Source
547
2.81M
  template<typename T> bool hasAttr() const {
548
2.81M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())801k
;
549
2.81M
  }
bool clang::Decl::hasAttr<clang::SelectAnyAttr>() const
Line
Count
Source
547
569k
  template<typename T> bool hasAttr() const {
548
569k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())48.1k
;
549
569k
  }
bool clang::Decl::hasAttr<clang::ConstInitAttr>() const
Line
Count
Source
547
29.4k
  template<typename T> bool hasAttr() const {
548
29.4k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.09k
;
549
29.4k
  }
bool clang::Decl::hasAttr<clang::DLLExportStaticLocalAttr>() const
Line
Count
Source
547
10.4k
  template<typename T> bool hasAttr() const {
548
10.4k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.29k
;
549
10.4k
  }
bool clang::Decl::hasAttr<clang::DLLImportStaticLocalAttr>() const
Line
Count
Source
547
10.4k
  template<typename T> bool hasAttr() const {
548
10.4k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.28k
;
549
10.4k
  }
bool clang::Decl::hasAttr<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
547
2.46M
  template<typename T> bool hasAttr() const {
548
2.46M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())801k
;
549
2.46M
  }
bool clang::Decl::hasAttr<clang::StrictFPAttr>() const
Line
Count
Source
547
1.46M
  template<typename T> bool hasAttr() const {
548
1.46M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())526k
;
549
1.46M
  }
bool clang::Decl::hasAttr<clang::NakedAttr>() const
Line
Count
Source
547
8.65M
  template<typename T> bool hasAttr() const {
548
8.65M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.59M
;
549
8.65M
  }
bool clang::Decl::hasAttr<clang::AllocSizeAttr>() const
Line
Count
Source
547
7.70k
  template<typename T> bool hasAttr() const {
548
7.70k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())7.35k
;
549
7.70k
  }
bool clang::Decl::hasAttr<clang::AllocAlignAttr>() const
Line
Count
Source
547
3.65M
  template<typename T> bool hasAttr() const {
548
3.65M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.91M
;
549
3.65M
  }
bool clang::Decl::hasAttr<clang::FormatAttr>() const
Line
Count
Source
547
5.37k
  template<typename T> bool hasAttr() const {
548
5.37k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.37k
;
549
5.37k
  }
bool clang::Decl::hasAttr<clang::CallbackAttr>() const
Line
Count
Source
547
26.6M
  template<typename T> bool hasAttr() const {
548
26.6M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())26.6M
;
549
26.6M
  }
bool clang::Decl::hasAttr<clang::ReturnsTwiceAttr>() const
Line
Count
Source
547
769k
  template<typename T> bool hasAttr() const {
548
769k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())328k
;
549
769k
  }
bool clang::Decl::hasAttr<clang::NoThrowAttr>() const
Line
Count
Source
547
27.8M
  template<typename T> bool hasAttr() const {
548
27.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())27.1M
;
549
27.8M
  }
bool clang::Decl::hasAttr<clang::FormatArgAttr>() const
Line
Count
Source
547
222
  template<typename T> bool hasAttr() const {
548
222
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())221
;
549
222
  }
bool clang::Decl::hasAttr<clang::SYCLKernelAttr>() const
Line
Count
Source
547
388
  template<typename T> bool hasAttr() const {
548
388
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())74
;
549
388
  }
bool clang::Decl::hasAttr<clang::NoBuiltinAttr>() const
Line
Count
Source
547
31
  template<typename T> bool hasAttr() const {
548
31
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8
;
549
31
  }
bool clang::Decl::hasAttr<clang::CapabilityAttr>() const
Line
Count
Source
547
3.19k
  template<typename T> bool hasAttr() const {
548
3.19k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.00k
;
549
3.19k
  }
bool clang::Decl::hasAttr<clang::ConsumableAttr>() const
Line
Count
Source
547
299
  template<typename T> bool hasAttr() const {
548
299
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())291
;
549
299
  }
bool clang::Decl::hasAttr<clang::BPFPreserveAccessIndexAttr>() const
Line
Count
Source
547
1.93M
  template<typename T> bool hasAttr() const {
548
1.93M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())597k
;
549
1.93M
  }
bool clang::Decl::hasAttr<clang::OverrideAttr>() const
Line
Count
Source
547
4.70M
  template<typename T> bool hasAttr() const {
548
4.70M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.84M
;
549
4.70M
  }
bool clang::Decl::hasAttr<clang::TrivialABIAttr>() const
Line
Count
Source
547
3.15M
  template<typename T> bool hasAttr() const {
548
3.15M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())473k
;
549
3.15M
  }
bool clang::Decl::hasAttr<clang::NoEscapeAttr>() const
Line
Count
Source
547
91.3M
  template<typename T> bool hasAttr() const {
548
91.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())57.3k
;
549
91.3M
  }
bool clang::Decl::hasAttr<clang::ObjCExplicitProtocolImplAttr>() const
Line
Count
Source
547
1.41k
  template<typename T> bool hasAttr() const {
548
1.41k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())70
;
549
1.41k
  }
bool clang::Decl::hasAttr<clang::ObjCDirectMembersAttr>() const
Line
Count
Source
547
939k
  template<typename T> bool hasAttr() const {
548
939k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())341k
;
549
939k
  }
bool clang::Decl::hasAttr<clang::NSReturnsRetainedAttr>() const
Line
Count
Source
547
307k
  template<typename T> bool hasAttr() const {
548
307k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())120k
;
549
307k
  }
bool clang::Decl::hasAttr<clang::NSReturnsNotRetainedAttr>() const
Line
Count
Source
547
646k
  template<typename T> bool hasAttr() const {
548
646k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())200k
;
549
646k
  }
bool clang::Decl::hasAttr<clang::NSReturnsAutoreleasedAttr>() const
Line
Count
Source
547
1.18k
  template<typename T> bool hasAttr() const {
548
1.18k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())87
;
549
1.18k
  }
bool clang::Decl::hasAttr<clang::ObjCRequiresSuperAttr>() const
Line
Count
Source
547
6.08k
  template<typename T> bool hasAttr() const {
548
6.08k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())838
;
549
6.08k
  }
bool clang::Decl::hasAttr<clang::ObjCRuntimeVisibleAttr>() const
Line
Count
Source
547
8.13k
  template<typename T> bool hasAttr() const {
548
8.13k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())777
;
549
8.13k
  }
bool clang::Decl::hasAttr<clang::ObjCRootClassAttr>() const
Line
Count
Source
547
4.81k
  template<typename T> bool hasAttr() const {
548
4.81k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())191
;
549
4.81k
  }
bool clang::Decl::hasAttr<clang::ObjCSubclassingRestrictedAttr>() const
Line
Count
Source
547
127k
  template<typename T> bool hasAttr() const {
548
127k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())74.9k
;
549
127k
  }
bool clang::Decl::hasAttr<clang::ObjCClassStubAttr>() const
Line
Count
Source
547
86.0k
  template<typename T> bool hasAttr() const {
548
86.0k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32.2k
;
549
86.0k
  }
bool clang::Decl::hasAttr<clang::ObjCExternallyRetainedAttr>() const
Line
Count
Source
547
39
  template<typename T> bool hasAttr() const {
548
39
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6
;
549
39
  }
bool clang::Decl::hasAttr<clang::AnyX86InterruptAttr>() const
Line
Count
Source
547
7.27M
  template<typename T> bool hasAttr() const {
548
7.27M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.86M
;
549
7.27M
  }
bool clang::Decl::hasAttr<clang::ARMInterruptAttr>() const
Line
Count
Source
547
3.31M
  template<typename T> bool hasAttr() const {
548
3.31M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.74M
;
549
3.31M
  }
bool clang::Decl::hasAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::CFReturnsNotRetainedAttr>() const
Line
Count
Source
547
4.76k
  template<typename T> bool hasAttr() const {
548
4.76k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())191
;
549
4.76k
  }
bool clang::Decl::hasAttr<clang::CFReturnsRetainedAttr>() const
Line
Count
Source
547
4.79k
  template<typename T> bool hasAttr() const {
548
4.79k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())263
;
549
4.79k
  }
bool clang::Decl::hasAttr<clang::LifetimeBoundAttr>() const
Line
Count
Source
547
3.77M
  template<typename T> bool hasAttr() const {
548
3.77M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())538
;
549
3.77M
  }
bool clang::Decl::hasAttr<clang::IBOutletAttr>() const
Line
Count
Source
547
731
  template<typename T> bool hasAttr() const {
548
731
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32
;
549
731
  }
bool clang::Decl::hasAttr<clang::ObjCReturnsInnerPointerAttr>() const
Line
Count
Source
547
350k
  template<typename T> bool hasAttr() const {
548
350k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())87.9k
;
549
350k
  }
bool clang::Decl::hasAttr<clang::IBOutletCollectionAttr>() const
Line
Count
Source
547
6.12k
  template<typename T> bool hasAttr() const {
548
6.12k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())742
;
549
6.12k
  }
bool clang::Decl::hasAttr<clang::OMPAllocateDeclAttr>() const
Line
Count
Source
547
211k
  template<typename T> bool hasAttr() const {
548
211k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32.4k
;
549
211k
  }
bool clang::Decl::hasAttr<clang::OMPCaptureNoInitAttr>() const
Line
Count
Source
547
6.50k
  template<typename T> bool hasAttr() const {
548
6.50k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288
;
549
6.50k
  }
bool clang::Decl::hasAttr<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
547
140k
  template<typename T> bool hasAttr() const {
548
140k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())12.2k
;
549
140k
  }
bool clang::Decl::hasAttr<clang::PassObjectSizeAttr>() const
Line
Count
Source
547
94.7M
  template<typename T> bool hasAttr() const {
548
94.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())49.5k
;
549
94.7M
  }
bool clang::Decl::hasAttr<clang::CFConsumedAttr>() const
Line
Count
Source
547
2.09k
  template<typename T> bool hasAttr() const {
548
2.09k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())106
;
549
2.09k
  }
bool clang::Decl::hasAttr<clang::CmseNSEntryAttr>() const
Line
Count
Source
547
3.79M
  template<typename T> bool hasAttr() const {
548
3.79M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.94M
;
549
3.79M
  }
bool clang::Decl::hasAttr<clang::UsingIfExistsAttr>() const
Line
Count
Source
547
1.20k
  template<typename T> bool hasAttr() const {
548
1.20k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())28
;
549
1.20k
  }
bool clang::Decl::hasAttr<clang::OpenCLAccessAttr>() const
Line
Count
Source
547
7.59k
  template<typename T> bool hasAttr() const {
548
7.59k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())12
;
549
7.59k
  }
bool clang::Decl::hasAttr<clang::CalledOnceAttr>() const
Line
Count
Source
547
6.24k
  template<typename T> bool hasAttr() const {
548
6.24k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())234
;
549
6.24k
  }
bool clang::Decl::hasAttr<clang::ConsumableSetOnReadAttr>() const
Line
Count
Source
547
19
  template<typename T> bool hasAttr() const {
548
19
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
19
  }
bool clang::Decl::hasAttr<clang::TestTypestateAttr>() const
Line
Count
Source
547
231
  template<typename T> bool hasAttr() const {
548
231
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())218
;
549
231
  }
bool clang::Decl::hasAttr<clang::ConsumableAutoCastAttr>() const
Line
Count
Source
547
4
  template<typename T> bool hasAttr() const {
548
4
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
4
  }
bool clang::Decl::hasAttr<clang::NoThreadSafetyAnalysisAttr>() const
Line
Count
Source
547
8.85k
  template<typename T> bool hasAttr() const {
548
8.85k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.22k
;
549
8.85k
  }
bool clang::Decl::hasAttr<clang::ScopedLockableAttr>() const
Line
Count
Source
547
506
  template<typename T> bool hasAttr() const {
548
506
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())450
;
549
506
  }
bool clang::Decl::hasAttr<clang::PtGuardedVarAttr>() const
Line
Count
Source
547
442
  template<typename T> bool hasAttr() const {
548
442
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
442
  }
bool clang::Decl::hasAttr<clang::GuardedVarAttr>() const
Line
Count
Source
547
2.57k
  template<typename T> bool hasAttr() const {
548
2.57k
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
2.57k
  }
bool clang::Decl::hasAttr<clang::AnalyzerNoReturnAttr>() const
Line
Count
Source
547
106k
  template<typename T> bool hasAttr() const {
548
106k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())7.15k
;
549
106k
  }
bool clang::Decl::hasAttr<clang::ObjCExceptionAttr>() const
Line
Count
Source
547
2.02k
  template<typename T> bool hasAttr() const {
548
2.02k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())639
;
549
2.02k
  }
bool clang::Decl::hasAttr<clang::AcquireHandleAttr>() const
Line
Count
Source
547
528
  template<typename T> bool hasAttr() const {
548
528
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
549
528
  }
bool clang::Decl::hasAttr<clang::ReleaseHandleAttr>() const
Line
Count
Source
547
450
  template<typename T> bool hasAttr() const {
548
450
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())379
;
549
450
  }
bool clang::Decl::hasAttr<clang::UseHandleAttr>() const
Line
Count
Source
547
169
  template<typename T> bool hasAttr() const {
548
169
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())136
;
549
169
  }
bool clang::Decl::hasAttr<clang::OwnershipAttr>() const
Line
Count
Source
547
8
  template<typename T> bool hasAttr() const {
548
8
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
8
  }
bool clang::Decl::hasAttr<clang::MIGServerRoutineAttr>() const
Line
Count
Source
547
135
  template<typename T> bool hasAttr() const {
548
135
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())52
;
549
135
  }
bool clang::Decl::hasAttr<clang::ReinitializesAttr>() const
Line
Count
Source
547
8.22k
  template<typename T> bool hasAttr() const {
548
8.22k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8
;
549
8.22k
  }
bool clang::Decl::hasAttr<clang::OSConsumedAttr>() const
Line
Count
Source
547
221
  template<typename T> bool hasAttr() const {
548
221
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())25
;
549
221
  }
bool clang::Decl::hasAttr<clang::OSReturnsNotRetainedAttr>() const
Line
Count
Source
547
476
  template<typename T> bool hasAttr() const {
548
476
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())14
;
549
476
  }
bool clang::Decl::hasAttr<clang::OSReturnsRetainedAttr>() const
Line
Count
Source
547
442
  template<typename T> bool hasAttr() const {
548
442
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())28
;
549
442
  }
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedReturnsRetainedAttr>() const
Line
Count
Source
547
4.38k
  template<typename T> bool hasAttr() const {
548
4.38k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())127
;
549
4.38k
  }
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedReturnsNotRetainedAttr>() const
Line
Count
Source
547
4.36k
  template<typename T> bool hasAttr() const {
548
4.36k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())99
;
549
4.36k
  }
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedConsumedAttr>() const
Line
Count
Source
547
2.00k
  template<typename T> bool hasAttr() const {
548
2.00k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())50
;
549
2.00k
  }
bool clang::Decl::hasAttr<clang::OSReturnsRetainedOnZeroAttr>() const
Line
Count
Source
547
159
  template<typename T> bool hasAttr() const {
548
159
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())17
;
549
159
  }
bool clang::Decl::hasAttr<clang::OSReturnsRetainedOnNonZeroAttr>() const
Line
Count
Source
547
160
  template<typename T> bool hasAttr() const {
548
160
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())18
;
549
160
  }
bool clang::Decl::hasAttr<clang::OSConsumesThisAttr>() const
Line
Count
Source
547
255
  template<typename T> bool hasAttr() const {
548
255
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10
;
549
255
  }
bool clang::Decl::hasAttr<clang::StdCallAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::FastCallAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::RegCallAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::ThisCallAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::VectorCallAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::PascalAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::AArch64VectorPcsAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::IntelOclBiccAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::MSABIAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.70k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::SysVABIAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.69k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::PreserveMostAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.69k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::PreserveAllAttr>() const
Line
Count
Source
547
27.5k
  template<typename T> bool hasAttr() const {
548
27.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.69k
;
549
27.5k
  }
bool clang::Decl::hasAttr<clang::DisableTailCallsAttr>() const
Line
Count
Source
547
396k
  template<typename T> bool hasAttr() const {
548
396k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())129k
;
549
396k
  }
bool clang::Decl::hasAttr<clang::ConvergentAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::NoMergeAttr>() const
Line
Count
Source
547
363k
  template<typename T> bool hasAttr() const {
548
363k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())196k
;
549
363k
  }
bool clang::Decl::hasAttr<clang::NoAliasAttr>() const
Line
Count
Source
547
763k
  template<typename T> bool hasAttr() const {
548
763k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())324k
;
549
763k
  }
bool clang::Decl::hasAttr<clang::RestrictAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::AnyX86NoCfCheckAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::LeafAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::NoSpeculativeLoadHardeningAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::SpeculativeLoadHardeningAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::NoSplitStackAttr>() const
Line
Count
Source
547
765k
  template<typename T> bool hasAttr() const {
548
765k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())325k
;
549
765k
  }
bool clang::Decl::hasAttr<clang::FlattenAttr>() const
Line
Count
Source
547
384k
  template<typename T> bool hasAttr() const {
548
384k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())110k
;
549
384k
  }
bool clang::Decl::hasAttr<clang::NotTailCalledAttr>() const
Line
Count
Source
547
341k
  template<typename T> bool hasAttr() const {
548
341k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())179k
;
549
341k
  }
bool clang::Decl::hasAttr<clang::MSAllocatorAttr>() const
Line
Count
Source
547
243k
  template<typename T> bool hasAttr() const {
548
243k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())136k
;
549
243k
  }
bool clang::Decl::hasAttr<clang::StandaloneDebugAttr>() const
Line
Count
Source
547
3.09k
  template<typename T> bool hasAttr() const {
548
3.09k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())375
;
549
3.09k
  }
bool clang::Decl::hasAttr<clang::NoDebugAttr>() const
Line
Count
Source
547
1.31M
  template<typename T> bool hasAttr() const {
548
1.31M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())447k
;
549
1.31M
  }
bool clang::Decl::hasAttr<clang::BTFTagAttr>() const
Line
Count
Source
547
418k
  template<typename T> bool hasAttr() const {
548
418k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())28.2k
;
549
418k
  }
bool clang::Decl::hasAttr<clang::ArtificialAttr>() const
Line
Count
Source
547
98.3k
  template<typename T> bool hasAttr() const {
548
98.3k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())69.5k
;
549
98.3k
  }
bool clang::Decl::hasAttr<clang::ObjCNonLazyClassAttr>() const
Line
Count
Source
547
2.25k
  template<typename T> bool hasAttr() const {
548
2.25k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())87
;
549
2.25k
  }
bool clang::Decl::hasAttr<clang::LTOVisibilityPublicAttr>() const
Line
Count
Source
547
409
  template<typename T> bool hasAttr() const {
548
409
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())95
;
549
409
  }
bool clang::Decl::hasAttr<clang::UuidAttr>() const
Line
Count
Source
547
388
  template<typename T> bool hasAttr() const {
548
388
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())74
;
549
388
  }
bool clang::Decl::hasAttr<clang::NoInstrumentFunctionAttr>() const
Line
Count
Source
547
183
  template<typename T> bool hasAttr() const {
548
183
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())48
;
549
183
  }
bool clang::Decl::hasAttr<clang::DisableSanitizerInstrumentationAttr>() const
Line
Count
Source
547
360k
  template<typename T> bool hasAttr() const {
548
360k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())115k
;
549
360k
  }
bool clang::Decl::hasAttr<clang::CFICanonicalJumpTableAttr>() const
Line
Count
Source
547
366k
  template<typename T> bool hasAttr() const {
548
366k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())117k
;
549
366k
  }
bool clang::Decl::hasAttr<clang::NoProfileFunctionAttr>() const
Line
Count
Source
547
366k
  template<typename T> bool hasAttr() const {
548
366k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())117k
;
549
366k
  }
bool clang::Decl::hasAttr<clang::NoCommonAttr>() const
Line
Count
Source
547
41
  template<typename T> bool hasAttr() const {
548
41
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2
;
549
41
  }
bool clang::Decl::hasAttr<clang::CommonAttr>() const
Line
Count
Source
547
7.54k
  template<typename T> bool hasAttr() const {
548
7.54k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())245
;
549
7.54k
  }
bool clang::Decl::hasAttr<clang::PragmaClangBSSSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::PragmaClangDataSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::PragmaClangRelroSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::PragmaClangRodataSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::NoStackProtectorAttr>() const
Line
Count
Source
547
361k
  template<typename T> bool hasAttr() const {
548
361k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())116k
;
549
361k
  }
bool clang::Decl::hasAttr<clang::NoDuplicateAttr>() const
Line
Count
Source
547
894k
  template<typename T> bool hasAttr() const {
548
894k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())358k
;
549
894k
  }
bool clang::Decl::hasAttr<clang::ColdAttr>() const
Line
Count
Source
547
1.12M
  template<typename T> bool hasAttr() const {
548
1.12M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())442k
;
549
1.12M
  }
bool clang::Decl::hasAttr<clang::HotAttr>() const
Line
Count
Source
547
1.12M
  template<typename T> bool hasAttr() const {
548
1.12M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())442k
;
549
1.12M
  }
bool clang::Decl::hasAttr<clang::RetainAttr>() const
Line
Count
Source
547
398k
  template<typename T> bool hasAttr() const {
548
398k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())119k
;
549
398k
  }
bool clang::Decl::hasAttr<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
547
36.4k
  template<typename T> bool hasAttr() const {
548
36.4k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.39k
;
549
36.4k
  }
bool clang::Decl::hasAttr<clang::AnnotateAttr>() const
Line
Count
Source
547
1.61M
  template<typename T> bool hasAttr() const {
548
1.61M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())121k
;
549
1.61M
  }
bool clang::Decl::hasAttr<clang::MayAliasAttr>() const
Line
Count
Source
547
813k
  template<typename T> bool hasAttr() const {
548
813k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())73.8k
;
549
813k
  }
bool clang::Decl::hasAttr<clang::MSNoVTableAttr>() const
Line
Count
Source
547
856
  template<typename T> bool hasAttr() const {
548
856
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())178
;
549
856
  }
bool clang::Decl::hasAttr<clang::MipsLongCallAttr>() const
Line
Count
Source
547
855
  template<typename T> bool hasAttr() const {
548
855
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())145
;
549
855
  }
bool clang::Decl::hasAttr<clang::MipsShortCallAttr>() const
Line
Count
Source
547
849
  template<typename T> bool hasAttr() const {
548
849
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())139
;
549
849
  }
bool clang::Decl::hasAttr<clang::Mips16Attr>() const
Line
Count
Source
547
402
  template<typename T> bool hasAttr() const {
548
402
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())65
;
549
402
  }
bool clang::Decl::hasAttr<clang::NoMips16Attr>() const
Line
Count
Source
547
401
  template<typename T> bool hasAttr() const {
548
401
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())64
;
549
401
  }
bool clang::Decl::hasAttr<clang::MicroMipsAttr>() const
Line
Count
Source
547
402
  template<typename T> bool hasAttr() const {
548
402
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())65
;
549
402
  }
bool clang::Decl::hasAttr<clang::NoMicroMipsAttr>() const
Line
Count
Source
547
401
  template<typename T> bool hasAttr() const {
548
401
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())64
;
549
401
  }
bool clang::Decl::hasAttr<clang::X86ForceAlignArgPointerAttr>() const
Line
Count
Source
547
191k
  template<typename T> bool hasAttr() const {
548
191k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())91.8k
;
549
191k
  }
bool clang::Decl::hasAttr<clang::IBActionAttr>() const
Line
Count
Source
547
401
  template<typename T> bool hasAttr() const {
548
401
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())26
;
549
401
  }
550
551
  /// getMaxAlignment - return the maximum alignment specified by attributes
552
  /// on this decl, 0 if there are none.
553
  unsigned getMaxAlignment() const;
554
555
  /// setInvalidDecl - Indicates the Decl had a semantic error. This
556
  /// allows for graceful error recovery.
557
  void setInvalidDecl(bool Invalid = true);
558
1.16G
  bool isInvalidDecl() const { return (bool) InvalidDecl; }
559
560
  /// isImplicit - Indicates whether the declaration was implicitly
561
  /// generated by the implementation. If false, this declaration
562
  /// was written explicitly in the source code.
563
101M
  bool isImplicit() const { return Implicit; }
564
23.1M
  void setImplicit(bool I = true) { Implicit = I; }
565
566
  /// Whether *any* (re-)declaration of the entity was used, meaning that
567
  /// a definition is required.
568
  ///
569
  /// \param CheckUsedAttr When true, also consider the "used" attribute
570
  /// (in addition to the "used" bit set by \c setUsed()) when determining
571
  /// whether the function is used.
572
  bool isUsed(bool CheckUsedAttr = true) const;
573
574
  /// Set whether the declaration is used, in the sense of odr-use.
575
  ///
576
  /// This should only be used immediately after creating a declaration.
577
  /// It intentionally doesn't notify any listeners.
578
8.86M
  void setIsUsed() { getCanonicalDecl()->Used = true; }
579
580
  /// Mark the declaration used, in the sense of odr-use.
581
  ///
582
  /// This notifies any mutation listeners in addition to setting a bit
583
  /// indicating the declaration is used.
584
  void markUsed(ASTContext &C);
585
586
  /// Whether any declaration of this entity was referenced.
587
  bool isReferenced() const;
588
589
  /// Whether this declaration was referenced. This should not be relied
590
  /// upon for anything other than debugging.
591
20.7k
  bool isThisDeclarationReferenced() const { return Referenced; }
592
593
158M
  void setReferenced(bool R = true) { Referenced = R; }
594
595
  /// Whether this declaration is a top-level declaration (function,
596
  /// global variable, etc.) that is lexically inside an objc container
597
  /// definition.
598
4.10M
  bool isTopLevelDeclInObjCContainer() const {
599
4.10M
    return TopLevelDeclInObjCContainer;
600
4.10M
  }
601
602
7.71M
  void setTopLevelDeclInObjCContainer(bool V = true) {
603
7.71M
    TopLevelDeclInObjCContainer = V;
604
7.71M
  }
605
606
  /// Looks on this and related declarations for an applicable
607
  /// external source symbol attribute.
608
  ExternalSourceSymbolAttr *getExternalSourceSymbolAttr() const;
609
610
  /// Whether this declaration was marked as being private to the
611
  /// module in which it was defined.
612
4.81M
  bool isModulePrivate() const {
613
4.81M
    return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate;
614
4.81M
  }
615
616
  /// Return true if this declaration has an attribute which acts as
617
  /// definition of the entity, such as 'alias' or 'ifunc'.
618
  bool hasDefiningAttr() const;
619
620
  /// Return this declaration's defining attribute if it has one.
621
  const Attr *getDefiningAttr() const;
622
623
protected:
624
  /// Specify that this declaration was marked as being private
625
  /// to the module in which it was defined.
626
44
  void setModulePrivate() {
627
    // The module-private specifier has no effect on unowned declarations.
628
    // FIXME: We should track this in some way for source fidelity.
629
44
    if (getModuleOwnershipKind() == ModuleOwnershipKind::Unowned)
630
24
      return;
631
20
    setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate);
632
20
  }
633
634
public:
635
  /// Set the FromASTFile flag. This indicates that this declaration
636
  /// was deserialized and not parsed from source code and enables
637
  /// features such as module ownership information.
638
68.4k
  void setFromASTFile() {
639
68.4k
    FromASTFile = true;
640
68.4k
  }
641
642
  /// Set the owning module ID.  This may only be called for
643
  /// deserialized Decls.
644
7.29M
  void setOwningModuleID(unsigned ID) {
645
7.29M
    assert(isFromASTFile() && "Only works on a deserialized declaration");
646
0
    *((unsigned*)this - 2) = ID;
647
7.29M
  }
648
649
public:
650
  /// Determine the availability of the given declaration.
651
  ///
652
  /// This routine will determine the most restrictive availability of
653
  /// the given declaration (e.g., preferring 'unavailable' to
654
  /// 'deprecated').
655
  ///
656
  /// \param Message If non-NULL and the result is not \c
657
  /// AR_Available, will be set to a (possibly empty) message
658
  /// describing why the declaration has not been introduced, is
659
  /// deprecated, or is unavailable.
660
  ///
661
  /// \param EnclosingVersion The version to compare with. If empty, assume the
662
  /// deployment target version.
663
  ///
664
  /// \param RealizedPlatform If non-NULL and the availability result is found
665
  /// in an available attribute it will set to the platform which is written in
666
  /// the available attribute.
667
  AvailabilityResult
668
  getAvailability(std::string *Message = nullptr,
669
                  VersionTuple EnclosingVersion = VersionTuple(),
670
                  StringRef *RealizedPlatform = nullptr) const;
671
672
  /// Retrieve the version of the target platform in which this
673
  /// declaration was introduced.
674
  ///
675
  /// \returns An empty version tuple if this declaration has no 'introduced'
676
  /// availability attributes, or the version tuple that's specified in the
677
  /// attribute otherwise.
678
  VersionTuple getVersionIntroduced() const;
679
680
  /// Determine whether this declaration is marked 'deprecated'.
681
  ///
682
  /// \param Message If non-NULL and the declaration is deprecated,
683
  /// this will be set to the message describing why the declaration
684
  /// was deprecated (which may be empty).
685
1.39M
  bool isDeprecated(std::string *Message = nullptr) const {
686
1.39M
    return getAvailability(Message) == AR_Deprecated;
687
1.39M
  }
688
689
  /// Determine whether this declaration is marked 'unavailable'.
690
  ///
691
  /// \param Message If non-NULL and the declaration is unavailable,
692
  /// this will be set to the message describing why the declaration
693
  /// was made unavailable (which may be empty).
694
1.13M
  bool isUnavailable(std::string *Message = nullptr) const {
695
1.13M
    return getAvailability(Message) == AR_Unavailable;
696
1.13M
  }
697
698
  /// Determine whether this is a weak-imported symbol.
699
  ///
700
  /// Weak-imported symbols are typically marked with the
701
  /// 'weak_import' attribute, but may also be marked with an
702
  /// 'availability' attribute where we're targing a platform prior to
703
  /// the introduction of this feature.
704
  bool isWeakImported() const;
705
706
  /// Determines whether this symbol can be weak-imported,
707
  /// e.g., whether it would be well-formed to add the weak_import
708
  /// attribute.
709
  ///
710
  /// \param IsDefinition Set to \c true to indicate that this
711
  /// declaration cannot be weak-imported because it has a definition.
712
  bool canBeWeakImported(bool &IsDefinition) const;
713
714
  /// Determine whether this declaration came from an AST file (such as
715
  /// a precompiled header or module) rather than having been parsed.
716
585M
  bool isFromASTFile() const { return FromASTFile; }
717
718
  /// Retrieve the global declaration ID associated with this
719
  /// declaration, which specifies where this Decl was loaded from.
720
1.28M
  unsigned getGlobalID() const {
721
1.28M
    if (isFromASTFile())
722
1.28M
      return *((const unsigned*)this - 1);
723
0
    return 0;
724
1.28M
  }
725
726
  /// Retrieve the global ID of the module that owns this particular
727
  /// declaration.
728
1.80M
  unsigned getOwningModuleID() const {
729
1.80M
    if (isFromASTFile())
730
1.75M
      return *((const unsigned*)this - 2);
731
51.6k
    return 0;
732
1.80M
  }
733
734
private:
735
  Module *getOwningModuleSlow() const;
736
737
protected:
738
  bool hasLocalOwningModuleStorage() const;
739
740
public:
741
  /// Get the imported owning module, if this decl is from an imported
742
  /// (non-local) module.
743
2.05M
  Module *getImportedOwningModule() const {
744
2.05M
    if (!isFromASTFile() || 
!hasOwningModule()1.97M
)
745
400k
      return nullptr;
746
747
1.65M
    return getOwningModuleSlow();
748
2.05M
  }
749
750
  /// Get the local owning module, if known. Returns nullptr if owner is
751
  /// not yet known or declaration is not from a module.
752
88.5M
  Module *getLocalOwningModule() const {
753
88.5M
    if (isFromASTFile() || !hasOwningModule())
754
81.5M
      return nullptr;
755
756
6.94M
    assert(hasLocalOwningModuleStorage() &&
757
6.94M
           "owned local decl but no local module storage");
758
0
    return reinterpret_cast<Module *const *>(this)[-1];
759
88.5M
  }
760
248k
  void setLocalOwningModule(Module *M) {
761
248k
    assert(!isFromASTFile() && hasOwningModule() &&
762
248k
           hasLocalOwningModuleStorage() &&
763
248k
           "should not have a cached owning module");
764
0
    reinterpret_cast<Module **>(this)[-1] = M;
765
248k
  }
766
767
  /// Is this declaration owned by some module?
768
91.2M
  bool hasOwningModule() const {
769
91.2M
    return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned;
770
91.2M
  }
771
772
  /// Get the module that owns this declaration (for visibility purposes).
773
88.9M
  Module *getOwningModule() const {
774
88.9M
    return isFromASTFile() ? 
getImportedOwningModule()425k
:
getLocalOwningModule()88.5M
;
775
88.9M
  }
776
777
  /// Get the module that owns this declaration for linkage purposes.
778
  /// There only ever is such a module under the C++ Modules TS.
779
  ///
780
  /// \param IgnoreLinkage Ignore the linkage of the entity; assume that
781
  /// all declarations in a global module fragment are unowned.
782
  Module *getOwningModuleForLinkage(bool IgnoreLinkage = false) const;
783
784
  /// Determine whether this declaration is definitely visible to name lookup,
785
  /// independent of whether the owning module is visible.
786
  /// Note: The declaration may be visible even if this returns \c false if the
787
  /// owning module is visible within the query context. This is a low-level
788
  /// helper function; most code should be calling Sema::isVisible() instead.
789
555M
  bool isUnconditionallyVisible() const {
790
555M
    return (int)getModuleOwnershipKind() <= (int)ModuleOwnershipKind::Visible;
791
555M
  }
792
793
  /// Set that this declaration is globally visible, even if it came from a
794
  /// module that is not visible.
795
7.82M
  void setVisibleDespiteOwningModule() {
796
7.82M
    if (!isUnconditionallyVisible())
797
6.88M
      setModuleOwnershipKind(ModuleOwnershipKind::Visible);
798
7.82M
  }
799
800
  /// Get the kind of module ownership for this declaration.
801
832M
  ModuleOwnershipKind getModuleOwnershipKind() const {
802
832M
    return NextInContextAndBits.getInt();
803
832M
  }
804
805
  /// Set whether this declaration is hidden from name lookup.
806
14.7M
  void setModuleOwnershipKind(ModuleOwnershipKind MOK) {
807
14.7M
    assert(!(getModuleOwnershipKind() == ModuleOwnershipKind::Unowned &&
808
14.7M
             MOK != ModuleOwnershipKind::Unowned && !isFromASTFile() &&
809
14.7M
             !hasLocalOwningModuleStorage()) &&
810
14.7M
           "no storage available for owning module for this declaration");
811
0
    NextInContextAndBits.setInt(MOK);
812
14.7M
  }
813
814
553M
  unsigned getIdentifierNamespace() const {
815
553M
    return IdentifierNamespace;
816
553M
  }
817
818
488M
  bool isInIdentifierNamespace(unsigned NS) const {
819
488M
    return getIdentifierNamespace() & NS;
820
488M
  }
821
822
  static unsigned getIdentifierNamespaceForKind(Kind DK);
823
824
11.8k
  bool hasTagIdentifierNamespace() const {
825
11.8k
    return isTagIdentifierNamespace(getIdentifierNamespace());
826
11.8k
  }
827
828
11.8k
  static bool isTagIdentifierNamespace(unsigned NS) {
829
    // TagDecls have Tag and Type set and may also have TagFriend.
830
11.8k
    return (NS & ~IDNS_TagFriend) == (IDNS_Tag | IDNS_Type);
831
11.8k
  }
832
833
  /// getLexicalDeclContext - The declaration context where this Decl was
834
  /// lexically declared (LexicalDC). May be different from
835
  /// getDeclContext() (SemanticDC).
836
  /// e.g.:
837
  ///
838
  ///   namespace A {
839
  ///      void f(); // SemanticDC == LexicalDC == 'namespace A'
840
  ///   }
841
  ///   void A::f(); // SemanticDC == namespace 'A'
842
  ///                // LexicalDC == global namespace
843
448M
  DeclContext *getLexicalDeclContext() {
844
448M
    if (isInSemaDC())
845
429M
      return getSemanticDC();
846
18.5M
    return getMultipleDC()->LexicalDC;
847
448M
  }
848
218M
  const DeclContext *getLexicalDeclContext() const {
849
218M
    return const_cast<Decl*>(this)->getLexicalDeclContext();
850
218M
  }
851
852
  /// Determine whether this declaration is declared out of line (outside its
853
  /// semantic context).
854
  virtual bool isOutOfLine() const;
855
856
  /// setDeclContext - Set both the semantic and lexical DeclContext
857
  /// to DC.
858
  void setDeclContext(DeclContext *DC);
859
860
  void setLexicalDeclContext(DeclContext *DC);
861
862
  /// Determine whether this declaration is a templated entity (whether it is
863
  // within the scope of a template parameter).
864
  bool isTemplated() const;
865
866
  /// Determine the number of levels of template parameter surrounding this
867
  /// declaration.
868
  unsigned getTemplateDepth() const;
869
870
  /// isDefinedOutsideFunctionOrMethod - This predicate returns true if this
871
  /// scoped decl is defined outside the current function or method.  This is
872
  /// roughly global variables and functions, but also handles enums (which
873
  /// could be defined inside or outside a function etc).
874
1.70M
  bool isDefinedOutsideFunctionOrMethod() const {
875
1.70M
    return getParentFunctionOrMethod() == nullptr;
876
1.70M
  }
877
878
  /// Determine whether a substitution into this declaration would occur as
879
  /// part of a substitution into a dependent local scope. Such a substitution
880
  /// transitively substitutes into all constructs nested within this
881
  /// declaration.
882
  ///
883
  /// This recognizes non-defining declarations as well as members of local
884
  /// classes and lambdas:
885
  /// \code
886
  ///     template<typename T> void foo() { void bar(); }
887
  ///     template<typename T> void foo2() { class ABC { void bar(); }; }
888
  ///     template<typename T> inline int x = [](){ return 0; }();
889
  /// \endcode
890
  bool isInLocalScopeForInstantiation() const;
891
892
  /// If this decl is defined inside a function/method/block it returns
893
  /// the corresponding DeclContext, otherwise it returns null.
894
  const DeclContext *getParentFunctionOrMethod() const;
895
21.3k
  DeclContext *getParentFunctionOrMethod() {
896
21.3k
    return const_cast<DeclContext*>(
897
21.3k
                    const_cast<const Decl*>(this)->getParentFunctionOrMethod());
898
21.3k
  }
899
900
  /// Retrieves the "canonical" declaration of the given declaration.
901
13.9M
  virtual Decl *getCanonicalDecl() { return this; }
902
574M
  const Decl *getCanonicalDecl() const {
903
574M
    return const_cast<Decl*>(this)->getCanonicalDecl();
904
574M
  }
905
906
  /// Whether this particular Decl is a canonical one.
907
4.47M
  bool isCanonicalDecl() const { return getCanonicalDecl() == this; }
908
909
protected:
910
  /// Returns the next redeclaration or itself if this is the only decl.
911
  ///
912
  /// Decl subclasses that can be redeclared should override this method so that
913
  /// Decl::redecl_iterator can iterate over them.
914
4.12M
  virtual Decl *getNextRedeclarationImpl() { return this; }
915
916
  /// Implementation of getPreviousDecl(), to be overridden by any
917
  /// subclass that has a redeclaration chain.
918
8.98M
  virtual Decl *getPreviousDeclImpl() { return nullptr; }
919
920
  /// Implementation of getMostRecentDecl(), to be overridden by any
921
  /// subclass that has a redeclaration chain.
922
11.2M
  virtual Decl *getMostRecentDeclImpl() { return this; }
923
924
public:
925
  /// Iterates through all the redeclarations of the same decl.
926
  class redecl_iterator {
927
    /// Current - The current declaration.
928
    Decl *Current = nullptr;
929
    Decl *Starter;
930
931
  public:
932
    using value_type = Decl *;
933
    using reference = const value_type &;
934
    using pointer = const value_type *;
935
    using iterator_category = std::forward_iterator_tag;
936
    using difference_type = std::ptrdiff_t;
937
938
146M
    redecl_iterator() = default;
939
146M
    explicit redecl_iterator(Decl *C) : Current(C), Starter(C) {}
940
941
164M
    reference operator*() const { return Current; }
942
0
    value_type operator->() const { return Current; }
943
944
163M
    redecl_iterator& operator++() {
945
163M
      assert(Current && "Advancing while iterator has reached end");
946
      // Get either previous decl or latest decl.
947
0
      Decl *Next = Current->getNextRedeclarationImpl();
948
163M
      assert(Next && "Should return next redeclaration or itself, never null!");
949
163M
      Current = (Next != Starter) ? 
Next17.8M
:
nullptr145M
;
950
163M
      return *this;
951
163M
    }
952
953
0
    redecl_iterator operator++(int) {
954
0
      redecl_iterator tmp(*this);
955
0
      ++(*this);
956
0
      return tmp;
957
0
    }
958
959
0
    friend bool operator==(redecl_iterator x, redecl_iterator y) {
960
0
      return x.Current == y.Current;
961
0
    }
962
963
310M
    friend bool operator!=(redecl_iterator x, redecl_iterator y) {
964
310M
      return x.Current != y.Current;
965
310M
    }
966
  };
967
968
  using redecl_range = llvm::iterator_range<redecl_iterator>;
969
970
  /// Returns an iterator range for all the redeclarations of the same
971
  /// decl. It will iterate at least once (when this decl is the only one).
972
146M
  redecl_range redecls() const {
973
146M
    return redecl_range(redecls_begin(), redecls_end());
974
146M
  }
975
976
146M
  redecl_iterator redecls_begin() const {
977
146M
    return redecl_iterator(const_cast<Decl *>(this));
978
146M
  }
979
980
146M
  redecl_iterator redecls_end() const { return redecl_iterator(); }
981
982
  /// Retrieve the previous declaration that declares the same entity
983
  /// as this declaration, or NULL if there is no previous declaration.
984
25.4M
  Decl *getPreviousDecl() { return getPreviousDeclImpl(); }
985
986
  /// Retrieve the previous declaration that declares the same entity
987
  /// as this declaration, or NULL if there is no previous declaration.
988
56.2M
  const Decl *getPreviousDecl() const {
989
56.2M
    return const_cast<Decl *>(this)->getPreviousDeclImpl();
990
56.2M
  }
991
992
  /// True if this is the first declaration in its redeclaration chain.
993
22
  bool isFirstDecl() const {
994
22
    return getPreviousDecl() == nullptr;
995
22
  }
996
997
  /// Retrieve the most recent declaration that declares the same entity
998
  /// as this declaration (which may be this declaration).
999
45.6M
  Decl *getMostRecentDecl() { return getMostRecentDeclImpl(); }
1000
1001
  /// Retrieve the most recent declaration that declares the same entity
1002
  /// as this declaration (which may be this declaration).
1003
189M
  const Decl *getMostRecentDecl() const {
1004
189M
    return const_cast<Decl *>(this)->getMostRecentDeclImpl();
1005
189M
  }
1006
1007
  /// getBody - If this Decl represents a declaration for a body of code,
1008
  ///  such as a function or method definition, this method returns the
1009
  ///  top-level Stmt* of that body.  Otherwise this method returns null.
1010
199k
  virtual Stmt* getBody() const { return nullptr; }
1011
1012
  /// Returns true if this \c Decl represents a declaration for a body of
1013
  /// code, such as a function or method definition.
1014
  /// Note that \c hasBody can also return true if any redeclaration of this
1015
  /// \c Decl represents a declaration for a body of code.
1016
51.9k
  virtual bool hasBody() const { return getBody() != nullptr; }
1017
1018
  /// getBodyRBrace - Gets the right brace of the body, if a body exists.
1019
  /// This works whether the body is a CompoundStmt or a CXXTryStmt.
1020
  SourceLocation getBodyRBrace() const;
1021
1022
  // global temp stats (until we have a per-module visitor)
1023
  static void add(Kind k);
1024
  static void EnableStatistics();
1025
  static void PrintStats();
1026
1027
  /// isTemplateParameter - Determines whether this declaration is a
1028
  /// template parameter.
1029
  bool isTemplateParameter() const;
1030
1031
  /// isTemplateParameter - Determines whether this declaration is a
1032
  /// template parameter pack.
1033
  bool isTemplateParameterPack() const;
1034
1035
  /// Whether this declaration is a parameter pack.
1036
  bool isParameterPack() const;
1037
1038
  /// returns true if this declaration is a template
1039
  bool isTemplateDecl() const;
1040
1041
  /// Whether this declaration is a function or function template.
1042
771k
  bool isFunctionOrFunctionTemplate() const {
1043
771k
    return (DeclKind >= Decl::firstFunction &&
1044
771k
            
DeclKind <= Decl::lastFunction609k
) ||
1045
771k
           
DeclKind == FunctionTemplate174k
;
1046
771k
  }
1047
1048
  /// If this is a declaration that describes some template, this
1049
  /// method returns that template declaration.
1050
  ///
1051
  /// Note that this returns nullptr for partial specializations, because they
1052
  /// are not modeled as TemplateDecls. Use getDescribedTemplateParams to handle
1053
  /// those cases.
1054
  TemplateDecl *getDescribedTemplate() const;
1055
1056
  /// If this is a declaration that describes some template or partial
1057
  /// specialization, this returns the corresponding template parameter list.
1058
  const TemplateParameterList *getDescribedTemplateParams() const;
1059
1060
  /// Returns the function itself, or the templated function if this is a
1061
  /// function template.
1062
  FunctionDecl *getAsFunction() LLVM_READONLY;
1063
1064
5.01M
  const FunctionDecl *getAsFunction() const {
1065
5.01M
    return const_cast<Decl *>(this)->getAsFunction();
1066
5.01M
  }
1067
1068
  /// Changes the namespace of this declaration to reflect that it's
1069
  /// a function-local extern declaration.
1070
  ///
1071
  /// These declarations appear in the lexical context of the extern
1072
  /// declaration, but in the semantic context of the enclosing namespace
1073
  /// scope.
1074
5.46k
  void setLocalExternDecl() {
1075
5.46k
    Decl *Prev = getPreviousDecl();
1076
5.46k
    IdentifierNamespace &= ~IDNS_Ordinary;
1077
1078
    // It's OK for the declaration to still have the "invisible friend" flag or
1079
    // the "conflicts with tag declarations in this scope" flag for the outer
1080
    // scope.
1081
5.46k
    assert((IdentifierNamespace & ~(IDNS_OrdinaryFriend | IDNS_Tag)) == 0 &&
1082
5.46k
           "namespace is not ordinary");
1083
1084
0
    IdentifierNamespace |= IDNS_LocalExtern;
1085
5.46k
    if (Prev && 
Prev->getIdentifierNamespace() & IDNS_Ordinary9
)
1086
0
      IdentifierNamespace |= IDNS_Ordinary;
1087
5.46k
  }
1088
1089
  /// Determine whether this is a block-scope declaration with linkage.
1090
  /// This will either be a local variable declaration declared 'extern', or a
1091
  /// local function declaration.
1092
64.4M
  bool isLocalExternDecl() {
1093
64.4M
    return IdentifierNamespace & IDNS_LocalExtern;
1094
64.4M
  }
1095
1096
  /// Changes the namespace of this declaration to reflect that it's
1097
  /// the object of a friend declaration.
1098
  ///
1099
  /// These declarations appear in the lexical context of the friending
1100
  /// class, but in the semantic context of the actual entity.  This property
1101
  /// applies only to a specific decl object;  other redeclarations of the
1102
  /// same entity may not (and probably don't) share this property.
1103
85.0k
  void setObjectOfFriendDecl(bool PerformFriendInjection = false) {
1104
85.0k
    unsigned OldNS = IdentifierNamespace;
1105
85.0k
    assert((OldNS & (IDNS_Tag | IDNS_Ordinary |
1106
85.0k
                     IDNS_TagFriend | IDNS_OrdinaryFriend |
1107
85.0k
                     IDNS_LocalExtern | IDNS_NonMemberOperator)) &&
1108
85.0k
           "namespace includes neither ordinary nor tag");
1109
0
    assert(!(OldNS & ~(IDNS_Tag | IDNS_Ordinary | IDNS_Type |
1110
85.0k
                       IDNS_TagFriend | IDNS_OrdinaryFriend |
1111
85.0k
                       IDNS_LocalExtern | IDNS_NonMemberOperator)) &&
1112
85.0k
           "namespace includes other than ordinary or tag");
1113
1114
0
    Decl *Prev = getPreviousDecl();
1115
85.0k
    IdentifierNamespace &= ~(IDNS_Ordinary | IDNS_Tag | IDNS_Type);
1116
1117
85.0k
    if (OldNS & (IDNS_Tag | IDNS_TagFriend)) {
1118
15.0k
      IdentifierNamespace |= IDNS_TagFriend;
1119
15.0k
      if (PerformFriendInjection ||
1120
15.0k
          
(15.0k
Prev15.0k
&&
Prev->getIdentifierNamespace() & IDNS_Tag7.34k
))
1121
7.11k
        IdentifierNamespace |= IDNS_Tag | IDNS_Type;
1122
15.0k
    }
1123
1124
85.0k
    if (OldNS & (IDNS_Ordinary | IDNS_OrdinaryFriend |
1125
85.0k
                 IDNS_LocalExtern | IDNS_NonMemberOperator)) {
1126
84.0k
      IdentifierNamespace |= IDNS_OrdinaryFriend;
1127
84.0k
      if (PerformFriendInjection ||
1128
84.0k
          (Prev && 
Prev->getIdentifierNamespace() & IDNS_Ordinary9.27k
))
1129
8.87k
        IdentifierNamespace |= IDNS_Ordinary;
1130
84.0k
    }
1131
85.0k
  }
1132
1133
  enum FriendObjectKind {
1134
    FOK_None,      ///< Not a friend object.
1135
    FOK_Declared,  ///< A friend of a previously-declared entity.
1136
    FOK_Undeclared ///< A friend of a previously-undeclared entity.
1137
  };
1138
1139
  /// Determines whether this declaration is the object of a
1140
  /// friend declaration and, if so, what kind.
1141
  ///
1142
  /// There is currently no direct way to find the associated FriendDecl.
1143
172M
  FriendObjectKind getFriendObjectKind() const {
1144
172M
    unsigned mask =
1145
172M
        (IdentifierNamespace & (IDNS_TagFriend | IDNS_OrdinaryFriend));
1146
172M
    if (!mask) 
return FOK_None171M
;
1147
526k
    return (IdentifierNamespace & (IDNS_Tag | IDNS_Ordinary) ? 
FOK_Declared68.2k
1148
526k
                                                             : 
FOK_Undeclared458k
);
1149
172M
  }
1150
1151
  /// Specifies that this declaration is a C++ overloaded non-member.
1152
113k
  void setNonMemberOperator() {
1153
113k
    assert(getKind() == Function || getKind() == FunctionTemplate);
1154
0
    assert((IdentifierNamespace & IDNS_Ordinary) &&
1155
113k
           "visible non-member operators should be in ordinary namespace");
1156
0
    IdentifierNamespace |= IDNS_NonMemberOperator;
1157
113k
  }
1158
1159
3.63G
  static bool classofKind(Kind K) { return true; }
1160
  static DeclContext *castToDeclContext(const Decl *);
1161
  static Decl *castFromDeclContext(const DeclContext *);
1162
1163
  void print(raw_ostream &Out, unsigned Indentation = 0,
1164
             bool PrintInstantiation = false) const;
1165
  void print(raw_ostream &Out, const PrintingPolicy &Policy,
1166
             unsigned Indentation = 0, bool PrintInstantiation = false) const;
1167
  static void printGroup(Decl** Begin, unsigned NumDecls,
1168
                         raw_ostream &Out, const PrintingPolicy &Policy,
1169
                         unsigned Indentation = 0);
1170
1171
  // Debuggers don't usually respect default arguments.
1172
  void dump() const;
1173
1174
  // Same as dump(), but forces color printing.
1175
  void dumpColor() const;
1176
1177
  void dump(raw_ostream &Out, bool Deserialize = false,
1178
            ASTDumpOutputFormat OutputFormat = ADOF_Default) const;
1179
1180
  /// \return Unique reproducible object identifier
1181
  int64_t getID() const;
1182
1183
  /// Looks through the Decl's underlying type to extract a FunctionType
1184
  /// when possible. Will return null if the type underlying the Decl does not
1185
  /// have a FunctionType.
1186
  const FunctionType *getFunctionType(bool BlocksToo = true) const;
1187
1188
private:
1189
  void setAttrsImpl(const AttrVec& Attrs, ASTContext &Ctx);
1190
  void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
1191
                           ASTContext &Ctx);
1192
1193
protected:
1194
  ASTMutationListener *getASTMutationListener() const;
1195
};
1196
1197
/// Determine whether two declarations declare the same entity.
1198
10.6M
inline bool declaresSameEntity(const Decl *D1, const Decl *D2) {
1199
10.6M
  if (!D1 || 
!D210.6M
)
1200
1.66k
    return false;
1201
1202
10.6M
  if (D1 == D2)
1203
3.62M
    return true;
1204
1205
6.98M
  return D1->getCanonicalDecl() == D2->getCanonicalDecl();
1206
10.6M
}
1207
1208
/// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when
1209
/// doing something to a specific decl.
1210
class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry {
1211
  const Decl *TheDecl;
1212
  SourceLocation Loc;
1213
  SourceManager &SM;
1214
  const char *Message;
1215
1216
public:
1217
  PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L,
1218
                       SourceManager &sm, const char *Msg)
1219
24.7M
      : TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {}
1220
1221
  void print(raw_ostream &OS) const override;
1222
};
1223
} // namespace clang
1224
1225
// Required to determine the layout of the PointerUnion<NamedDecl*> before
1226
// seeing the NamedDecl definition being first used in DeclListNode::operator*.
1227
namespace llvm {
1228
  template <> struct PointerLikeTypeTraits<::clang::NamedDecl *> {
1229
108M
    static inline void *getAsVoidPointer(::clang::NamedDecl *P) { return P; }
1230
122M
    static inline ::clang::NamedDecl *getFromVoidPointer(void *P) {
1231
122M
      return static_cast<::clang::NamedDecl *>(P);
1232
122M
    }
1233
    static constexpr int NumLowBitsAvailable = 3;
1234
  };
1235
}
1236
1237
namespace clang {
1238
/// A list storing NamedDecls in the lookup tables.
1239
class DeclListNode {
1240
  friend class ASTContext; // allocate, deallocate nodes.
1241
  friend class StoredDeclsList;
1242
public:
1243
  using Decls = llvm::PointerUnion<NamedDecl*, DeclListNode*>;
1244
  class iterator {
1245
    friend class DeclContextLookupResult;
1246
    friend class StoredDeclsList;
1247
1248
    Decls Ptr;
1249
213M
    iterator(Decls Node) : Ptr(Node) { }
1250
  public:
1251
    using difference_type = ptrdiff_t;
1252
    using value_type = NamedDecl*;
1253
    using pointer = void;
1254
    using reference = value_type;
1255
    using iterator_category = std::forward_iterator_tag;
1256
1257
223M
    iterator() = default;
1258
1259
153M
    reference operator*() const {
1260
153M
      assert(Ptr && "dereferencing end() iterator");
1261
153M
      if (DeclListNode *CurNode = Ptr.dyn_cast<DeclListNode*>())
1262
72.1M
        return CurNode->D;
1263
81.3M
      return Ptr.get<NamedDecl*>();
1264
153M
    }
1265
0
    void operator->() const { } // Unsupported.
1266
111M
    bool operator==(const iterator &X) const { return Ptr == X.Ptr; }
1267
255M
    bool operator!=(const iterator &X) const { return Ptr != X.Ptr; }
1268
150M
    inline iterator &operator++() { // ++It
1269
150M
      assert(!Ptr.isNull() && "Advancing empty iterator");
1270
1271
150M
      if (DeclListNode *CurNode = Ptr.dyn_cast<DeclListNode*>())
1272
74.7M
        Ptr = CurNode->Rest;
1273
75.2M
      else
1274
75.2M
        Ptr = nullptr;
1275
150M
      return *this;
1276
150M
    }
1277
215
    iterator operator++(int) { // It++
1278
215
      iterator temp = *this;
1279
215
      ++(*this);
1280
215
      return temp;
1281
215
    }
1282
    // Enables the pattern for (iterator I =..., E = I.end(); I != E; ++I)
1283
1.65M
    iterator end() { return iterator(); }
1284
  };
1285
private:
1286
  NamedDecl *D = nullptr;
1287
  Decls Rest = nullptr;
1288
5.49M
  DeclListNode(NamedDecl *ND) : D(ND) {}
1289
};
1290
1291
/// The results of name lookup within a DeclContext.
1292
class DeclContextLookupResult {
1293
  using Decls = DeclListNode::Decls;
1294
1295
  /// When in collection form, this is what the Data pointer points to.
1296
  Decls Result;
1297
1298
public:
1299
167M
  DeclContextLookupResult() = default;
1300
88.0M
  DeclContextLookupResult(Decls Result) : Result(Result) {}
1301
1302
  using iterator = DeclListNode::iterator;
1303
  using const_iterator = iterator;
1304
  using reference = iterator::reference;
1305
1306
212M
  iterator begin() { return iterator(Result); }
1307
212M
  iterator end() { return iterator(); }
1308
3.51M
  const_iterator begin() const {
1309
3.51M
    return const_cast<DeclContextLookupResult*>(this)->begin();
1310
3.51M
  }
1311
1.86M
  const_iterator end() const { return iterator(); }
1312
1313
39.0M
  bool empty() const { return Result.isNull();  }
1314
1.84k
  bool isSingleResult() const { return Result.dyn_cast<NamedDecl*>(); }
1315
1.64M
  reference front() const { return *begin(); }
1316
1317
  // Find the first declaration of the given type in the list. Note that this
1318
  // is not in general the earliest-declared declaration, and should only be
1319
  // used when it's not possible for there to be more than one match or where
1320
  // it doesn't matter which one is found.
1321
790k
  template<class T> T *find_first() const {
1322
790k
    for (auto *D : *this)
1323
4.27k
      if (T *Decl = dyn_cast<T>(D))
1324
4.27k
        return Decl;
1325
1326
786k
    return nullptr;
1327
790k
  }
clang::ObjCPropertyDecl* clang::DeclContextLookupResult::find_first<clang::ObjCPropertyDecl>() const
Line
Count
Source
1321
790k
  template<class T> T *find_first() const {
1322
790k
    for (auto *D : *this)
1323
4.23k
      if (T *Decl = dyn_cast<T>(D))
1324
4.22k
        return Decl;
1325
1326
786k
    return nullptr;
1327
790k
  }
clang::FieldDecl* clang::DeclContextLookupResult::find_first<clang::FieldDecl>() const
Line
Count
Source
1321
44
  template<class T> T *find_first() const {
1322
44
    for (auto *D : *this)
1323
45
      if (T *Decl = dyn_cast<T>(D))
1324
44
        return Decl;
1325
1326
0
    return nullptr;
1327
44
  }
1328
};
1329
1330
/// DeclContext - This is used only as base class of specific decl types that
1331
/// can act as declaration contexts. These decls are (only the top classes
1332
/// that directly derive from DeclContext are mentioned, not their subclasses):
1333
///
1334
///   TranslationUnitDecl
1335
///   ExternCContext
1336
///   NamespaceDecl
1337
///   TagDecl
1338
///   OMPDeclareReductionDecl
1339
///   OMPDeclareMapperDecl
1340
///   FunctionDecl
1341
///   ObjCMethodDecl
1342
///   ObjCContainerDecl
1343
///   LinkageSpecDecl
1344
///   ExportDecl
1345
///   BlockDecl
1346
///   CapturedDecl
1347
class DeclContext {
1348
  /// For makeDeclVisibleInContextImpl
1349
  friend class ASTDeclReader;
1350
  /// For reconcileExternalVisibleStorage, CreateStoredDeclsMap,
1351
  /// hasNeedToReconcileExternalVisibleStorage
1352
  friend class ExternalASTSource;
1353
  /// For CreateStoredDeclsMap
1354
  friend class DependentDiagnostic;
1355
  /// For hasNeedToReconcileExternalVisibleStorage,
1356
  /// hasLazyLocalLexicalLookups, hasLazyExternalLexicalLookups
1357
  friend class ASTWriter;
1358
1359
  // We use uint64_t in the bit-fields below since some bit-fields
1360
  // cross the unsigned boundary and this breaks the packing.
1361
1362
  /// Stores the bits used by DeclContext.
1363
  /// If modified NumDeclContextBit, the ctor of DeclContext and the accessor
1364
  /// methods in DeclContext should be updated appropriately.
1365
  class DeclContextBitfields {
1366
    friend class DeclContext;
1367
    /// DeclKind - This indicates which class this is.
1368
    uint64_t DeclKind : 7;
1369
1370
    /// Whether this declaration context also has some external
1371
    /// storage that contains additional declarations that are lexically
1372
    /// part of this context.
1373
    mutable uint64_t ExternalLexicalStorage : 1;
1374
1375
    /// Whether this declaration context also has some external
1376
    /// storage that contains additional declarations that are visible
1377
    /// in this context.
1378
    mutable uint64_t ExternalVisibleStorage : 1;
1379
1380
    /// Whether this declaration context has had externally visible
1381
    /// storage added since the last lookup. In this case, \c LookupPtr's
1382
    /// invariant may not hold and needs to be fixed before we perform
1383
    /// another lookup.
1384
    mutable uint64_t NeedToReconcileExternalVisibleStorage : 1;
1385
1386
    /// If \c true, this context may have local lexical declarations
1387
    /// that are missing from the lookup table.
1388
    mutable uint64_t HasLazyLocalLexicalLookups : 1;
1389
1390
    /// If \c true, the external source may have lexical declarations
1391
    /// that are missing from the lookup table.
1392
    mutable uint64_t HasLazyExternalLexicalLookups : 1;
1393
1394
    /// If \c true, lookups should only return identifier from
1395
    /// DeclContext scope (for example TranslationUnit). Used in
1396
    /// LookupQualifiedName()
1397
    mutable uint64_t UseQualifiedLookup : 1;
1398
  };
1399
1400
  /// Number of bits in DeclContextBitfields.
1401
  enum { NumDeclContextBits = 13 };
1402
1403
  /// Stores the bits used by TagDecl.
1404
  /// If modified NumTagDeclBits and the accessor
1405
  /// methods in TagDecl should be updated appropriately.
1406
  class TagDeclBitfields {
1407
    friend class TagDecl;
1408
    /// For the bits in DeclContextBitfields
1409
    uint64_t : NumDeclContextBits;
1410
1411
    /// The TagKind enum.
1412
    uint64_t TagDeclKind : 3;
1413
1414
    /// True if this is a definition ("struct foo {};"), false if it is a
1415
    /// declaration ("struct foo;").  It is not considered a definition
1416
    /// until the definition has been fully processed.
1417
    uint64_t IsCompleteDefinition : 1;
1418
1419
    /// True if this is currently being defined.
1420
    uint64_t IsBeingDefined : 1;
1421
1422
    /// True if this tag declaration is "embedded" (i.e., defined or declared
1423
    /// for the very first time) in the syntax of a declarator.
1424
    uint64_t IsEmbeddedInDeclarator : 1;
1425
1426
    /// True if this tag is free standing, e.g. "struct foo;".
1427
    uint64_t IsFreeStanding : 1;
1428
1429
    /// Indicates whether it is possible for declarations of this kind
1430
    /// to have an out-of-date definition.
1431
    ///
1432
    /// This option is only enabled when modules are enabled.
1433
    uint64_t MayHaveOutOfDateDef : 1;
1434
1435
    /// Has the full definition of this type been required by a use somewhere in
1436
    /// the TU.
1437
    uint64_t IsCompleteDefinitionRequired : 1;
1438
  };
1439
1440
  /// Number of non-inherited bits in TagDeclBitfields.
1441
  enum { NumTagDeclBits = 9 };
1442
1443
  /// Stores the bits used by EnumDecl.
1444
  /// If modified NumEnumDeclBit and the accessor
1445
  /// methods in EnumDecl should be updated appropriately.
1446
  class EnumDeclBitfields {
1447
    friend class EnumDecl;
1448
    /// For the bits in DeclContextBitfields.
1449
    uint64_t : NumDeclContextBits;
1450
    /// For the bits in TagDeclBitfields.
1451
    uint64_t : NumTagDeclBits;
1452
1453
    /// Width in bits required to store all the non-negative
1454
    /// enumerators of this enum.
1455
    uint64_t NumPositiveBits : 8;
1456
1457
    /// Width in bits required to store all the negative
1458
    /// enumerators of this enum.
1459
    uint64_t NumNegativeBits : 8;
1460
1461
    /// True if this tag declaration is a scoped enumeration. Only
1462
    /// possible in C++11 mode.
1463
    uint64_t IsScoped : 1;
1464
1465
    /// If this tag declaration is a scoped enum,
1466
    /// then this is true if the scoped enum was declared using the class
1467
    /// tag, false if it was declared with the struct tag. No meaning is
1468
    /// associated if this tag declaration is not a scoped enum.
1469
    uint64_t IsScopedUsingClassTag : 1;
1470
1471
    /// True if this is an enumeration with fixed underlying type. Only
1472
    /// possible in C++11, Microsoft extensions, or Objective C mode.
1473
    uint64_t IsFixed : 1;
1474
1475
    /// True if a valid hash is stored in ODRHash.
1476
    uint64_t HasODRHash : 1;
1477
  };
1478
1479
  /// Number of non-inherited bits in EnumDeclBitfields.
1480
  enum { NumEnumDeclBits = 20 };
1481
1482
  /// Stores the bits used by RecordDecl.
1483
  /// If modified NumRecordDeclBits and the accessor
1484
  /// methods in RecordDecl should be updated appropriately.
1485
  class RecordDeclBitfields {
1486
    friend class RecordDecl;
1487
    /// For the bits in DeclContextBitfields.
1488
    uint64_t : NumDeclContextBits;
1489
    /// For the bits in TagDeclBitfields.
1490
    uint64_t : NumTagDeclBits;
1491
1492
    /// This is true if this struct ends with a flexible
1493
    /// array member (e.g. int X[]) or if this union contains a struct that does.
1494
    /// If so, this cannot be contained in arrays or other structs as a member.
1495
    uint64_t HasFlexibleArrayMember : 1;
1496
1497
    /// Whether this is the type of an anonymous struct or union.
1498
    uint64_t AnonymousStructOrUnion : 1;
1499
1500
    /// This is true if this struct has at least one member
1501
    /// containing an Objective-C object pointer type.
1502
    uint64_t HasObjectMember : 1;
1503
1504
    /// This is true if struct has at least one member of
1505
    /// 'volatile' type.
1506
    uint64_t HasVolatileMember : 1;
1507
1508
    /// Whether the field declarations of this record have been loaded
1509
    /// from external storage. To avoid unnecessary deserialization of
1510
    /// methods/nested types we allow deserialization of just the fields
1511
    /// when needed.
1512
    mutable uint64_t LoadedFieldsFromExternalStorage : 1;
1513
1514
    /// Basic properties of non-trivial C structs.
1515
    uint64_t NonTrivialToPrimitiveDefaultInitialize : 1;
1516
    uint64_t NonTrivialToPrimitiveCopy : 1;
1517
    uint64_t NonTrivialToPrimitiveDestroy : 1;
1518
1519
    /// The following bits indicate whether this is or contains a C union that
1520
    /// is non-trivial to default-initialize, destruct, or copy. These bits
1521
    /// imply the associated basic non-triviality predicates declared above.
1522
    uint64_t HasNonTrivialToPrimitiveDefaultInitializeCUnion : 1;
1523
    uint64_t HasNonTrivialToPrimitiveDestructCUnion : 1;
1524
    uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1;
1525
1526
    /// Indicates whether this struct is destroyed in the callee.
1527
    uint64_t ParamDestroyedInCallee : 1;
1528
1529
    /// Represents the way this type is passed to a function.
1530
    uint64_t ArgPassingRestrictions : 2;
1531
  };
1532
1533
  /// Number of non-inherited bits in RecordDeclBitfields.
1534
  enum { NumRecordDeclBits = 14 };
1535
1536
  /// Stores the bits used by OMPDeclareReductionDecl.
1537
  /// If modified NumOMPDeclareReductionDeclBits and the accessor
1538
  /// methods in OMPDeclareReductionDecl should be updated appropriately.
1539
  class OMPDeclareReductionDeclBitfields {
1540
    friend class OMPDeclareReductionDecl;
1541
    /// For the bits in DeclContextBitfields
1542
    uint64_t : NumDeclContextBits;
1543
1544
    /// Kind of initializer,
1545
    /// function call or omp_priv<init_expr> initializtion.
1546
    uint64_t InitializerKind : 2;
1547
  };
1548
1549
  /// Number of non-inherited bits in OMPDeclareReductionDeclBitfields.
1550
  enum { NumOMPDeclareReductionDeclBits = 2 };
1551
1552
  /// Stores the bits used by FunctionDecl.
1553
  /// If modified NumFunctionDeclBits and the accessor
1554
  /// methods in FunctionDecl and CXXDeductionGuideDecl
1555
  /// (for IsCopyDeductionCandidate) should be updated appropriately.
1556
  class FunctionDeclBitfields {
1557
    friend class FunctionDecl;
1558
    /// For IsCopyDeductionCandidate
1559
    friend class CXXDeductionGuideDecl;
1560
    /// For the bits in DeclContextBitfields.
1561
    uint64_t : NumDeclContextBits;
1562
1563
    uint64_t SClass : 3;
1564
    uint64_t IsInline : 1;
1565
    uint64_t IsInlineSpecified : 1;
1566
1567
    uint64_t IsVirtualAsWritten : 1;
1568
    uint64_t IsPure : 1;
1569
    uint64_t HasInheritedPrototype : 1;
1570
    uint64_t HasWrittenPrototype : 1;
1571
    uint64_t IsDeleted : 1;
1572
    /// Used by CXXMethodDecl
1573
    uint64_t IsTrivial : 1;
1574
1575
    /// This flag indicates whether this function is trivial for the purpose of
1576
    /// calls. This is meaningful only when this function is a copy/move
1577
    /// constructor or a destructor.
1578
    uint64_t IsTrivialForCall : 1;
1579
1580
    uint64_t IsDefaulted : 1;
1581
    uint64_t IsExplicitlyDefaulted : 1;
1582
    uint64_t HasDefaultedFunctionInfo : 1;
1583
    uint64_t HasImplicitReturnZero : 1;
1584
    uint64_t IsLateTemplateParsed : 1;
1585
1586
    /// Kind of contexpr specifier as defined by ConstexprSpecKind.
1587
    uint64_t ConstexprKind : 2;
1588
    uint64_t InstantiationIsPending : 1;
1589
1590
    /// Indicates if the function uses __try.
1591
    uint64_t UsesSEHTry : 1;
1592
1593
    /// Indicates if the function was a definition
1594
    /// but its body was skipped.
1595
    uint64_t HasSkippedBody : 1;
1596
1597
    /// Indicates if the function declaration will
1598
    /// have a body, once we're done parsing it.
1599
    uint64_t WillHaveBody : 1;
1600
1601
    /// Indicates that this function is a multiversioned
1602
    /// function using attribute 'target'.
1603
    uint64_t IsMultiVersion : 1;
1604
1605
    /// [C++17] Only used by CXXDeductionGuideDecl. Indicates that
1606
    /// the Deduction Guide is the implicitly generated 'copy
1607
    /// deduction candidate' (is used during overload resolution).
1608
    uint64_t IsCopyDeductionCandidate : 1;
1609
1610
    /// Store the ODRHash after first calculation.
1611
    uint64_t HasODRHash : 1;
1612
1613
    /// Indicates if the function uses Floating Point Constrained Intrinsics
1614
    uint64_t UsesFPIntrin : 1;
1615
  };
1616
1617
  /// Number of non-inherited bits in FunctionDeclBitfields.
1618
  enum { NumFunctionDeclBits = 27 };
1619
1620
  /// Stores the bits used by CXXConstructorDecl. If modified
1621
  /// NumCXXConstructorDeclBits and the accessor
1622
  /// methods in CXXConstructorDecl should be updated appropriately.
1623
  class CXXConstructorDeclBitfields {
1624
    friend class CXXConstructorDecl;
1625
    /// For the bits in DeclContextBitfields.
1626
    uint64_t : NumDeclContextBits;
1627
    /// For the bits in FunctionDeclBitfields.
1628
    uint64_t : NumFunctionDeclBits;
1629
1630
    /// 24 bits to fit in the remaining available space.
1631
    /// Note that this makes CXXConstructorDeclBitfields take
1632
    /// exactly 64 bits and thus the width of NumCtorInitializers
1633
    /// will need to be shrunk if some bit is added to NumDeclContextBitfields,
1634
    /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields.
1635
    uint64_t NumCtorInitializers : 21;
1636
    uint64_t IsInheritingConstructor : 1;
1637
1638
    /// Whether this constructor has a trail-allocated explicit specifier.
1639
    uint64_t HasTrailingExplicitSpecifier : 1;
1640
    /// If this constructor does't have a trail-allocated explicit specifier.
1641
    /// Whether this constructor is explicit specified.
1642
    uint64_t IsSimpleExplicit : 1;
1643
  };
1644
1645
  /// Number of non-inherited bits in CXXConstructorDeclBitfields.
1646
  enum {
1647
    NumCXXConstructorDeclBits = 64 - NumDeclContextBits - NumFunctionDeclBits
1648
  };
1649
1650
  /// Stores the bits used by ObjCMethodDecl.
1651
  /// If modified NumObjCMethodDeclBits and the accessor
1652
  /// methods in ObjCMethodDecl should be updated appropriately.
1653
  class ObjCMethodDeclBitfields {
1654
    friend class ObjCMethodDecl;
1655
1656
    /// For the bits in DeclContextBitfields.
1657
    uint64_t : NumDeclContextBits;
1658
1659
    /// The conventional meaning of this method; an ObjCMethodFamily.
1660
    /// This is not serialized; instead, it is computed on demand and
1661
    /// cached.
1662
    mutable uint64_t Family : ObjCMethodFamilyBitWidth;
1663
1664
    /// instance (true) or class (false) method.
1665
    uint64_t IsInstance : 1;
1666
    uint64_t IsVariadic : 1;
1667
1668
    /// True if this method is the getter or setter for an explicit property.
1669
    uint64_t IsPropertyAccessor : 1;
1670
1671
    /// True if this method is a synthesized property accessor stub.
1672
    uint64_t IsSynthesizedAccessorStub : 1;
1673
1674
    /// Method has a definition.
1675
    uint64_t IsDefined : 1;
1676
1677
    /// Method redeclaration in the same interface.
1678
    uint64_t IsRedeclaration : 1;
1679
1680
    /// Is redeclared in the same interface.
1681
    mutable uint64_t HasRedeclaration : 1;
1682
1683
    /// \@required/\@optional
1684
    uint64_t DeclImplementation : 2;
1685
1686
    /// in, inout, etc.
1687
    uint64_t objcDeclQualifier : 7;
1688
1689
    /// Indicates whether this method has a related result type.
1690
    uint64_t RelatedResultType : 1;
1691
1692
    /// Whether the locations of the selector identifiers are in a
1693
    /// "standard" position, a enum SelectorLocationsKind.
1694
    uint64_t SelLocsKind : 2;
1695
1696
    /// Whether this method overrides any other in the class hierarchy.
1697
    ///
1698
    /// A method is said to override any method in the class's
1699
    /// base classes, its protocols, or its categories' protocols, that has
1700
    /// the same selector and is of the same kind (class or instance).
1701
    /// A method in an implementation is not considered as overriding the same
1702
    /// method in the interface or its categories.
1703
    uint64_t IsOverriding : 1;
1704
1705
    /// Indicates if the method was a definition but its body was skipped.
1706
    uint64_t HasSkippedBody : 1;
1707
  };
1708
1709
  /// Number of non-inherited bits in ObjCMethodDeclBitfields.
1710
  enum { NumObjCMethodDeclBits = 24 };
1711
1712
  /// Stores the bits used by ObjCContainerDecl.
1713
  /// If modified NumObjCContainerDeclBits and the accessor
1714
  /// methods in ObjCContainerDecl should be updated appropriately.
1715
  class ObjCContainerDeclBitfields {
1716
    friend class ObjCContainerDecl;
1717
    /// For the bits in DeclContextBitfields
1718
    uint32_t : NumDeclContextBits;
1719
1720
    // Not a bitfield but this saves space.
1721
    // Note that ObjCContainerDeclBitfields is full.
1722
    SourceLocation AtStart;
1723
  };
1724
1725
  /// Number of non-inherited bits in ObjCContainerDeclBitfields.
1726
  /// Note that here we rely on the fact that SourceLocation is 32 bits
1727
  /// wide. We check this with the static_assert in the ctor of DeclContext.
1728
  enum { NumObjCContainerDeclBits = 64 - NumDeclContextBits };
1729
1730
  /// Stores the bits used by LinkageSpecDecl.
1731
  /// If modified NumLinkageSpecDeclBits and the accessor
1732
  /// methods in LinkageSpecDecl should be updated appropriately.
1733
  class LinkageSpecDeclBitfields {
1734
    friend class LinkageSpecDecl;
1735
    /// For the bits in DeclContextBitfields.
1736
    uint64_t : NumDeclContextBits;
1737
1738
    /// The language for this linkage specification with values
1739
    /// in the enum LinkageSpecDecl::LanguageIDs.
1740
    uint64_t Language : 3;
1741
1742
    /// True if this linkage spec has braces.
1743
    /// This is needed so that hasBraces() returns the correct result while the
1744
    /// linkage spec body is being parsed.  Once RBraceLoc has been set this is
1745
    /// not used, so it doesn't need to be serialized.
1746
    uint64_t HasBraces : 1;
1747
  };
1748
1749
  /// Number of non-inherited bits in LinkageSpecDeclBitfields.
1750
  enum { NumLinkageSpecDeclBits = 4 };
1751
1752
  /// Stores the bits used by BlockDecl.
1753
  /// If modified NumBlockDeclBits and the accessor
1754
  /// methods in BlockDecl should be updated appropriately.
1755
  class BlockDeclBitfields {
1756
    friend class BlockDecl;
1757
    /// For the bits in DeclContextBitfields.
1758
    uint64_t : NumDeclContextBits;
1759
1760
    uint64_t IsVariadic : 1;
1761
    uint64_t CapturesCXXThis : 1;
1762
    uint64_t BlockMissingReturnType : 1;
1763
    uint64_t IsConversionFromLambda : 1;
1764
1765
    /// A bit that indicates this block is passed directly to a function as a
1766
    /// non-escaping parameter.
1767
    uint64_t DoesNotEscape : 1;
1768
1769
    /// A bit that indicates whether it's possible to avoid coying this block to
1770
    /// the heap when it initializes or is assigned to a local variable with
1771
    /// automatic storage.
1772
    uint64_t CanAvoidCopyToHeap : 1;
1773
  };
1774
1775
  /// Number of non-inherited bits in BlockDeclBitfields.
1776
  enum { NumBlockDeclBits = 5 };
1777
1778
  /// Pointer to the data structure used to lookup declarations
1779
  /// within this context (or a DependentStoredDeclsMap if this is a
1780
  /// dependent context). We maintain the invariant that, if the map
1781
  /// contains an entry for a DeclarationName (and we haven't lazily
1782
  /// omitted anything), then it contains all relevant entries for that
1783
  /// name (modulo the hasExternalDecls() flag).
1784
  mutable StoredDeclsMap *LookupPtr = nullptr;
1785
1786
protected:
1787
  /// This anonymous union stores the bits belonging to DeclContext and classes
1788
  /// deriving from it. The goal is to use otherwise wasted
1789
  /// space in DeclContext to store data belonging to derived classes.
1790
  /// The space saved is especially significient when pointers are aligned
1791
  /// to 8 bytes. In this case due to alignment requirements we have a
1792
  /// little less than 8 bytes free in DeclContext which we can use.
1793
  /// We check that none of the classes in this union is larger than
1794
  /// 8 bytes with static_asserts in the ctor of DeclContext.
1795
  union {
1796
    DeclContextBitfields DeclContextBits;
1797
    TagDeclBitfields TagDeclBits;
1798
    EnumDeclBitfields EnumDeclBits;
1799
    RecordDeclBitfields RecordDeclBits;
1800
    OMPDeclareReductionDeclBitfields OMPDeclareReductionDeclBits;
1801
    FunctionDeclBitfields FunctionDeclBits;
1802
    CXXConstructorDeclBitfields CXXConstructorDeclBits;
1803
    ObjCMethodDeclBitfields ObjCMethodDeclBits;
1804
    ObjCContainerDeclBitfields ObjCContainerDeclBits;
1805
    LinkageSpecDeclBitfields LinkageSpecDeclBits;
1806
    BlockDeclBitfields BlockDeclBits;
1807
1808
    static_assert(sizeof(DeclContextBitfields) <= 8,
1809
                  "DeclContextBitfields is larger than 8 bytes!");
1810
    static_assert(sizeof(TagDeclBitfields) <= 8,
1811
                  "TagDeclBitfields is larger than 8 bytes!");
1812
    static_assert(sizeof(EnumDeclBitfields) <= 8,
1813
                  "EnumDeclBitfields is larger than 8 bytes!");
1814
    static_assert(sizeof(RecordDeclBitfields) <= 8,
1815
                  "RecordDeclBitfields is larger than 8 bytes!");
1816
    static_assert(sizeof(OMPDeclareReductionDeclBitfields) <= 8,
1817
                  "OMPDeclareReductionDeclBitfields is larger than 8 bytes!");
1818
    static_assert(sizeof(FunctionDeclBitfields) <= 8,
1819
                  "FunctionDeclBitfields is larger than 8 bytes!");
1820
    static_assert(sizeof(CXXConstructorDeclBitfields) <= 8,
1821
                  "CXXConstructorDeclBitfields is larger than 8 bytes!");
1822
    static_assert(sizeof(ObjCMethodDeclBitfields) <= 8,
1823
                  "ObjCMethodDeclBitfields is larger than 8 bytes!");
1824
    static_assert(sizeof(ObjCContainerDeclBitfields) <= 8,
1825
                  "ObjCContainerDeclBitfields is larger than 8 bytes!");
1826
    static_assert(sizeof(LinkageSpecDeclBitfields) <= 8,
1827
                  "LinkageSpecDeclBitfields is larger than 8 bytes!");
1828
    static_assert(sizeof(BlockDeclBitfields) <= 8,
1829
                  "BlockDeclBitfields is larger than 8 bytes!");
1830
  };
1831
1832
  /// FirstDecl - The first declaration stored within this declaration
1833
  /// context.
1834
  mutable Decl *FirstDecl = nullptr;
1835
1836
  /// LastDecl - The last declaration stored within this declaration
1837
  /// context. FIXME: We could probably cache this value somewhere
1838
  /// outside of the DeclContext, to reduce the size of DeclContext by
1839
  /// another pointer.
1840
  mutable Decl *LastDecl = nullptr;
1841
1842
  /// Build up a chain of declarations.
1843
  ///
1844
  /// \returns the first/last pair of declarations.
1845
  static std::pair<Decl *, Decl *>
1846
  BuildDeclChain(ArrayRef<Decl*> Decls, bool FieldsAlreadyLoaded);
1847
1848
  DeclContext(Decl::Kind K);
1849
1850
public:
1851
  ~DeclContext();
1852
1853
41.5G
  Decl::Kind getDeclKind() const {
1854
41.5G
    return static_cast<Decl::Kind>(DeclContextBits.DeclKind);
1855
41.5G
  }
1856
1857
  const char *getDeclKindName() const;
1858
1859
  /// getParent - Returns the containing DeclContext.
1860
2.75G
  DeclContext *getParent() {
1861
2.75G
    return cast<Decl>(this)->getDeclContext();
1862
2.75G
  }
1863
391M
  const DeclContext *getParent() const {
1864
391M
    return const_cast<DeclContext*>(this)->getParent();
1865
391M
  }
1866
1867
  /// getLexicalParent - Returns the containing lexical DeclContext. May be
1868
  /// different from getParent, e.g.:
1869
  ///
1870
  ///   namespace A {
1871
  ///      struct S;
1872
  ///   }
1873
  ///   struct A::S {}; // getParent() == namespace 'A'
1874
  ///                   // getLexicalParent() == translation unit
1875
  ///
1876
48.5M
  DeclContext *getLexicalParent() {
1877
48.5M
    return cast<Decl>(this)->getLexicalDeclContext();
1878
48.5M
  }
1879
27.0M
  const DeclContext *getLexicalParent() const {
1880
27.0M
    return const_cast<DeclContext*>(this)->getLexicalParent();
1881
27.0M
  }
1882
1883
  DeclContext *getLookupParent();
1884
1885
121
  const DeclContext *getLookupParent() const {
1886
121
    return const_cast<DeclContext*>(this)->getLookupParent();
1887
121
  }
1888
1889
438M
  ASTContext &getParentASTContext() const {
1890
438M
    return cast<Decl>(this)->getASTContext();
1891
438M
  }
1892
1893
2.34k
  bool isClosure() const { return getDeclKind() == Decl::Block; }
1894
1895
  /// Return this DeclContext if it is a BlockDecl. Otherwise, return the
1896
  /// innermost enclosing BlockDecl or null if there are no enclosing blocks.
1897
  const BlockDecl *getInnermostBlockDecl() const;
1898
1899
5.94M
  bool isObjCContainer() const {
1900
5.94M
    switch (getDeclKind()) {
1901
207k
    case Decl::ObjCCategory:
1902
208k
    case Decl::ObjCCategoryImpl:
1903
215k
    case Decl::ObjCImplementation:
1904
642k
    case Decl::ObjCInterface:
1905
699k
    case Decl::ObjCProtocol:
1906
699k
      return true;
1907
5.24M
    default:
1908
5.24M
      return false;
1909
5.94M
    }
1910
5.94M
  }
1911
1912
601M
  bool isFunctionOrMethod() const {
1913
601M
    switch (getDeclKind()) {
1914
85.5k
    case Decl::Block:
1915
6.83M
    case Decl::Captured:
1916
8.06M
    case Decl::ObjCMethod:
1917
8.06M
      return true;
1918
593M
    default:
1919
593M
      return getDeclKind() >= Decl::firstFunction &&
1920
593M
             
getDeclKind() <= Decl::lastFunction444M
;
1921
601M
    }
1922
601M
  }
1923
1924
  /// Test whether the context supports looking up names.
1925
81.3M
  bool isLookupContext() const {
1926
81.3M
    return !isFunctionOrMethod() && 
getDeclKind() != Decl::LinkageSpec69.6M
&&
1927
81.3M
           
getDeclKind() != Decl::Export60.2M
;
1928
81.3M
  }
1929
1930
1.23G
  bool isFileContext() const {
1931
1.23G
    return getDeclKind() == Decl::TranslationUnit ||
1932
1.23G
           
getDeclKind() == Decl::Namespace568M
;
1933
1.23G
  }
1934
1935
6.20G
  bool isTranslationUnit() const {
1936
6.20G
    return getDeclKind() == Decl::TranslationUnit;
1937
6.20G
  }
1938
1939
503M
  bool isRecord() const {
1940
503M
    return getDeclKind() >= Decl::firstRecord &&
1941
503M
           
getDeclKind() <= Decl::lastRecord390M
;
1942
503M
  }
1943
1944
72.3M
  bool isNamespace() const { return getDeclKind() == Decl::Namespace; }
1945
1946
  bool isStdNamespace() const;
1947
1948
  bool isInlineNamespace() const;
1949
1950
  /// Determines whether this context is dependent on a
1951
  /// template parameter.
1952
  bool isDependentContext() const;
1953
1954
  /// isTransparentContext - Determines whether this context is a
1955
  /// "transparent" context, meaning that the members declared in this
1956
  /// context are semantically declared in the nearest enclosing
1957
  /// non-transparent (opaque) context but are lexically declared in
1958
  /// this context. For example, consider the enumerators of an
1959
  /// enumeration type:
1960
  /// @code
1961
  /// enum E {
1962
  ///   Val1
1963
  /// };
1964
  /// @endcode
1965
  /// Here, E is a transparent context, so its enumerator (Val1) will
1966
  /// appear (semantically) that it is in the same context of E.
1967
  /// Examples of transparent contexts include: enumerations (except for
1968
  /// C++0x scoped enums), and C++ linkage specifications.
1969
  bool isTransparentContext() const;
1970
1971
  /// Determines whether this context or some of its ancestors is a
1972
  /// linkage specification context that specifies C linkage.
1973
  bool isExternCContext() const;
1974
1975
  /// Retrieve the nearest enclosing C linkage specification context.
1976
  const LinkageSpecDecl *getExternCContext() const;
1977
1978
  /// Determines whether this context or some of its ancestors is a
1979
  /// linkage specification context that specifies C++ linkage.
1980
  bool isExternCXXContext() const;
1981
1982
  /// Determine whether this declaration context is equivalent
1983
  /// to the declaration context DC.
1984
1.01G
  bool Equals(const DeclContext *DC) const {
1985
1.01G
    return DC && 
this->getPrimaryContext() == DC->getPrimaryContext()971M
;
1986
1.01G
  }
1987
1988
  /// Determine whether this declaration context encloses the
1989
  /// declaration context DC.
1990
  bool Encloses(const DeclContext *DC) const;
1991
1992
  /// Find the nearest non-closure ancestor of this context,
1993
  /// i.e. the innermost semantic parent of this context which is not
1994
  /// a closure.  A context may be its own non-closure ancestor.
1995
  Decl *getNonClosureAncestor();
1996
0
  const Decl *getNonClosureAncestor() const {
1997
0
    return const_cast<DeclContext*>(this)->getNonClosureAncestor();
1998
0
  }
1999
2000
  // Retrieve the nearest context that is not a transparent context.
2001
  DeclContext *getNonTransparentContext();
2002
110k
  const DeclContext *getNonTransparentContext() const {
2003
110k
    return const_cast<DeclContext *>(this)->getNonTransparentContext();
2004
110k
  }
2005
2006
  /// getPrimaryContext - There may be many different
2007
  /// declarations of the same entity (including forward declarations
2008
  /// of classes, multiple definitions of namespaces, etc.), each with
2009
  /// a different set of declarations. This routine returns the
2010
  /// "primary" DeclContext structure, which will contain the
2011
  /// information needed to perform name lookup into this context.
2012
  DeclContext *getPrimaryContext();
2013
2.30G
  const DeclContext *getPrimaryContext() const {
2014
2.30G
    return const_cast<DeclContext*>(this)->getPrimaryContext();
2015
2.30G
  }
2016
2017
  /// getRedeclContext - Retrieve the context in which an entity conflicts with
2018
  /// other entities of the same name, or where it is a redeclaration if the
2019
  /// two entities are compatible. This skips through transparent contexts.
2020
  DeclContext *getRedeclContext();
2021
1.12G
  const DeclContext *getRedeclContext() const {
2022
1.12G
    return const_cast<DeclContext *>(this)->getRedeclContext();
2023
1.12G
  }
2024
2025
  /// Retrieve the nearest enclosing namespace context.
2026
  DeclContext *getEnclosingNamespaceContext();
2027
17.2k
  const DeclContext *getEnclosingNamespaceContext() const {
2028
17.2k
    return const_cast<DeclContext *>(this)->getEnclosingNamespaceContext();
2029
17.2k
  }
2030
2031
  /// Retrieve the outermost lexically enclosing record context.
2032
  RecordDecl *getOuterLexicalRecordContext();
2033
0
  const RecordDecl *getOuterLexicalRecordContext() const {
2034
0
    return const_cast<DeclContext *>(this)->getOuterLexicalRecordContext();
2035
0
  }
2036
2037
  /// Test if this context is part of the enclosing namespace set of
2038
  /// the context NS, as defined in C++0x [namespace.def]p9. If either context
2039
  /// isn't a namespace, this is equivalent to Equals().
2040
  ///
2041
  /// The enclosing namespace set of a namespace is the namespace and, if it is
2042
  /// inline, its enclosing namespace, recursively.
2043
  bool InEnclosingNamespaceSetOf(const DeclContext *NS) const;
2044
2045
  /// Collects all of the declaration contexts that are semantically
2046
  /// connected to this declaration context.
2047
  ///
2048
  /// For declaration contexts that have multiple semantically connected but
2049
  /// syntactically distinct contexts, such as C++ namespaces, this routine
2050
  /// retrieves the complete set of such declaration contexts in source order.
2051
  /// For example, given:
2052
  ///
2053
  /// \code
2054
  /// namespace N {
2055
  ///   int x;
2056
  /// }
2057
  /// namespace N {
2058
  ///   int y;
2059
  /// }
2060
  /// \endcode
2061
  ///
2062
  /// The \c Contexts parameter will contain both definitions of N.
2063
  ///
2064
  /// \param Contexts Will be cleared and set to the set of declaration
2065
  /// contexts that are semanticaly connected to this declaration context,
2066
  /// in source order, including this context (which may be the only result,
2067
  /// for non-namespace contexts).
2068
  void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts);
2069
2070
  /// decl_iterator - Iterates through the declarations stored
2071
  /// within this context.
2072
  class decl_iterator {
2073
    /// Current - The current declaration.
2074
    Decl *Current = nullptr;
2075
2076
  public:
2077
    using value_type = Decl *;
2078
    using reference = const value_type &;
2079
    using pointer = const value_type *;
2080
    using iterator_category = std::forward_iterator_tag;
2081
    using difference_type = std::ptrdiff_t;
2082
2083
24.5M
    decl_iterator() = default;
2084
24.1M
    explicit decl_iterator(Decl *C) : Current(C) {}
2085
2086
221M
    reference operator*() const { return Current; }
2087
2088
    // This doesn't meet the iterator requirements, but it's convenient
2089
35.2k
    value_type operator->() const { return Current; }
2090
2091
115M
    decl_iterator& operator++() {
2092
115M
      Current = Current->getNextDeclInContext();
2093
115M
      return *this;
2094
115M
    }
2095
2096
41
    decl_iterator operator++(int) {
2097
41
      decl_iterator tmp(*this);
2098
41
      ++(*this);
2099
41
      return tmp;
2100
41
    }
2101
2102
1.09M
    friend bool operator==(decl_iterator x, decl_iterator y) {
2103
1.09M
      return x.Current == y.Current;
2104
1.09M
    }
2105
2106
79.9M
    friend bool operator!=(decl_iterator x, decl_iterator y) {
2107
79.9M
      return x.Current != y.Current;
2108
79.9M
    }
2109
  };
2110
2111
  using decl_range = llvm::iterator_range<decl_iterator>;
2112
2113
  /// decls_begin/decls_end - Iterate over the declarations stored in
2114
  /// this context.
2115
11.1M
  decl_range decls() const { return decl_range(decls_begin(), decls_end()); }
2116
  decl_iterator decls_begin() const;
2117
14.5M
  decl_iterator decls_end() const { return decl_iterator(); }
2118
  bool decls_empty() const;
2119
2120
  /// noload_decls_begin/end - Iterate over the declarations stored in this
2121
  /// context that are currently loaded; don't attempt to retrieve anything
2122
  /// from an external source.
2123
1.78M
  decl_range noload_decls() const {
2124
1.78M
    return decl_range(noload_decls_begin(), noload_decls_end());
2125
1.78M
  }
2126
1.78M
  decl_iterator noload_decls_begin() const { return decl_iterator(FirstDecl); }
2127
1.78M
  decl_iterator noload_decls_end() const { return decl_iterator(); }
2128
2129
  /// specific_decl_iterator - Iterates over a subrange of
2130
  /// declarations stored in a DeclContext, providing only those that
2131
  /// are of type SpecificDecl (or a class derived from it). This
2132
  /// iterator is used, for example, to provide iteration over just
2133
  /// the fields within a RecordDecl (with SpecificDecl = FieldDecl).
2134
  template<typename SpecificDecl>
2135
  class specific_decl_iterator {
2136
    /// Current - The current, underlying declaration iterator, which
2137
    /// will either be NULL or will point to a declaration of
2138
    /// type SpecificDecl.
2139
    DeclContext::decl_iterator Current;
2140
2141
    /// SkipToNextDecl - Advances the current position up to the next
2142
    /// declaration of type SpecificDecl that also meets the criteria
2143
    /// required by Acceptable.
2144
35.5M
    void SkipToNextDecl() {
2145
92.2M
      while (*Current && 
!isa<SpecificDecl>(*Current)70.4M
)
2146
56.7M
        ++Current;
2147
35.5M
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::SkipToNextDecl()
Line
Count
Source
2144
332k
    void SkipToNextDecl() {
2145
332k
      while (*Current && 
!isa<SpecificDecl>(*Current)210k
)
2146
13
        ++Current;
2147
332k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::SkipToNextDecl()
Line
Count
Source
2144
24.8M
    void SkipToNextDecl() {
2145
68.0M
      while (*Current && 
!isa<SpecificDecl>(*Current)52.6M
)
2146
43.2M
        ++Current;
2147
24.8M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::SkipToNextDecl()
Line
Count
Source
2144
8.20M
    void SkipToNextDecl() {
2145
16.8M
      while (*Current && 
!isa<SpecificDecl>(*Current)11.7M
)
2146
8.64M
        ++Current;
2147
8.20M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::SkipToNextDecl()
Line
Count
Source
2144
22.6k
    void SkipToNextDecl() {
2145
93.6k
      while (*Current && 
!isa<SpecificDecl>(*Current)83.8k
)
2146
71.0k
        ++Current;
2147
22.6k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::SkipToNextDecl()
Line
Count
Source
2144
1.03M
    void SkipToNextDecl() {
2145
4.16M
      while (*Current && 
!isa<SpecificDecl>(*Current)3.62M
)
2146
3.12M
        ++Current;
2147
1.03M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::SkipToNextDecl()
Line
Count
Source
2144
132k
    void SkipToNextDecl() {
2145
269k
      while (*Current && 
!isa<SpecificDecl>(*Current)186k
)
2146
136k
        ++Current;
2147
132k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::SkipToNextDecl()
Line
Count
Source
2144
713k
    void SkipToNextDecl() {
2145
2.13M
      while (*Current && 
!isa<SpecificDecl>(*Current)1.80M
)
2146
1.42M
        ++Current;
2147
713k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::SkipToNextDecl()
Line
Count
Source
2144
55.9k
    void SkipToNextDecl() {
2145
69.8k
      while (*Current && 
!isa<SpecificDecl>(*Current)54.9k
)
2146
13.9k
        ++Current;
2147
55.9k
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::SkipToNextDecl()
Line
Count
Source
2144
5
    void SkipToNextDecl() {
2145
6
      while (*Current && 
!isa<SpecificDecl>(*Current)4
)
2146
1
        ++Current;
2147
5
    }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::SkipToNextDecl()
Line
Count
Source
2144
28
    void SkipToNextDecl() {
2145
54
      while (*Current && 
!isa<SpecificDecl>(*Current)40
)
2146
26
        ++Current;
2147
28
    }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::SkipToNextDecl()
Line
Count
Source
2144
222k
    void SkipToNextDecl() {
2145
225k
      while (*Current && 
!isa<SpecificDecl>(*Current)116k
)
2146
2.73k
        ++Current;
2147
222k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::SkipToNextDecl()
Line
Count
Source
2144
282
    void SkipToNextDecl() {
2145
2.82k
      while (*Current && 
!isa<SpecificDecl>(*Current)2.64k
)
2146
2.54k
        ++Current;
2147
282
    }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::SkipToNextDecl()
Line
Count
Source
2144
38.7k
    void SkipToNextDecl() {
2145
77.2k
      while (*Current && 
!isa<SpecificDecl>(*Current)38.7k
)
2146
38.4k
        ++Current;
2147
38.7k
    }
2148
2149
  public:
2150
    using value_type = SpecificDecl *;
2151
    // TODO: Add reference and pointer types (with some appropriate proxy type)
2152
    // if we ever have a need for them.
2153
    using reference = void;
2154
    using pointer = void;
2155
    using difference_type =
2156
        std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2157
    using iterator_category = std::forward_iterator_tag;
2158
2159
545k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator()
Line
Count
Source
2159
269k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator()
Line
Count
Source
2159
275k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator()
Line
Count
Source
2159
18
    specific_decl_iterator() = default;
2160
2161
    /// specific_decl_iterator - Construct a new iterator over a
2162
    /// subset of the declarations the range [C,
2163
    /// end-of-declarations). If A is non-NULL, it is a pointer to a
2164
    /// member function of SpecificDecl that should return true for
2165
    /// all of the SpecificDecl instances that will be in the subset
2166
    /// of iterators. For example, if you want Objective-C instance
2167
    /// methods, SpecificDecl will be ObjCMethodDecl and A will be
2168
    /// &ObjCMethodDecl::isInstanceMethod.
2169
21.9M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
21.9M
      SkipToNextDecl();
2171
21.9M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
673k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
673k
      SkipToNextDecl();
2171
673k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
15.3M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
15.3M
      SkipToNextDecl();
2171
15.3M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
87.7k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
87.7k
      SkipToNextDecl();
2171
87.7k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
331k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
331k
      SkipToNextDecl();
2171
331k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
5.15M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
5.15M
      SkipToNextDecl();
2171
5.15M
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
197k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
197k
      SkipToNextDecl();
2171
197k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
14.9k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
14.9k
      SkipToNextDecl();
2171
14.9k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
11.9k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
11.9k
      SkipToNextDecl();
2171
11.9k
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
2
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
2
      SkipToNextDecl();
2171
2
    }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
28
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
28
      SkipToNextDecl();
2171
28
    }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
108k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
108k
      SkipToNextDecl();
2171
108k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
178
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
178
      SkipToNextDecl();
2171
178
    }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2169
38.5k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2170
38.5k
      SkipToNextDecl();
2171
38.5k
    }
2172
2173
13.1M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator*() const
Line
Count
Source
2173
439k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator*() const
Line
Count
Source
2173
8.83M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator*() const
Line
Count
Source
2173
49.6k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator*() const
Line
Count
Source
2173
381k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator*() const
Line
Count
Source
2173
3.10M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator*() const
Line
Count
Source
2173
146k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator*() const
Line
Count
Source
2173
40.9k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator*() const
Line
Count
Source
2173
12.8k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator*() const
Line
Count
Source
2173
6
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator*() const
Line
Count
Source
2173
14
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator*() const
Line
Count
Source
2173
113k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator*() const
Line
Count
Source
2173
104
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::operator*() const
Line
Count
Source
2173
205
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
2174
2175
    // This doesn't meet the iterator requirements, but it's convenient
2176
2.21M
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator->() const
Line
Count
Source
2176
20.8k
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator->() const
Line
Count
Source
2176
2.19M
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator->() const
Line
Count
Source
2176
3
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator->() const
Line
Count
Source
2176
14
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator->() const
Line
Count
Source
2176
98
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator->() const
Line
Count
Source
2176
104
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator->() const
Line
Count
Source
2176
57
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator->() const
Line
Count
Source
2176
9
    value_type operator->() const { return **this; }
2177
2178
13.6M
    specific_decl_iterator& operator++() {
2179
13.6M
      ++Current;
2180
13.6M
      SkipToNextDecl();
2181
13.6M
      return *this;
2182
13.6M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator++()
Line
Count
Source
2178
366k
    specific_decl_iterator& operator++() {
2179
366k
      ++Current;
2180
366k
      SkipToNextDecl();
2181
366k
      return *this;
2182
366k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator++()
Line
Count
Source
2178
9.45M
    specific_decl_iterator& operator++() {
2179
9.45M
      ++Current;
2180
9.45M
      SkipToNextDecl();
2181
9.45M
      return *this;
2182
9.45M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator++()
Line
Count
Source
2178
44.9k
    specific_decl_iterator& operator++() {
2179
44.9k
      ++Current;
2180
44.9k
      SkipToNextDecl();
2181
44.9k
      return *this;
2182
44.9k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator++()
Line
Count
Source
2178
381k
    specific_decl_iterator& operator++() {
2179
381k
      ++Current;
2180
381k
      SkipToNextDecl();
2181
381k
      return *this;
2182
381k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator++()
Line
Count
Source
2178
3.05M
    specific_decl_iterator& operator++() {
2179
3.05M
      ++Current;
2180
3.05M
      SkipToNextDecl();
2181
3.05M
      return *this;
2182
3.05M
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator++()
Line
Count
Source
2178
135k
    specific_decl_iterator& operator++() {
2179
135k
      ++Current;
2180
135k
      SkipToNextDecl();
2181
135k
      return *this;
2182
135k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator++()
Line
Count
Source
2178
40.9k
    specific_decl_iterator& operator++() {
2179
40.9k
      ++Current;
2180
40.9k
      SkipToNextDecl();
2181
40.9k
      return *this;
2182
40.9k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator++()
Line
Count
Source
2178
10.6k
    specific_decl_iterator& operator++() {
2179
10.6k
      ++Current;
2180
10.6k
      SkipToNextDecl();
2181
10.6k
      return *this;
2182
10.6k
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator++()
Line
Count
Source
2178
3
    specific_decl_iterator& operator++() {
2179
3
      ++Current;
2180
3
      SkipToNextDecl();
2181
3
      return *this;
2182
3
    }
Unexecuted instantiation: clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator++()
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator++()
Line
Count
Source
2178
113k
    specific_decl_iterator& operator++() {
2179
113k
      ++Current;
2180
113k
      SkipToNextDecl();
2181
113k
      return *this;
2182
113k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator++()
Line
Count
Source
2178
104
    specific_decl_iterator& operator++() {
2179
104
      ++Current;
2180
104
      SkipToNextDecl();
2181
104
      return *this;
2182
104
    }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::operator++()
Line
Count
Source
2178
205
    specific_decl_iterator& operator++() {
2179
205
      ++Current;
2180
205
      SkipToNextDecl();
2181
205
      return *this;
2182
205
    }
2183
2184
7.35k
    specific_decl_iterator operator++(int) {
2185
7.35k
      specific_decl_iterator tmp(*this);
2186
7.35k
      ++(*this);
2187
7.35k
      return tmp;
2188
7.35k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator++(int)
Line
Count
Source
2184
7.35k
    specific_decl_iterator operator++(int) {
2185
7.35k
      specific_decl_iterator tmp(*this);
2186
7.35k
      ++(*this);
2187
7.35k
      return tmp;
2188
7.35k
    }
Unexecuted instantiation: clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator++(int)
2189
2190
    friend bool operator==(const specific_decl_iterator& x,
2191
1.09M
                           const specific_decl_iterator& y) {
2192
1.09M
      return x.Current == y.Current;
2193
1.09M
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&)
Line
Count
Source
2191
802k
                           const specific_decl_iterator& y) {
2192
802k
      return x.Current == y.Current;
2193
802k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&)
Line
Count
Source
2191
209k
                           const specific_decl_iterator& y) {
2192
209k
      return x.Current == y.Current;
2193
209k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&)
Line
Count
Source
2191
80.3k
                           const specific_decl_iterator& y) {
2192
80.3k
      return x.Current == y.Current;
2193
80.3k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&)
Line
Count
Source
2191
224
                           const specific_decl_iterator& y) {
2192
224
      return x.Current == y.Current;
2193
224
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&)
Line
Count
Source
2191
32
                           const specific_decl_iterator& y) {
2192
32
      return x.Current == y.Current;
2193
32
    }
2194
2195
    friend bool operator!=(const specific_decl_iterator& x,
2196
22.1M
                           const specific_decl_iterator& y) {
2197
22.1M
      return x.Current != y.Current;
2198
22.1M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&)
Line
Count
Source
2196
481k
                           const specific_decl_iterator& y) {
2197
481k
      return x.Current != y.Current;
2198
481k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&)
Line
Count
Source
2196
14.9M
                           const specific_decl_iterator& y) {
2197
14.9M
      return x.Current != y.Current;
2198
14.9M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&)
Line
Count
Source
2196
88.8k
                           const specific_decl_iterator& y) {
2197
88.8k
      return x.Current != y.Current;
2198
88.8k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&)
Line
Count
Source
2196
547k
                           const specific_decl_iterator& y) {
2197
547k
      return x.Current != y.Current;
2198
547k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&)
Line
Count
Source
2196
5.62M
                           const specific_decl_iterator& y) {
2197
5.62M
      return x.Current != y.Current;
2198
5.62M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&)
Line
Count
Source
2196
153k
                           const specific_decl_iterator& y) {
2197
153k
      return x.Current != y.Current;
2198
153k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&)
Line
Count
Source
2196
48.3k
                           const specific_decl_iterator& y) {
2197
48.3k
      return x.Current != y.Current;
2198
48.3k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&)
Line
Count
Source
2196
16.6k
                           const specific_decl_iterator& y) {
2197
16.6k
      return x.Current != y.Current;
2198
16.6k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&, clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&)
Line
Count
Source
2196
4
                           const specific_decl_iterator& y) {
2197
4
      return x.Current != y.Current;
2198
4
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&)
Line
Count
Source
2196
14
                           const specific_decl_iterator& y) {
2197
14
      return x.Current != y.Current;
2198
14
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&)
Line
Count
Source
2196
168k
                           const specific_decl_iterator& y) {
2197
168k
      return x.Current != y.Current;
2198
168k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&)
Line
Count
Source
2196
193
                           const specific_decl_iterator& y) {
2197
193
      return x.Current != y.Current;
2198
193
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::TypeDecl> const&, clang::DeclContext::specific_decl_iterator<clang::TypeDecl> const&)
Line
Count
Source
2196
19.4k
                           const specific_decl_iterator& y) {
2197
19.4k
      return x.Current != y.Current;
2198
19.4k
    }
2199
  };
2200
2201
  /// Iterates over a filtered subrange of declarations stored
2202
  /// in a DeclContext.
2203
  ///
2204
  /// This iterator visits only those declarations that are of type
2205
  /// SpecificDecl (or a class derived from it) and that meet some
2206
  /// additional run-time criteria. This iterator is used, for
2207
  /// example, to provide access to the instance methods within an
2208
  /// Objective-C interface (with SpecificDecl = ObjCMethodDecl and
2209
  /// Acceptable = ObjCMethodDecl::isInstanceMethod).
2210
  template<typename SpecificDecl, bool (SpecificDecl::*Acceptable)() const>
2211
  class filtered_decl_iterator {
2212
    /// Current - The current, underlying declaration iterator, which
2213
    /// will either be NULL or will point to a declaration of
2214
    /// type SpecificDecl.
2215
    DeclContext::decl_iterator Current;
2216
2217
    /// SkipToNextDecl - Advances the current position up to the next
2218
    /// declaration of type SpecificDecl that also meets the criteria
2219
    /// required by Acceptable.
2220
250k
    void SkipToNextDecl() {
2221
421k
      while (*Current &&
2222
421k
             
(291k
!isa<SpecificDecl>(*Current)291k
||
2223
291k
              
(225k
Acceptable225k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()225k
)))
2224
171k
        ++Current;
2225
250k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::SkipToNextDecl()
Line
Count
Source
2220
162k
    void SkipToNextDecl() {
2221
207k
      while (*Current &&
2222
207k
             
(141k
!isa<SpecificDecl>(*Current)141k
||
2223
141k
              
(114k
Acceptable114k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()114k
)))
2224
45.4k
        ++Current;
2225
162k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::SkipToNextDecl()
Line
Count
Source
2220
11.4k
    void SkipToNextDecl() {
2221
24.0k
      while (*Current &&
2222
24.0k
             
(19.6k
!isa<SpecificDecl>(*Current)19.6k
||
2223
19.6k
              
(7.23k
Acceptable7.23k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()7.23k
)))
2224
12.6k
        ++Current;
2225
11.4k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::SkipToNextDecl()
Line
Count
Source
2220
1.42k
    void SkipToNextDecl() {
2221
7.71k
      while (*Current &&
2222
7.71k
             
(7.16k
!isa<SpecificDecl>(*Current)7.16k
||
2223
7.16k
              
(1.78k
Acceptable1.78k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()1.78k
)))
2224
6.28k
        ++Current;
2225
1.42k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::SkipToNextDecl()
Line
Count
Source
2220
74.9k
    void SkipToNextDecl() {
2221
181k
      while (*Current &&
2222
181k
             
(124k
!isa<SpecificDecl>(*Current)124k
||
2223
124k
              
(102k
Acceptable102k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()102k
)))
2224
106k
        ++Current;
2225
74.9k
    }
2226
2227
  public:
2228
    using value_type = SpecificDecl *;
2229
    // TODO: Add reference and pointer types (with some appropriate proxy type)
2230
    // if we ever have a need for them.
2231
    using reference = void;
2232
    using pointer = void;
2233
    using difference_type =
2234
        std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2235
    using iterator_category = std::forward_iterator_tag;
2236
2237
    filtered_decl_iterator() = default;
2238
2239
    /// filtered_decl_iterator - Construct a new iterator over a
2240
    /// subset of the declarations the range [C,
2241
    /// end-of-declarations). If A is non-NULL, it is a pointer to a
2242
    /// member function of SpecificDecl that should return true for
2243
    /// all of the SpecificDecl instances that will be in the subset
2244
    /// of iterators. For example, if you want Objective-C instance
2245
    /// methods, SpecificDecl will be ObjCMethodDecl and A will be
2246
    /// &ObjCMethodDecl::isInstanceMethod.
2247
132k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2248
132k
      SkipToNextDecl();
2249
132k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2247
67.0k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2248
67.0k
      SkipToNextDecl();
2249
67.0k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2247
6.42k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2248
6.42k
      SkipToNextDecl();
2249
6.42k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2247
1.09k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2248
1.09k
      SkipToNextDecl();
2249
1.09k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2247
57.5k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2248
57.5k
      SkipToNextDecl();
2249
57.5k
    }
2250
2251
120k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator*() const
Line
Count
Source
2251
6.95k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator*() const
Line
Count
Source
2251
871
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator*() const
Line
Count
Source
2251
95.4k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator*() const
Line
Count
Source
2251
17.4k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
2252
    value_type operator->() const { return cast<SpecificDecl>(*Current); }
2253
2254
118k
    filtered_decl_iterator& operator++() {
2255
118k
      ++Current;
2256
118k
      SkipToNextDecl();
2257
118k
      return *this;
2258
118k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator++()
Line
Count
Source
2254
4.98k
    filtered_decl_iterator& operator++() {
2255
4.98k
      ++Current;
2256
4.98k
      SkipToNextDecl();
2257
4.98k
      return *this;
2258
4.98k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator++()
Line
Count
Source
2254
335
    filtered_decl_iterator& operator++() {
2255
335
      ++Current;
2256
335
      SkipToNextDecl();
2257
335
      return *this;
2258
335
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator++()
Line
Count
Source
2254
95.2k
    filtered_decl_iterator& operator++() {
2255
95.2k
      ++Current;
2256
95.2k
      SkipToNextDecl();
2257
95.2k
      return *this;
2258
95.2k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator++()
Line
Count
Source
2254
17.4k
    filtered_decl_iterator& operator++() {
2255
17.4k
      ++Current;
2256
17.4k
      SkipToNextDecl();
2257
17.4k
      return *this;
2258
17.4k
    }
2259
2260
    filtered_decl_iterator operator++(int) {
2261
      filtered_decl_iterator tmp(*this);
2262
      ++(*this);
2263
      return tmp;
2264
    }
2265
2266
    friend bool operator==(const filtered_decl_iterator& x,
2267
86
                           const filtered_decl_iterator& y) {
2268
86
      return x.Current == y.Current;
2269
86
    }
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
2267
82
                           const filtered_decl_iterator& y) {
2268
82
      return x.Current == y.Current;
2269
82
    }
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
2267
4