Coverage Report

Created: 2022-05-17 06:19

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