Coverage Report

Created: 2022-01-18 06:27

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