Coverage Report

Created: 2020-09-19 12:23

/Users/buildslave/jenkins/workspace/coverage/llvm-project/clang/include/clang/AST/DeclBase.h
Line
Count
Source (jump to first uncovered line)
1
//===- DeclBase.h - Base Classes for representing declarations --*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
//  This file defines the Decl and DeclContext interfaces.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_AST_DECLBASE_H
14
#define LLVM_CLANG_AST_DECLBASE_H
15
16
#include "clang/AST/ASTDumperUtils.h"
17
#include "clang/AST/AttrIterator.h"
18
#include "clang/AST/DeclarationName.h"
19
#include "clang/Basic/IdentifierTable.h"
20
#include "clang/Basic/LLVM.h"
21
#include "clang/Basic/SourceLocation.h"
22
#include "clang/Basic/Specifiers.h"
23
#include "llvm/ADT/ArrayRef.h"
24
#include "llvm/ADT/PointerIntPair.h"
25
#include "llvm/ADT/PointerUnion.h"
26
#include "llvm/ADT/iterator.h"
27
#include "llvm/ADT/iterator_range.h"
28
#include "llvm/Support/Casting.h"
29
#include "llvm/Support/Compiler.h"
30
#include "llvm/Support/PrettyStackTrace.h"
31
#include "llvm/Support/VersionTuple.h"
32
#include <algorithm>
33
#include <cassert>
34
#include <cstddef>
35
#include <iterator>
36
#include <string>
37
#include <type_traits>
38
#include <utility>
39
40
namespace clang {
41
42
class ASTContext;
43
class ASTMutationListener;
44
class Attr;
45
class BlockDecl;
46
class DeclContext;
47
class ExternalSourceSymbolAttr;
48
class FunctionDecl;
49
class FunctionType;
50
class IdentifierInfo;
51
enum Linkage : unsigned char;
52
class LinkageSpecDecl;
53
class Module;
54
class NamedDecl;
55
class ObjCCategoryDecl;
56
class ObjCCategoryImplDecl;
57
class ObjCContainerDecl;
58
class ObjCImplDecl;
59
class ObjCImplementationDecl;
60
class ObjCInterfaceDecl;
61
class ObjCMethodDecl;
62
class ObjCProtocolDecl;
63
struct PrintingPolicy;
64
class RecordDecl;
65
class SourceManager;
66
class Stmt;
67
class StoredDeclsMap;
68
class TemplateDecl;
69
class TemplateParameterList;
70
class TranslationUnitDecl;
71
class UsingDirectiveDecl;
72
73
/// Captures the result of checking the availability of a
74
/// declaration.
75
enum AvailabilityResult {
76
  AR_Available = 0,
77
  AR_NotYetIntroduced,
78
  AR_Deprecated,
79
  AR_Unavailable
80
};
81
82
/// Decl - This represents one declaration (or definition), e.g. a variable,
83
/// typedef, function, struct, etc.
84
///
85
/// Note: There are objects tacked on before the *beginning* of Decl
86
/// (and its subclasses) in its Decl::operator new(). Proper alignment
87
/// of all subclasses (not requiring more than the alignment of Decl) is
88
/// asserted in DeclBase.cpp.
89
class alignas(8) Decl {
90
public:
91
  /// Lists the kind of concrete classes of Decl.
92
  enum Kind {
93
#define DECL(DERIVED, BASE) DERIVED,
94
#define ABSTRACT_DECL(DECL)
95
#define DECL_RANGE(BASE, START, END) \
96
        first##BASE = START, last##BASE = END,
97
#define LAST_DECL_RANGE(BASE, START, END) \
98
        first##BASE = START, last##BASE = END
99
#include "clang/AST/DeclNodes.inc"
100
  };
101
102
  /// A placeholder type used to construct an empty shell of a
103
  /// decl-derived type that will be filled in later (e.g., by some
104
  /// deserialization method).
105
  struct EmptyShell {};
106
107
  /// IdentifierNamespace - The different namespaces in which
108
  /// declarations may appear.  According to C99 6.2.3, there are
109
  /// four namespaces, labels, tags, members and ordinary
110
  /// identifiers.  C++ describes lookup completely differently:
111
  /// certain lookups merely "ignore" certain kinds of declarations,
112
  /// usually based on whether the declaration is of a type, etc.
113
  ///
114
  /// These are meant as bitmasks, so that searches in
115
  /// C++ can look into the "tag" namespace during ordinary lookup.
116
  ///
117
  /// Decl currently provides 15 bits of IDNS bits.
118
  enum IdentifierNamespace {
119
    /// Labels, declared with 'x:' and referenced with 'goto x'.
120
    IDNS_Label               = 0x0001,
121
122
    /// Tags, declared with 'struct foo;' and referenced with
123
    /// 'struct foo'.  All tags are also types.  This is what
124
    /// elaborated-type-specifiers look for in C.
125
    /// This also contains names that conflict with tags in the
126
    /// same scope but that are otherwise ordinary names (non-type
127
    /// template parameters and indirect field declarations).
128
    IDNS_Tag                 = 0x0002,
129
130
    /// Types, declared with 'struct foo', typedefs, etc.
131
    /// This is what elaborated-type-specifiers look for in C++,
132
    /// but note that it's ill-formed to find a non-tag.
133
    IDNS_Type                = 0x0004,
134
135
    /// Members, declared with object declarations within tag
136
    /// definitions.  In C, these can only be found by "qualified"
137
    /// lookup in member expressions.  In C++, they're found by
138
    /// normal lookup.
139
    IDNS_Member              = 0x0008,
140
141
    /// Namespaces, declared with 'namespace foo {}'.
142
    /// Lookup for nested-name-specifiers find these.
143
    IDNS_Namespace           = 0x0010,
144
145
    /// Ordinary names.  In C, everything that's not a label, tag,
146
    /// member, or function-local extern ends up here.
147
    IDNS_Ordinary            = 0x0020,
148
149
    /// Objective C \@protocol.
150
    IDNS_ObjCProtocol        = 0x0040,
151
152
    /// This declaration is a friend function.  A friend function
153
    /// declaration is always in this namespace but may also be in
154
    /// IDNS_Ordinary if it was previously declared.
155
    IDNS_OrdinaryFriend      = 0x0080,
156
157
    /// This declaration is a friend class.  A friend class
158
    /// declaration is always in this namespace but may also be in
159
    /// IDNS_Tag|IDNS_Type if it was previously declared.
160
    IDNS_TagFriend           = 0x0100,
161
162
    /// This declaration is a using declaration.  A using declaration
163
    /// *introduces* a number of other declarations into the current
164
    /// scope, and those declarations use the IDNS of their targets,
165
    /// but the actual using declarations go in this namespace.
166
    IDNS_Using               = 0x0200,
167
168
    /// This declaration is a C++ operator declared in a non-class
169
    /// context.  All such operators are also in IDNS_Ordinary.
170
    /// C++ lexical operator lookup looks for these.
171
    IDNS_NonMemberOperator   = 0x0400,
172
173
    /// This declaration is a function-local extern declaration of a
174
    /// variable or function. This may also be IDNS_Ordinary if it
175
    /// has been declared outside any function. These act mostly like
176
    /// invisible friend declarations, but are also visible to unqualified
177
    /// lookup within the scope of the declaring function.
178
    IDNS_LocalExtern         = 0x0800,
179
180
    /// This declaration is an OpenMP user defined reduction construction.
181
    IDNS_OMPReduction        = 0x1000,
182
183
    /// This declaration is an OpenMP user defined mapper.
184
    IDNS_OMPMapper           = 0x2000,
185
  };
186
187
  /// ObjCDeclQualifier - 'Qualifiers' written next to the return and
188
  /// parameter types in method declarations.  Other than remembering
189
  /// them and mangling them into the method's signature string, these
190
  /// are ignored by the compiler; they are consumed by certain
191
  /// remote-messaging frameworks.
192
  ///
193
  /// in, inout, and out are mutually exclusive and apply only to
194
  /// method parameters.  bycopy and byref are mutually exclusive and
195
  /// apply only to method parameters (?).  oneway applies only to
196
  /// results.  All of these expect their corresponding parameter to
197
  /// have a particular type.  None of this is currently enforced by
198
  /// clang.
199
  ///
200
  /// This should be kept in sync with ObjCDeclSpec::ObjCDeclQualifier.
201
  enum ObjCDeclQualifier {
202
    OBJC_TQ_None = 0x0,
203
    OBJC_TQ_In = 0x1,
204
    OBJC_TQ_Inout = 0x2,
205
    OBJC_TQ_Out = 0x4,
206
    OBJC_TQ_Bycopy = 0x8,
207
    OBJC_TQ_Byref = 0x10,
208
    OBJC_TQ_Oneway = 0x20,
209
210
    /// The nullability qualifier is set when the nullability of the
211
    /// result or parameter was expressed via a context-sensitive
212
    /// keyword.
213
    OBJC_TQ_CSNullability = 0x40
214
  };
215
216
  /// The kind of ownership a declaration has, for visibility purposes.
217
  /// This enumeration is designed such that higher values represent higher
218
  /// levels of name hiding.
219
  enum class ModuleOwnershipKind : unsigned {
220
    /// This declaration is not owned by a module.
221
    Unowned,
222
223
    /// This declaration has an owning module, but is globally visible
224
    /// (typically because its owning module is visible and we know that
225
    /// modules cannot later become hidden in this compilation).
226
    /// After serialization and deserialization, this will be converted
227
    /// to VisibleWhenImported.
228
    Visible,
229
230
    /// This declaration has an owning module, and is visible when that
231
    /// module is imported.
232
    VisibleWhenImported,
233
234
    /// This declaration has an owning module, but is only visible to
235
    /// lookups that occur within that module.
236
    ModulePrivate
237
  };
238
239
protected:
240
  /// The next declaration within the same lexical
241
  /// DeclContext. These pointers form the linked list that is
242
  /// traversed via DeclContext's decls_begin()/decls_end().
243
  ///
244
  /// The extra two bits are used for the ModuleOwnershipKind.
245
  llvm::PointerIntPair<Decl *, 2, ModuleOwnershipKind> NextInContextAndBits;
246
247
private:
248
  friend class DeclContext;
249
250
  struct MultipleDC {
251
    DeclContext *SemanticDC;
252
    DeclContext *LexicalDC;
253
  };
254
255
  /// DeclCtx - Holds either a DeclContext* or a MultipleDC*.
256
  /// For declarations that don't contain C++ scope specifiers, it contains
257
  /// the DeclContext where the Decl was declared.
258
  /// For declarations with C++ scope specifiers, it contains a MultipleDC*
259
  /// with the context where it semantically belongs (SemanticDC) and the
260
  /// context where it was lexically declared (LexicalDC).
261
  /// e.g.:
262
  ///
263
  ///   namespace A {
264
  ///      void f(); // SemanticDC == LexicalDC == 'namespace A'
265
  ///   }
266
  ///   void A::f(); // SemanticDC == namespace 'A'
267
  ///                // LexicalDC == global namespace
268
  llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
269
270
5.16G
  bool isInSemaDC() const { return DeclCtx.is<DeclContext*>(); }
271
0
  bool isOutOfSemaDC() const { return DeclCtx.is<MultipleDC*>(); }
272
273
106M
  MultipleDC *getMultipleDC() const {
274
106M
    return DeclCtx.get<MultipleDC*>();
275
106M
  }
276
277
5.05G
  DeclContext *getSemanticDC() const {
278
5.05G
    return DeclCtx.get<DeclContext*>();
279
5.05G
  }
280
281
  /// Loc - The location of this decl.
282
  SourceLocation Loc;
283
284
  /// DeclKind - This indicates which class this is.
285
  unsigned DeclKind : 7;
286
287
  /// InvalidDecl - This indicates a semantic error occurred.
288
  unsigned InvalidDecl :  1;
289
290
  /// HasAttrs - This indicates whether the decl has attributes or not.
291
  unsigned HasAttrs : 1;
292
293
  /// Implicit - Whether this declaration was implicitly generated by
294
  /// the implementation rather than explicitly written by the user.
295
  unsigned Implicit : 1;
296
297
  /// Whether this declaration was "used", meaning that a definition is
298
  /// required.
299
  unsigned Used : 1;
300
301
  /// Whether this declaration was "referenced".
302
  /// The difference with 'Used' is whether the reference appears in a
303
  /// evaluated context or not, e.g. functions used in uninstantiated templates
304
  /// are regarded as "referenced" but not "used".
305
  unsigned Referenced : 1;
306
307
  /// Whether this declaration is a top-level declaration (function,
308
  /// global variable, etc.) that is lexically inside an objc container
309
  /// definition.
310
  unsigned TopLevelDeclInObjCContainer : 1;
311
312
  /// Whether statistic collection is enabled.
313
  static bool StatisticsEnabled;
314
315
protected:
316
  friend class ASTDeclReader;
317
  friend class ASTDeclWriter;
318
  friend class ASTNodeImporter;
319
  friend class ASTReader;
320
  friend class CXXClassMemberWrapper;
321
  friend class LinkageComputer;
322
  template<typename decl_type> friend class Redeclarable;
323
324
  /// Access - Used by C++ decls for the access specifier.
325
  // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum
326
  unsigned Access : 2;
327
328
  /// Whether this declaration was loaded from an AST file.
329
  unsigned FromASTFile : 1;
330
331
  /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
332
  unsigned IdentifierNamespace : 14;
333
334
  /// If 0, we have not computed the linkage of this declaration.
335
  /// Otherwise, it is the linkage + 1.
336
  mutable unsigned CacheValidAndLinkage : 3;
337
338
  /// Allocate memory for a deserialized declaration.
339
  ///
340
  /// This routine must be used to allocate memory for any declaration that is
341
  /// deserialized from a module file.
342
  ///
343
  /// \param Size The size of the allocated object.
344
  /// \param Ctx The context in which we will allocate memory.
345
  /// \param ID The global ID of the deserialized declaration.
346
  /// \param Extra The amount of extra space to allocate after the object.
347
  void *operator new(std::size_t Size, const ASTContext &Ctx, unsigned ID,
348
                     std::size_t Extra = 0);
349
350
  /// Allocate memory for a non-deserialized declaration.
351
  void *operator new(std::size_t Size, const ASTContext &Ctx,
352
                     DeclContext *Parent, std::size_t Extra = 0);
353
354
private:
355
  bool AccessDeclContextSanity() const;
356
357
  /// Get the module ownership kind to use for a local lexical child of \p DC,
358
  /// which may be either a local or (rarely) an imported declaration.
359
95.6M
  static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) {
360
95.6M
    if (DC) {
361
90.7M
      auto *D = cast<Decl>(DC);
362
90.7M
      auto MOK = D->getModuleOwnershipKind();
363
90.7M
      if (MOK != ModuleOwnershipKind::Unowned &&
364
3.04M
          (!D->isFromASTFile() || 
D->hasLocalOwningModuleStorage()143k
))
365
2.93M
        return MOK;
366
      // If D is not local and we have no local module storage, then we don't
367
      // need to track module ownership at all.
368
90.7M
    }
369
92.7M
    return ModuleOwnershipKind::Unowned;
370
92.7M
  }
371
372
public:
373
  Decl() = delete;
374
  Decl(const Decl&) = delete;
375
  Decl(Decl &&) = delete;
376
  Decl &operator=(const Decl&) = delete;
377
  Decl &operator=(Decl&&) = delete;
378
379
protected:
380
  Decl(Kind DK, DeclContext *DC, SourceLocation L)
381
      : NextInContextAndBits(nullptr, getModuleOwnershipKindForChildOf(DC)),
382
        DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(false), HasAttrs(false),
383
        Implicit(false), Used(false), Referenced(false),
384
        TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0),
385
        IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
386
95.2M
        CacheValidAndLinkage(0) {
387
95.2M
    if (StatisticsEnabled) 
add(DK)61
;
388
95.2M
  }
389
390
  Decl(Kind DK, EmptyShell Empty)
391
      : DeclKind(DK), InvalidDecl(false), HasAttrs(false), Implicit(false),
392
        Used(false), Referenced(false), TopLevelDeclInObjCContainer(false),
393
        Access(AS_none), FromASTFile(0),
394
        IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
395
18.4k
        CacheValidAndLinkage(0) {
396
18.4k
    if (StatisticsEnabled) 
add(DK)0
;
397
18.4k
  }
398
399
  virtual ~Decl();
400
401
  /// Update a potentially out-of-date declaration.
402
  void updateOutOfDate(IdentifierInfo &II) const;
403
404
62.4M
  Linkage getCachedLinkage() const {
405
62.4M
    return Linkage(CacheValidAndLinkage - 1);
406
62.4M
  }
407
408
21.9M
  void setCachedLinkage(Linkage L) const {
409
21.9M
    CacheValidAndLinkage = L + 1;
410
21.9M
  }
411
412
108M
  bool hasCachedLinkage() const {
413
108M
    return CacheValidAndLinkage;
414
108M
  }
415
416
public:
417
  /// Source range that this declaration covers.
418
1.52k
  virtual SourceRange getSourceRange() const LLVM_READONLY {
419
1.52k
    return SourceRange(getLocation(), getLocation());
420
1.52k
  }
421
422
1.98M
  SourceLocation getBeginLoc() const LLVM_READONLY {
423
1.98M
    return getSourceRange().getBegin();
424
1.98M
  }
425
426
1.74M
  SourceLocation getEndLoc() const LLVM_READONLY {
427
1.74M
    return getSourceRange().getEnd();
428
1.74M
  }
429
430
222M
  SourceLocation getLocation() const { return Loc; }
431
5.24M
  void setLocation(SourceLocation L) { Loc = L; }
432
433
12.9G
  Kind getKind() const { return static_cast<Kind>(DeclKind); }
434
  const char *getDeclKindName() const;
435
436
139M
  Decl *getNextDeclInContext() { return NextInContextAndBits.getPointer(); }
437
4.36k
  const Decl *getNextDeclInContext() const {return NextInContextAndBits.getPointer();}
438
439
4.82G
  DeclContext *getDeclContext() {
440
4.82G
    if (isInSemaDC())
441
4.73G
      return getSemanticDC();
442
91.5M
    return getMultipleDC()->SemanticDC;
443
91.5M
  }
444
1.15G
  const DeclContext *getDeclContext() const {
445
1.15G
    return const_cast<Decl*>(this)->getDeclContext();
446
1.15G
  }
447
448
  /// Find the innermost non-closure ancestor of this declaration,
449
  /// walking up through blocks, lambdas, etc.  If that ancestor is
450
  /// not a code context (!isFunctionOrMethod()), returns null.
451
  ///
452
  /// A declaration may be its own non-closure context.
453
  Decl *getNonClosureContext();
454
280k
  const Decl *getNonClosureContext() const {
455
280k
    return const_cast<Decl*>(this)->getNonClosureContext();
456
280k
  }
457
458
  TranslationUnitDecl *getTranslationUnitDecl();
459
1.78G
  const TranslationUnitDecl *getTranslationUnitDecl() const {
460
1.78G
    return const_cast<Decl*>(this)->getTranslationUnitDecl();
461
1.78G
  }
462
463
  bool isInAnonymousNamespace() const;
464
465
  bool isInStdNamespace() const;
466
467
  ASTContext &getASTContext() const LLVM_READONLY;
468
469
  /// Helper to get the language options from the ASTContext.
470
  /// Defined out of line to avoid depending on ASTContext.h.
471
  const LangOptions &getLangOpts() const LLVM_READONLY;
472
473
25.3M
  void setAccess(AccessSpecifier AS) {
474
25.3M
    Access = AS;
475
25.3M
    assert(AccessDeclContextSanity());
476
25.3M
  }
477
478
185M
  AccessSpecifier getAccess() const {
479
185M
    assert(AccessDeclContextSanity());
480
185M
    return AccessSpecifier(Access);
481
185M
  }
482
483
  /// Retrieve the access specifier for this declaration, even though
484
  /// it may not yet have been properly set.
485
27.1k
  AccessSpecifier getAccessUnsafe() const {
486
27.1k
    return AccessSpecifier(Access);
487
27.1k
  }
488
489
2.21G
  bool hasAttrs() const { return HasAttrs; }
490
491
18.7M
  void setAttrs(const AttrVec& Attrs) {
492
18.7M
    return setAttrsImpl(Attrs, getASTContext());
493
18.7M
  }
494
495
46.1M
  AttrVec &getAttrs() {
496
46.1M
    return const_cast<AttrVec&>(const_cast<const Decl*>(this)->getAttrs());
497
46.1M
  }
498
499
  const AttrVec &getAttrs() const;
500
  void dropAttrs();
501
  void addAttr(Attr *A);
502
503
  using attr_iterator = AttrVec::const_iterator;
504
  using attr_range = llvm::iterator_range<attr_iterator>;
505
506
107M
  attr_range attrs() const {
507
107M
    return attr_range(attr_begin(), attr_end());
508
107M
  }
509
510
210M
  attr_iterator attr_begin() const {
511
169M
    return hasAttrs() ? 
getAttrs().begin()41.3M
: nullptr;
512
210M
  }
513
210M
  attr_iterator attr_end() const {
514
169M
    return hasAttrs() ? 
getAttrs().end()41.3M
: nullptr;
515
210M
  }
516
517
  template <typename T>
518
10.9k
  void dropAttr() {
519
10.9k
    if (!HasAttrs) 
return8.78k
;
520
2.19k
521
2.19k
    AttrVec &Vec = getAttrs();
522
2.23k
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::DLLImportAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
1.58k
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::WeakAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::WeakRefAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
8
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::SelectAnyAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
19
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::NotTailCalledAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::ConstInitAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
12
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::InternalLinkageAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::OverloadableAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
4
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::WeakImportAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::AliasAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
5
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::SectionAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::UsedAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
4
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::IFuncAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
1
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::NoBuiltinAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
8
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::CodeSegAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
11
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::VisibilityAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
Unexecuted instantiation: void clang::Decl::dropAttr<clang::TypeVisibilityAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
void clang::Decl::dropAttr<clang::AlwaysInlineAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
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
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::UuidAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
16
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::MSInheritanceAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::ObjCDesignatedInitializerAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::TrivialABIAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
33
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::OverrideAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::FinalAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::DLLExportAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
469
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
void clang::Decl::dropAttr<clang::AvailabilityAttr>()::'lambda'(clang::Attr*)::operator()(clang::Attr*) const
Line
Count
Source
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
2.19k
524
2.19k
    if (Vec.empty())
525
1.43k
      HasAttrs = false;
526
2.19k
  }
void clang::Decl::dropAttr<clang::DLLImportAttr>()
Line
Count
Source
518
5.92k
  void dropAttr() {
519
5.92k
    if (!HasAttrs) 
return4.35k
;
520
1.56k
521
1.56k
    AttrVec &Vec = getAttrs();
522
1.56k
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
1.56k
524
1.56k
    if (Vec.empty())
525
1.13k
      HasAttrs = false;
526
1.56k
  }
void clang::Decl::dropAttr<clang::WeakAttr>()
Line
Count
Source
518
10
  void dropAttr() {
519
10
    if (!HasAttrs) 
return0
;
520
10
521
10
    AttrVec &Vec = getAttrs();
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
10
524
10
    if (Vec.empty())
525
10
      HasAttrs = false;
526
10
  }
void clang::Decl::dropAttr<clang::WeakRefAttr>()
Line
Count
Source
518
5
  void dropAttr() {
519
5
    if (!HasAttrs) 
return0
;
520
5
521
5
    AttrVec &Vec = getAttrs();
522
5
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
5
524
5
    if (Vec.empty())
525
2
      HasAttrs = false;
526
5
  }
void clang::Decl::dropAttr<clang::SelectAnyAttr>()
Line
Count
Source
518
19
  void dropAttr() {
519
19
    if (!HasAttrs) 
return0
;
520
19
521
19
    AttrVec &Vec = getAttrs();
522
19
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
19
524
19
    if (Vec.empty())
525
19
      HasAttrs = false;
526
19
  }
void clang::Decl::dropAttr<clang::NotTailCalledAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
2
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
2
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::ConstInitAttr>()
Line
Count
Source
518
12
  void dropAttr() {
519
12
    if (!HasAttrs) 
return0
;
520
12
521
12
    AttrVec &Vec = getAttrs();
522
12
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
12
524
12
    if (Vec.empty())
525
12
      HasAttrs = false;
526
12
  }
void clang::Decl::dropAttr<clang::InternalLinkageAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
3
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
3
524
3
    if (Vec.empty())
525
3
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::OverloadableAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
3
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
3
524
3
    if (Vec.empty())
525
2
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::WeakImportAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
2
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
2
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::AliasAttr>()
Line
Count
Source
518
5
  void dropAttr() {
519
5
    if (!HasAttrs) 
return0
;
520
5
521
5
    AttrVec &Vec = getAttrs();
522
5
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
5
524
5
    if (Vec.empty())
525
5
      HasAttrs = false;
526
5
  }
void clang::Decl::dropAttr<clang::SectionAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
2
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
2
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::UsedAttr>()
Line
Count
Source
518
4
  void dropAttr() {
519
4
    if (!HasAttrs) 
return0
;
520
4
521
4
    AttrVec &Vec = getAttrs();
522
4
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
4
524
4
    if (Vec.empty())
525
4
      HasAttrs = false;
526
4
  }
void clang::Decl::dropAttr<clang::IFuncAttr>()
Line
Count
Source
518
1
  void dropAttr() {
519
1
    if (!HasAttrs) 
return0
;
520
1
521
1
    AttrVec &Vec = getAttrs();
522
1
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
1
524
1
    if (Vec.empty())
525
1
      HasAttrs = false;
526
1
  }
void clang::Decl::dropAttr<clang::NoBuiltinAttr>()
Line
Count
Source
518
8
  void dropAttr() {
519
8
    if (!HasAttrs) 
return0
;
520
8
521
8
    AttrVec &Vec = getAttrs();
522
8
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
8
524
8
    if (Vec.empty())
525
8
      HasAttrs = false;
526
8
  }
void clang::Decl::dropAttr<clang::CodeSegAttr>()
Line
Count
Source
518
8
  void dropAttr() {
519
8
    if (!HasAttrs) 
return0
;
520
8
521
8
    AttrVec &Vec = getAttrs();
522
8
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
8
524
8
    if (Vec.empty())
525
5
      HasAttrs = false;
526
8
  }
void clang::Decl::dropAttr<clang::VisibilityAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
6
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
6
524
6
    if (Vec.empty())
525
6
      HasAttrs = false;
526
6
  }
Unexecuted instantiation: void clang::Decl::dropAttr<clang::TypeVisibilityAttr>()
void clang::Decl::dropAttr<clang::AlwaysInlineAttr>()
Line
Count
Source
518
7
  void dropAttr() {
519
7
    if (!HasAttrs) 
return0
;
520
7
521
7
    AttrVec &Vec = getAttrs();
522
7
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
7
524
7
    if (Vec.empty())
525
7
      HasAttrs = false;
526
7
  }
void clang::Decl::dropAttr<clang::MinSizeAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
3
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
3
524
3
    if (Vec.empty())
525
3
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::UuidAttr>()
Line
Count
Source
518
16
  void dropAttr() {
519
16
    if (!HasAttrs) 
return0
;
520
16
521
16
    AttrVec &Vec = getAttrs();
522
16
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
16
524
16
    if (Vec.empty())
525
16
      HasAttrs = false;
526
16
  }
void clang::Decl::dropAttr<clang::MSInheritanceAttr>()
Line
Count
Source
518
3
  void dropAttr() {
519
3
    if (!HasAttrs) 
return0
;
520
3
521
3
    AttrVec &Vec = getAttrs();
522
3
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
3
524
3
    if (Vec.empty())
525
3
      HasAttrs = false;
526
3
  }
void clang::Decl::dropAttr<clang::ObjCDesignatedInitializerAttr>()
Line
Count
Source
518
2
  void dropAttr() {
519
2
    if (!HasAttrs) 
return0
;
520
2
521
2
    AttrVec &Vec = getAttrs();
522
2
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
2
524
2
    if (Vec.empty())
525
2
      HasAttrs = false;
526
2
  }
void clang::Decl::dropAttr<clang::TrivialABIAttr>()
Line
Count
Source
518
33
  void dropAttr() {
519
33
    if (!HasAttrs) 
return0
;
520
33
521
33
    AttrVec &Vec = getAttrs();
522
33
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
33
524
33
    if (Vec.empty())
525
33
      HasAttrs = false;
526
33
  }
void clang::Decl::dropAttr<clang::OverrideAttr>()
Line
Count
Source
518
10
  void dropAttr() {
519
10
    if (!HasAttrs) 
return0
;
520
10
521
10
    AttrVec &Vec = getAttrs();
522
10
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
10
524
10
    if (Vec.empty())
525
10
      HasAttrs = false;
526
10
  }
void clang::Decl::dropAttr<clang::FinalAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
6
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
6
524
6
    if (Vec.empty())
525
6
      HasAttrs = false;
526
6
  }
void clang::Decl::dropAttr<clang::DLLExportAttr>()
Line
Count
Source
518
4.88k
  void dropAttr() {
519
4.88k
    if (!HasAttrs) 
return4.43k
;
520
454
521
454
    AttrVec &Vec = getAttrs();
522
454
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
454
524
454
    if (Vec.empty())
525
134
      HasAttrs = false;
526
454
  }
void clang::Decl::dropAttr<clang::AvailabilityAttr>()
Line
Count
Source
518
6
  void dropAttr() {
519
6
    if (!HasAttrs) 
return0
;
520
6
521
6
    AttrVec &Vec = getAttrs();
522
6
    llvm::erase_if(Vec, [](Attr *A) { return isa<T>(A); });
523
6
524
6
    if (Vec.empty())
525
2
      HasAttrs = false;
526
6
  }
527
528
  template <typename T>
529
102M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
102M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
102M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
529
126k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
126k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
126k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AlignedAttr>() const
Line
Count
Source
529
2.26M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
2.26M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
2.26M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NonNullAttr>() const
Line
Count
Source
529
3.45M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.45M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.45M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnableIfAttr>() const
Line
Count
Source
529
5.02M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
5.02M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
5.02M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatArgAttr>() const
Line
Count
Source
529
21
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
21
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
21
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
529
3.29M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.29M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.29M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AnnotateAttr>() const
Line
Count
Source
529
8.45k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
8.45k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
8.45k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableParamAttr>() const
Line
Count
Source
529
6.58k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
6.58k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
6.58k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableAttr>() const
Line
Count
Source
529
319k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
319k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
319k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
529
101
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
101
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
101
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OwnershipAttr>() const
Line
Count
Source
529
2.26k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
2.26k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
2.26k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatAttr>() const
Line
Count
Source
529
3.60M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.60M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.60M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
529
3.71k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
3.71k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
3.71k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::DiagnoseIfAttr>() const
Line
Count
Source
529
83.8M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
83.8M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
83.8M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::PtGuardedByAttr>() const
Line
Count
Source
529
442
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
442
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
442
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::GuardedByAttr>() const
Line
Count
Source
529
2.48k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
2.48k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
2.48k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
529
177
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
177
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
177
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NoSanitizeAttr>() const
Line
Count
Source
529
280k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
530
280k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
531
280k
  }
532
533
  template <typename T>
534
102M
  specific_attr_iterator<T> specific_attr_begin() const {
535
102M
    return specific_attr_iterator<T>(attr_begin());
536
102M
  }
clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
534
126k
  specific_attr_iterator<T> specific_attr_begin() const {
535
126k
    return specific_attr_iterator<T>(attr_begin());
536
126k
  }
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AlignedAttr>() const
Line
Count
Source
534
2.26M
  specific_attr_iterator<T> specific_attr_begin() const {
535
2.26M
    return specific_attr_iterator<T>(attr_begin());
536
2.26M
  }
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NonNullAttr>() const
Line
Count
Source
534
3.45M
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.45M
    return specific_attr_iterator<T>(attr_begin());
536
3.45M
  }
clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnableIfAttr>() const
Line
Count
Source
534
5.53M
  specific_attr_iterator<T> specific_attr_begin() const {
535
5.53M
    return specific_attr_iterator<T>(attr_begin());
536
5.53M
  }
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatArgAttr>() const
Line
Count
Source
534
21
  specific_attr_iterator<T> specific_attr_begin() const {
535
21
    return specific_attr_iterator<T>(attr_begin());
536
21
  }
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
534
3.29M
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.29M
    return specific_attr_iterator<T>(attr_begin());
536
3.29M
  }
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AnnotateAttr>() const
Line
Count
Source
534
8.84k
  specific_attr_iterator<T> specific_attr_begin() const {
535
8.84k
    return specific_attr_iterator<T>(attr_begin());
536
8.84k
  }
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableParamAttr>() const
Line
Count
Source
534
6.58k
  specific_attr_iterator<T> specific_attr_begin() const {
535
6.58k
    return specific_attr_iterator<T>(attr_begin());
536
6.58k
  }
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableAttr>() const
Line
Count
Source
534
319k
  specific_attr_iterator<T> specific_attr_begin() const {
535
319k
    return specific_attr_iterator<T>(attr_begin());
536
319k
  }
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
534
101
  specific_attr_iterator<T> specific_attr_begin() const {
535
101
    return specific_attr_iterator<T>(attr_begin());
536
101
  }
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OwnershipAttr>() const
Line
Count
Source
534
2.26k
  specific_attr_iterator<T> specific_attr_begin() const {
535
2.26k
    return specific_attr_iterator<T>(attr_begin());
536
2.26k
  }
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatAttr>() const
Line
Count
Source
534
3.60M
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.60M
    return specific_attr_iterator<T>(attr_begin());
536
3.60M
  }
clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
534
3.71k
  specific_attr_iterator<T> specific_attr_begin() const {
535
3.71k
    return specific_attr_iterator<T>(attr_begin());
536
3.71k
  }
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::DiagnoseIfAttr>() const
Line
Count
Source
534
83.8M
  specific_attr_iterator<T> specific_attr_begin() const {
535
83.8M
    return specific_attr_iterator<T>(attr_begin());
536
83.8M
  }
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::PtGuardedByAttr>() const
Line
Count
Source
534
442
  specific_attr_iterator<T> specific_attr_begin() const {
535
442
    return specific_attr_iterator<T>(attr_begin());
536
442
  }
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::GuardedByAttr>() const
Line
Count
Source
534
2.48k
  specific_attr_iterator<T> specific_attr_begin() const {
535
2.48k
    return specific_attr_iterator<T>(attr_begin());
536
2.48k
  }
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
534
177
  specific_attr_iterator<T> specific_attr_begin() const {
535
177
    return specific_attr_iterator<T>(attr_begin());
536
177
  }
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NoSanitizeAttr>() const
Line
Count
Source
534
280k
  specific_attr_iterator<T> specific_attr_begin() const {
535
280k
    return specific_attr_iterator<T>(attr_begin());
536
280k
  }
537
538
  template <typename T>
539
102M
  specific_attr_iterator<T> specific_attr_end() const {
540
102M
    return specific_attr_iterator<T>(attr_end());
541
102M
  }
clang::specific_attr_iterator<clang::OMPDeclareTargetDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
539
126k
  specific_attr_iterator<T> specific_attr_end() const {
540
126k
    return specific_attr_iterator<T>(attr_end());
541
126k
  }
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AlignedAttr>() const
Line
Count
Source
539
2.26M
  specific_attr_iterator<T> specific_attr_end() const {
540
2.26M
    return specific_attr_iterator<T>(attr_end());
541
2.26M
  }
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NonNullAttr>() const
Line
Count
Source
539
3.45M
  specific_attr_iterator<T> specific_attr_end() const {
540
3.45M
    return specific_attr_iterator<T>(attr_end());
541
3.45M
  }
clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnableIfAttr>() const
Line
Count
Source
539
5.53M
  specific_attr_iterator<T> specific_attr_end() const {
540
5.53M
    return specific_attr_iterator<T>(attr_end());
541
5.53M
  }
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatArgAttr>() const
Line
Count
Source
539
21
  specific_attr_iterator<T> specific_attr_end() const {
540
21
    return specific_attr_iterator<T>(attr_end());
541
21
  }
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
539
3.29M
  specific_attr_iterator<T> specific_attr_end() const {
540
3.29M
    return specific_attr_iterator<T>(attr_end());
541
3.29M
  }
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AnnotateAttr>() const
Line
Count
Source
539
8.84k
  specific_attr_iterator<T> specific_attr_end() const {
540
8.84k
    return specific_attr_iterator<T>(attr_end());
541
8.84k
  }
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableParamAttr>() const
Line
Count
Source
539
6.58k
  specific_attr_iterator<T> specific_attr_end() const {
540
6.58k
    return specific_attr_iterator<T>(attr_end());
541
6.58k
  }
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableAttr>() const
Line
Count
Source
539
319k
  specific_attr_iterator<T> specific_attr_end() const {
540
319k
    return specific_attr_iterator<T>(attr_end());
541
319k
  }
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
539
101
  specific_attr_iterator<T> specific_attr_end() const {
540
101
    return specific_attr_iterator<T>(attr_end());
541
101
  }
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OwnershipAttr>() const
Line
Count
Source
539
2.26k
  specific_attr_iterator<T> specific_attr_end() const {
540
2.26k
    return specific_attr_iterator<T>(attr_end());
541
2.26k
  }
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatAttr>() const
Line
Count
Source
539
3.60M
  specific_attr_iterator<T> specific_attr_end() const {
540
3.60M
    return specific_attr_iterator<T>(attr_end());
541
3.60M
  }
clang::specific_attr_iterator<clang::OMPDeclareVariantAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
539
3.71k
  specific_attr_iterator<T> specific_attr_end() const {
540
3.71k
    return specific_attr_iterator<T>(attr_end());
541
3.71k
  }
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::DiagnoseIfAttr>() const
Line
Count
Source
539
83.8M
  specific_attr_iterator<T> specific_attr_end() const {
540
83.8M
    return specific_attr_iterator<T>(attr_end());
541
83.8M
  }
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::PtGuardedByAttr>() const
Line
Count
Source
539
442
  specific_attr_iterator<T> specific_attr_end() const {
540
442
    return specific_attr_iterator<T>(attr_end());
541
442
  }
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::GuardedByAttr>() const
Line
Count
Source
539
2.48k
  specific_attr_iterator<T> specific_attr_end() const {
540
2.48k
    return specific_attr_iterator<T>(attr_end());
541
2.48k
  }
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
539
177
  specific_attr_iterator<T> specific_attr_end() const {
540
177
    return specific_attr_iterator<T>(attr_end());
541
177
  }
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NoSanitizeAttr>() const
Line
Count
Source
539
280k
  specific_attr_iterator<T> specific_attr_end() const {
540
280k
    return specific_attr_iterator<T>(attr_end());
541
280k
  }
542
543
677M
  template<typename T> T *getAttr() const {
544
432M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr244M
;
545
677M
  }
clang::TargetAttr* clang::Decl::getAttr<clang::TargetAttr>() const
Line
Count
Source
543
15.9M
  template<typename T> T *getAttr() const {
544
13.0M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.86M
;
545
15.9M
  }
clang::CPUSpecificAttr* clang::Decl::getAttr<clang::CPUSpecificAttr>() const
Line
Count
Source
543
15.8M
  template<typename T> T *getAttr() const {
544
13.0M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.81M
;
545
15.8M
  }
clang::CUDADeviceAttr* clang::Decl::getAttr<clang::CUDADeviceAttr>() const
Line
Count
Source
543
9.83k
  template<typename T> T *getAttr() const {
544
9.62k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr205
;
545
9.83k
  }
clang::CUDAConstantAttr* clang::Decl::getAttr<clang::CUDAConstantAttr>() const
Line
Count
Source
543
635
  template<typename T> T *getAttr() const {
544
409
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr226
;
545
635
  }
clang::TypeVisibilityAttr* clang::Decl::getAttr<clang::TypeVisibilityAttr>() const
Line
Count
Source
543
1.33M
  template<typename T> T *getAttr() const {
544
849k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())488k
: nullptr;
545
1.33M
  }
clang::VisibilityAttr* clang::Decl::getAttr<clang::VisibilityAttr>() const
Line
Count
Source
543
4.42M
  template<typename T> T *getAttr() const {
544
3.43M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())992k
: nullptr;
545
4.42M
  }
clang::SelectAnyAttr* clang::Decl::getAttr<clang::SelectAnyAttr>() const
Line
Count
Source
543
31.4M
  template<typename T> T *getAttr() const {
544
16.4M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr15.0M
;
545
31.4M
  }
clang::ArmBuiltinAliasAttr* clang::Decl::getAttr<clang::ArmBuiltinAliasAttr>() const
Line
Count
Source
543
96.1M
  template<typename T> T *getAttr() const {
544
84.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr11.7M
;
545
96.1M
  }
clang::BuiltinAttr* clang::Decl::getAttr<clang::BuiltinAttr>() const
Line
Count
Source
543
52.6M
  template<typename T> T *getAttr() const {
544
40.9M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr11.7M
;
545
52.6M
  }
clang::EnumExtensibilityAttr* clang::Decl::getAttr<clang::EnumExtensibilityAttr>() const
Line
Count
Source
543
604k
  template<typename T> T *getAttr() const {
544
470k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())133k
: nullptr;
545
604k
  }
clang::ExternalSourceSymbolAttr* clang::Decl::getAttr<clang::ExternalSourceSymbolAttr>() const
Line
Count
Source
543
61.8k
  template<typename T> T *getAttr() const {
544
61.1k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())713
: nullptr;
545
61.8k
  }
clang::AliasAttr* clang::Decl::getAttr<clang::AliasAttr>() const
Line
Count
Source
543
4.25M
  template<typename T> T *getAttr() const {
544
2.80M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr1.44M
;
545
4.25M
  }
clang::IFuncAttr* clang::Decl::getAttr<clang::IFuncAttr>() const
Line
Count
Source
543
3.29M
  template<typename T> T *getAttr() const {
544
2.78M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr506k
;
545
3.29M
  }
Unexecuted instantiation: clang::LoaderUninitializedAttr* clang::Decl::getAttr<clang::LoaderUninitializedAttr>() const
clang::UuidAttr* clang::Decl::getAttr<clang::UuidAttr>() const
Line
Count
Source
543
361
  template<typename T> T *getAttr() const {
544
210
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr151
;
545
361
  }
clang::ObjCMethodFamilyAttr* clang::Decl::getAttr<clang::ObjCMethodFamilyAttr>() const
Line
Count
Source
543
247k
  template<typename T> T *getAttr() const {
544
124k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr122k
;
545
247k
  }
clang::ObjCRuntimeNameAttr* clang::Decl::getAttr<clang::ObjCRuntimeNameAttr>() const
Line
Count
Source
543
22.3k
  template<typename T> T *getAttr() const {
544
20.0k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.36k
: nullptr;
545
22.3k
  }
clang::WarnUnusedResultAttr* clang::Decl::getAttr<clang::WarnUnusedResultAttr>() const
Line
Count
Source
543
430k
  template<typename T> T *getAttr() const {
544
233k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())197k
: nullptr;
545
430k
  }
clang::AllocSizeAttr* clang::Decl::getAttr<clang::AllocSizeAttr>() const
Line
Count
Source
543
610k
  template<typename T> T *getAttr() const {
544
316k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())293k
: nullptr;
545
610k
  }
clang::AbiTagAttr* clang::Decl::getAttr<clang::AbiTagAttr>() const
Line
Count
Source
543
4.59M
  template<typename T> T *getAttr() const {
544
2.33M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.26M
;
545
4.59M
  }
clang::PassObjectSizeAttr* clang::Decl::getAttr<clang::PassObjectSizeAttr>() const
Line
Count
Source
543
8.34M
  template<typename T> T *getAttr() const {
544
8.34M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.45k
: nullptr;
545
8.34M
  }
clang::AsmLabelAttr* clang::Decl::getAttr<clang::AsmLabelAttr>() const
Line
Count
Source
543
1.49M
  template<typename T> T *getAttr() const {
544
1.03M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr466k
;
545
1.49M
  }
clang::MSInheritanceAttr* clang::Decl::getAttr<clang::MSInheritanceAttr>() const
Line
Count
Source
543
1.71M
  template<typename T> T *getAttr() const {
544
1.06M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())646k
: nullptr;
545
1.71M
  }
clang::MSVtorDispAttr* clang::Decl::getAttr<clang::MSVtorDispAttr>() const
Line
Count
Source
543
1.68k
  template<typename T> T *getAttr() const {
544
1.51k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())168
: nullptr;
545
1.68k
  }
clang::MaxFieldAlignmentAttr* clang::Decl::getAttr<clang::MaxFieldAlignmentAttr>() const
Line
Count
Source
543
315k
  template<typename T> T *getAttr() const {
544
222k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())93.1k
: nullptr;
545
315k
  }
clang::LayoutVersionAttr* clang::Decl::getAttr<clang::LayoutVersionAttr>() const
Line
Count
Source
543
3.23k
  template<typename T> T *getAttr() const {
544
2.38k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())846
: nullptr;
545
3.23k
  }
clang::OMPThreadPrivateDeclAttr* clang::Decl::getAttr<clang::OMPThreadPrivateDeclAttr>() const
Line
Count
Source
543
67
  template<typename T> T *getAttr() const {
544
67
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
67
  }
clang::OMPAllocateDeclAttr* clang::Decl::getAttr<clang::OMPAllocateDeclAttr>() const
Line
Count
Source
543
361
  template<typename T> T *getAttr() const {
544
361
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
361
  }
Unexecuted instantiation: clang::OMPDeclareTargetDeclAttr* clang::Decl::getAttr<clang::OMPDeclareTargetDeclAttr>() const
clang::SectionAttr* clang::Decl::getAttr<clang::SectionAttr>() const
Line
Count
Source
543
1.32M
  template<typename T> T *getAttr() const {
544
934k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())387k
: nullptr;
545
1.32M
  }
clang::DeprecatedAttr* clang::Decl::getAttr<clang::DeprecatedAttr>() const
Line
Count
Source
543
81.5k
  template<typename T> T *getAttr() const {
544
81.5k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr6
;
545
81.5k
  }
clang::UnavailableAttr* clang::Decl::getAttr<clang::UnavailableAttr>() const
Line
Count
Source
543
376
  template<typename T> T *getAttr() const {
544
376
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
376
  }
clang::FormatArgAttr* clang::Decl::getAttr<clang::FormatArgAttr>() const
Line
Count
Source
543
11
  template<typename T> T *getAttr() const {
544
10
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr1
;
545
11
  }
clang::TypeTagForDatatypeAttr* clang::Decl::getAttr<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
543
274
  template<typename T> T *getAttr() const {
544
261
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr13
;
545
274
  }
clang::AllocAlignAttr* clang::Decl::getAttr<clang::AllocAlignAttr>() const
Line
Count
Source
543
304k
  template<typename T> T *getAttr() const {
544
176k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr127k
;
545
304k
  }
clang::ReturnsNonNullAttr* clang::Decl::getAttr<clang::ReturnsNonNullAttr>() const
Line
Count
Source
543
2.88k
  template<typename T> T *getAttr() const {
544
2.07k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr811
;
545
2.88k
  }
clang::NonNullAttr* clang::Decl::getAttr<clang::NonNullAttr>() const
Line
Count
Source
543
57.9k
  template<typename T> T *getAttr() const {
544
57.6k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())269
: nullptr;
545
57.9k
  }
clang::SentinelAttr* clang::Decl::getAttr<clang::SentinelAttr>() const
Line
Count
Source
543
3.42M
  template<typename T> T *getAttr() const {
544
2.66M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr757k
;
545
3.42M
  }
clang::DLLImportAttr* clang::Decl::getAttr<clang::DLLImportAttr>() const
Line
Count
Source
543
21.2M
  template<typename T> T *getAttr() const {
544
14.7M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr6.49M
;
545
21.2M
  }
clang::DLLExportAttr* clang::Decl::getAttr<clang::DLLExportAttr>() const
Line
Count
Source
543
21.2M
  template<typename T> T *getAttr() const {
544
14.7M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr6.50M
;
545
21.2M
  }
clang::WeakAttr* clang::Decl::getAttr<clang::WeakAttr>() const
Line
Count
Source
543
16.5M
  template<typename T> T *getAttr() const {
544
13.2M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr3.33M
;
545
16.5M
  }
clang::WeakRefAttr* clang::Decl::getAttr<clang::WeakRefAttr>() const
Line
Count
Source
543
16.5M
  template<typename T> T *getAttr() const {
544
13.2M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr3.33M
;
545
16.5M
  }
clang::NotTailCalledAttr* clang::Decl::getAttr<clang::NotTailCalledAttr>() const
Line
Count
Source
543
24.6M
  template<typename T> T *getAttr() const {
544
13.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr11.2M
;
545
24.6M
  }
clang::CPUDispatchAttr* clang::Decl::getAttr<clang::CPUDispatchAttr>() const
Line
Count
Source
543
15.2M
  template<typename T> T *getAttr() const {
544
12.7M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.48M
;
545
15.2M
  }
clang::UsedAttr* clang::Decl::getAttr<clang::UsedAttr>() const
Line
Count
Source
543
3.36M
  template<typename T> T *getAttr() const {
544
2.07M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.29M
: nullptr;
545
3.36M
  }
clang::ConstInitAttr* clang::Decl::getAttr<clang::ConstInitAttr>() const
Line
Count
Source
543
674k
  template<typename T> T *getAttr() const {
544
458k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr216k
;
545
674k
  }
clang::CodeSegAttr* clang::Decl::getAttr<clang::CodeSegAttr>() const
Line
Count
Source
543
2.80M
  template<typename T> T *getAttr() const {
544
1.65M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.15M
: nullptr;
545
2.80M
  }
clang::CarriesDependencyAttr* clang::Decl::getAttr<clang::CarriesDependencyAttr>() const
Line
Count
Source
543
726k
  template<typename T> T *getAttr() const {
544
687k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())38.4k
: nullptr;
545
726k
  }
clang::OverloadableAttr* clang::Decl::getAttr<clang::OverloadableAttr>() const
Line
Count
Source
543
6.27M
  template<typename T> T *getAttr() const {
544
6.27M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr16
;
545
6.27M
  }
clang::AnyX86NoCallerSavedRegistersAttr* clang::Decl::getAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const
Line
Count
Source
543
1
  template<typename T> T *getAttr() const {
544
1
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
1
  }
clang::CXX11NoReturnAttr* clang::Decl::getAttr<clang::CXX11NoReturnAttr>() const
Line
Count
Source
543
219k
  template<typename T> T *getAttr() const {
544
188k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())31.7k
: nullptr;
545
219k
  }
clang::NoBuiltinAttr* clang::Decl::getAttr<clang::NoBuiltinAttr>() const
Line
Count
Source
543
13.8M
  template<typename T> T *getAttr() const {
544
12.2M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr1.58M
;
545
13.8M
  }
clang::DLLExportStaticLocalAttr* clang::Decl::getAttr<clang::DLLExportStaticLocalAttr>() const
Line
Count
Source
543
5
  template<typename T> T *getAttr() const {
544
5
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
5
  }
clang::DLLImportStaticLocalAttr* clang::Decl::getAttr<clang::DLLImportStaticLocalAttr>() const
Line
Count
Source
543
1
  template<typename T> T *getAttr() const {
544
1
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
1
  }
clang::NakedAttr* clang::Decl::getAttr<clang::NakedAttr>() const
Line
Count
Source
543
429
  template<typename T> T *getAttr() const {
544
347
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr82
;
545
429
  }
clang::Mips16Attr* clang::Decl::getAttr<clang::Mips16Attr>() const
Line
Count
Source
543
28
  template<typename T> T *getAttr() const {
544
24
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
: nullptr;
545
28
  }
clang::RISCVInterruptAttr* clang::Decl::getAttr<clang::RISCVInterruptAttr>() const
Line
Count
Source
543
1.49k
  template<typename T> T *getAttr() const {
544
1.45k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())34
: nullptr;
545
1.49k
  }
clang::MicroMipsAttr* clang::Decl::getAttr<clang::MicroMipsAttr>() const
Line
Count
Source
543
11
  template<typename T> T *getAttr() const {
544
8
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
: nullptr;
545
11
  }
clang::MipsInterruptAttr* clang::Decl::getAttr<clang::MipsInterruptAttr>() const
Line
Count
Source
543
411
  template<typename T> T *getAttr() const {
544
347
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())64
: nullptr;
545
411
  }
clang::MipsShortCallAttr* clang::Decl::getAttr<clang::MipsShortCallAttr>() const
Line
Count
Source
543
16
  template<typename T> T *getAttr() const {
544
12
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
: nullptr;
545
16
  }
clang::MipsLongCallAttr* clang::Decl::getAttr<clang::MipsLongCallAttr>() const
Line
Count
Source
543
16
  template<typename T> T *getAttr() const {
544
12
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
: nullptr;
545
16
  }
clang::CUDASharedAttr* clang::Decl::getAttr<clang::CUDASharedAttr>() const
Line
Count
Source
543
173
  template<typename T> T *getAttr() const {
544
168
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())5
: nullptr;
545
173
  }
clang::CUDAHostAttr* clang::Decl::getAttr<clang::CUDAHostAttr>() const
Line
Count
Source
543
1.41k
  template<typename T> T *getAttr() const {
544
1.21k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr205
;
545
1.41k
  }
clang::CUDAGlobalAttr* clang::Decl::getAttr<clang::CUDAGlobalAttr>() const
Line
Count
Source
543
2.57k
  template<typename T> T *getAttr() const {
544
2.00k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())561
: nullptr;
545
2.57k
  }
clang::CUDADeviceBuiltinTextureTypeAttr* clang::Decl::getAttr<clang::CUDADeviceBuiltinTextureTypeAttr>() const
Line
Count
Source
543
10
  template<typename T> T *getAttr() const {
544
10
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
545
10
  }
clang::CUDADeviceBuiltinSurfaceTypeAttr* clang::Decl::getAttr<clang::CUDADeviceBuiltinSurfaceTypeAttr>() const
Line
Count
Source
543
8
  template<typename T> T *getAttr() const {
544
8
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
545
8
  }
clang::HotAttr* clang::Decl::getAttr<clang::HotAttr>() const
Line
Count
Source
543
3.75k
  template<typename T> T *getAttr() const {
544
3.03k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())719
: nullptr;
545
3.75k
  }
clang::ColdAttr* clang::Decl::getAttr<clang::ColdAttr>() const
Line
Count
Source
543
7
  template<typename T> T *getAttr() const {
544
6
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
: nullptr;
545
7
  }
clang::DisableTailCallsAttr* clang::Decl::getAttr<clang::DisableTailCallsAttr>() const
Line
Count
Source
543
31
  template<typename T> T *getAttr() const {
544
30
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
: nullptr;
545
31
  }
clang::VecReturnAttr* clang::Decl::getAttr<clang::VecReturnAttr>() const
Line
Count
Source
543
11
  template<typename T> T *getAttr() const {
544
10
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
: nullptr;
545
11
  }
Unexecuted instantiation: clang::CFUnknownTransferAttr* clang::Decl::getAttr<clang::CFUnknownTransferAttr>() const
clang::CFAuditedTransferAttr* clang::Decl::getAttr<clang::CFAuditedTransferAttr>() const
Line
Count
Source
543
1
  template<typename T> T *getAttr() const {
544
1
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
545
1
  }
clang::NoSpeculativeLoadHardeningAttr* clang::Decl::getAttr<clang::NoSpeculativeLoadHardeningAttr>() const
Line
Count
Source
543
28
  template<typename T> T *getAttr() const {
544
25
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
: nullptr;
545
28
  }
clang::SpeculativeLoadHardeningAttr* clang::Decl::getAttr<clang::SpeculativeLoadHardeningAttr>() const
Line
Count
Source
543
28
  template<typename T> T *getAttr() const {
544
25
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
: nullptr;
545
28
  }
clang::MinVectorWidthAttr* clang::Decl::getAttr<clang::MinVectorWidthAttr>() const
Line
Count
Source
543
1.28M
  template<typename T> T *getAttr() const {
544
1.11M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr172k
;
545
1.28M
  }
clang::OwnerAttr* clang::Decl::getAttr<clang::OwnerAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
35
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())8
: nullptr;
545
43
  }
clang::PointerAttr* clang::Decl::getAttr<clang::PointerAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
35
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())8
: nullptr;
545
43
  }
clang::NoDestroyAttr* clang::Decl::getAttr<clang::NoDestroyAttr>() const
Line
Count
Source
543
28
  template<typename T> T *getAttr() const {
544
24
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
: nullptr;
545
28
  }
clang::AlwaysDestroyAttr* clang::Decl::getAttr<clang::AlwaysDestroyAttr>() const
Line
Count
Source
543
42
  template<typename T> T *getAttr() const {
544
38
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
: nullptr;
545
42
  }
clang::OpenCLIntelReqdSubGroupSizeAttr* clang::Decl::getAttr<clang::OpenCLIntelReqdSubGroupSizeAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::VecTypeHintAttr* clang::Decl::getAttr<clang::VecTypeHintAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::OptimizeNoneAttr* clang::Decl::getAttr<clang::OptimizeNoneAttr>() const
Line
Count
Source
543
8.07M
  template<typename T> T *getAttr() const {
544
7.90M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())171k
: nullptr;
545
8.07M
  }
clang::InternalLinkageAttr* clang::Decl::getAttr<clang::InternalLinkageAttr>() const
Line
Count
Source
543
10
  template<typename T> T *getAttr() const {
544
8
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
: nullptr;
545
10
  }
clang::CommonAttr* clang::Decl::getAttr<clang::CommonAttr>() const
Line
Count
Source
543
1.17k
  template<typename T> T *getAttr() const {
544
1.13k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr33
;
545
1.17k
  }
clang::AlwaysInlineAttr* clang::Decl::getAttr<clang::AlwaysInlineAttr>() const
Line
Count
Source
543
773
  template<typename T> T *getAttr() const {
544
686
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr87
;
545
773
  }
clang::MinSizeAttr* clang::Decl::getAttr<clang::MinSizeAttr>() const
Line
Count
Source
543
105
  template<typename T> T *getAttr() const {
544
86
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())19
: nullptr;
545
105
  }
clang::WebAssemblyImportModuleAttr* clang::Decl::getAttr<clang::WebAssemblyImportModuleAttr>() const
Line
Count
Source
543
1.22k
  template<typename T> T *getAttr() const {
544
1.20k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())14
: nullptr;
545
1.22k
  }
clang::WebAssemblyImportNameAttr* clang::Decl::getAttr<clang::WebAssemblyImportNameAttr>() const
Line
Count
Source
543
1.22k
  template<typename T> T *getAttr() const {
544
1.20k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())14
: nullptr;
545
1.22k
  }
clang::ReqdWorkGroupSizeAttr* clang::Decl::getAttr<clang::ReqdWorkGroupSizeAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::WorkGroupSizeHintAttr* clang::Decl::getAttr<clang::WorkGroupSizeHintAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::AMDGPUFlatWorkGroupSizeAttr* clang::Decl::getAttr<clang::AMDGPUFlatWorkGroupSizeAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::AMDGPUWavesPerEUAttr* clang::Decl::getAttr<clang::AMDGPUWavesPerEUAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::AMDGPUNumSGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumSGPRAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::AMDGPUNumVGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumVGPRAttr>() const
Line
Count
Source
543
17.7M
  template<typename T> T *getAttr() const {
544
15.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr2.45M
;
545
17.7M
  }
clang::TrivialABIAttr* clang::Decl::getAttr<clang::TrivialABIAttr>() const
Line
Count
Source
543
56
  template<typename T> T *getAttr() const {
544
56
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
56
  }
clang::FinalAttr* clang::Decl::getAttr<clang::FinalAttr>() const
Line
Count
Source
543
384k
  template<typename T> T *getAttr() const {
544
350k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())34.2k
: nullptr;
545
384k
  }
clang::OverrideAttr* clang::Decl::getAttr<clang::OverrideAttr>() const
Line
Count
Source
543
20
  template<typename T> T *getAttr() const {
544
20
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
20
  }
clang::ObjCDirectAttr* clang::Decl::getAttr<clang::ObjCDirectAttr>() const
Line
Count
Source
543
173k
  template<typename T> T *getAttr() const {
544
104k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())68.6k
: nullptr;
545
173k
  }
clang::AvailabilityAttr* clang::Decl::getAttr<clang::AvailabilityAttr>() const
Line
Count
Source
543
14.1M
  template<typename T> T *getAttr() const {
544
12.3M
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr1.83M
;
545
14.1M
  }
clang::UnusedAttr* clang::Decl::getAttr<clang::UnusedAttr>() const
Line
Count
Source
543
80.6M
  template<typename T> T *getAttr() const {
544
71.8M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())8.73M
: nullptr;
545
80.6M
  }
clang::ObjCBridgeRelatedAttr* clang::Decl::getAttr<clang::ObjCBridgeRelatedAttr>() const
Line
Count
Source
543
1.30k
  template<typename T> T *getAttr() const {
544
992
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr317
;
545
1.30k
  }
clang::ObjCBridgeAttr* clang::Decl::getAttr<clang::ObjCBridgeAttr>() const
Line
Count
Source
543
10.3k
  template<typename T> T *getAttr() const {
544
7.27k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.11k
: nullptr;
545
10.3k
  }
clang::ObjCBridgeMutableAttr* clang::Decl::getAttr<clang::ObjCBridgeMutableAttr>() const
Line
Count
Source
543
8.24k
  template<typename T> T *getAttr() const {
544
7.27k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())969
: nullptr;
545
8.24k
  }
clang::WarnUnusedAttr* clang::Decl::getAttr<clang::WarnUnusedAttr>() const
Line
Count
Source
543
7
  template<typename T> T *getAttr() const {
544
5
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
: nullptr;
545
7
  }
clang::OpenCLAccessAttr* clang::Decl::getAttr<clang::OpenCLAccessAttr>() const
Line
Count
Source
543
97
  template<typename T> T *getAttr() const {
544
87
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr10
;
545
97
  }
clang::ParameterABIAttr* clang::Decl::getAttr<clang::ParameterABIAttr>() const
Line
Count
Source
543
34.7M
  template<typename T> T *getAttr() const {
544
34.6M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())60.6k
: nullptr;
545
34.7M
  }
clang::TestTypestateAttr* clang::Decl::getAttr<clang::TestTypestateAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
43
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
43
  }
clang::ConsumableAttr* clang::Decl::getAttr<clang::ConsumableAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
43
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
43
  }
clang::CallableWhenAttr* clang::Decl::getAttr<clang::CallableWhenAttr>() const
Line
Count
Source
543
291
  template<typename T> T *getAttr() const {
544
277
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr14
;
545
291
  }
clang::ParamTypestateAttr* clang::Decl::getAttr<clang::ParamTypestateAttr>() const
Line
Count
Source
543
72
  template<typename T> T *getAttr() const {
544
53
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())19
: nullptr;
545
72
  }
clang::ReturnTypestateAttr* clang::Decl::getAttr<clang::ReturnTypestateAttr>() const
Line
Count
Source
543
268
  template<typename T> T *getAttr() const {
544
229
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())39
: nullptr;
545
268
  }
clang::SetTypestateAttr* clang::Decl::getAttr<clang::SetTypestateAttr>() const
Line
Count
Source
543
215
  template<typename T> T *getAttr() const {
544
202
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr13
;
545
215
  }
clang::CapabilityAttr* clang::Decl::getAttr<clang::CapabilityAttr>() const
Line
Count
Source
543
4.18k
  template<typename T> T *getAttr() const {
544
4.02k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr152
;
545
4.18k
  }
clang::LockReturnedAttr* clang::Decl::getAttr<clang::LockReturnedAttr>() const
Line
Count
Source
543
360
  template<typename T> T *getAttr() const {
544
188
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())172
: nullptr;
545
360
  }
clang::PcsAttr* clang::Decl::getAttr<clang::PcsAttr>() const
Line
Count
Source
543
16.6k
  template<typename T> T *getAttr() const {
544
13.9k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.72k
: nullptr;
545
16.6k
  }
clang::AssumeAlignedAttr* clang::Decl::getAttr<clang::AssumeAlignedAttr>() const
Line
Count
Source
543
303k
  template<typename T> T *getAttr() const {
544
176k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr127k
;
545
303k
  }
clang::AlignValueAttr* clang::Decl::getAttr<clang::AlignValueAttr>() const
Line
Count
Source
543
688k
  template<typename T> T *getAttr() const {
544
665k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())23.0k
: nullptr;
545
688k
  }
clang::CFGuardAttr* clang::Decl::getAttr<clang::CFGuardAttr>() const
Line
Count
Source
543
310k
  template<typename T> T *getAttr() const {
544
214k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())96.1k
: nullptr;
545
310k
  }
clang::UninitializedAttr* clang::Decl::getAttr<clang::UninitializedAttr>() const
Line
Count
Source
543
192k
  template<typename T> T *getAttr() const {
544
185k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())6.82k
: nullptr;
545
192k
  }
clang::CleanupAttr* clang::Decl::getAttr<clang::CleanupAttr>() const
Line
Count
Source
543
210k
  template<typename T> T *getAttr() const {
544
186k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())23.5k
: nullptr;
545
210k
  }
clang::InitSegAttr* clang::Decl::getAttr<clang::InitSegAttr>() const
Line
Count
Source
543
5.68k
  template<typename T> T *getAttr() const {
544
4.55k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.12k
: nullptr;
545
5.68k
  }
clang::InitPriorityAttr* clang::Decl::getAttr<clang::InitPriorityAttr>() const
Line
Count
Source
543
5.52k
  template<typename T> T *getAttr() const {
544
4.42k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.10k
: nullptr;
545
5.52k
  }
clang::OMPCaptureKindAttr* clang::Decl::getAttr<clang::OMPCaptureKindAttr>() const
Line
Count
Source
543
229
  template<typename T> T *getAttr() const {
544
229
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
229
  }
clang::XRayInstrumentAttr* clang::Decl::getAttr<clang::XRayInstrumentAttr>() const
Line
Count
Source
543
279k
  template<typename T> T *getAttr() const {
544
177k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())102k
: nullptr;
545
279k
  }
clang::XRayLogArgsAttr* clang::Decl::getAttr<clang::XRayLogArgsAttr>() const
Line
Count
Source
543
76
  template<typename T> T *getAttr() const {
544
76
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
76
  }
clang::PatchableFunctionEntryAttr* clang::Decl::getAttr<clang::PatchableFunctionEntryAttr>() const
Line
Count
Source
543
279k
  template<typename T> T *getAttr() const {
544
177k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())102k
: nullptr;
545
279k
  }
clang::TLSModelAttr* clang::Decl::getAttr<clang::TLSModelAttr>() const
Line
Count
Source
543
528
  template<typename T> T *getAttr() const {
544
398
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())130
: nullptr;
545
528
  }
clang::PragmaClangBSSSectionAttr* clang::Decl::getAttr<clang::PragmaClangBSSSectionAttr>() const
Line
Count
Source
543
33.0k
  template<typename T> T *getAttr() const {
544
30.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.78k
: nullptr;
545
33.0k
  }
clang::PragmaClangDataSectionAttr* clang::Decl::getAttr<clang::PragmaClangDataSectionAttr>() const
Line
Count
Source
543
33.0k
  template<typename T> T *getAttr() const {
544
30.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.78k
: nullptr;
545
33.0k
  }
clang::PragmaClangRodataSectionAttr* clang::Decl::getAttr<clang::PragmaClangRodataSectionAttr>() const
Line
Count
Source
543
33.0k
  template<typename T> T *getAttr() const {
544
30.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.78k
: nullptr;
545
33.0k
  }
clang::PragmaClangRelroSectionAttr* clang::Decl::getAttr<clang::PragmaClangRelroSectionAttr>() const
Line
Count
Source
543
33.0k
  template<typename T> T *getAttr() const {
544
30.2k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.78k
: nullptr;
545
33.0k
  }
clang::PragmaClangTextSectionAttr* clang::Decl::getAttr<clang::PragmaClangTextSectionAttr>() const
Line
Count
Source
543
272k
  template<typename T> T *getAttr() const {
544
171k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())101k
: nullptr;
545
272k
  }
clang::CallbackAttr* clang::Decl::getAttr<clang::CallbackAttr>() const
Line
Count
Source
543
274k
  template<typename T> T *getAttr() const {
544
163k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())111k
: nullptr;
545
274k
  }
clang::ConstructorAttr* clang::Decl::getAttr<clang::ConstructorAttr>() const
Line
Count
Source
543
191k
  template<typename T> T *getAttr() const {
544
112k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())79.1k
: nullptr;
545
191k
  }
clang::DestructorAttr* clang::Decl::getAttr<clang::DestructorAttr>() const
Line
Count
Source
543
191k
  template<typename T> T *getAttr() const {
544
112k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())79.1k
: nullptr;
545
191k
  }
clang::AVRInterruptAttr* clang::Decl::getAttr<clang::AVRInterruptAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
41
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
: nullptr;
545
43
  }
clang::AVRSignalAttr* clang::Decl::getAttr<clang::AVRSignalAttr>() const
Line
Count
Source
543
43
  template<typename T> T *getAttr() const {
544
41
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
: nullptr;
545
43
  }
clang::WebAssemblyExportNameAttr* clang::Decl::getAttr<clang::WebAssemblyExportNameAttr>() const
Line
Count
Source
543
1.21k
  template<typename T> T *getAttr() const {
544
1.20k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())7
: nullptr;
545
1.21k
  }
clang::ARMInterruptAttr* clang::Decl::getAttr<clang::ARMInterruptAttr>() const
Line
Count
Source
543
12.0k
  template<typename T> T *getAttr() const {
544
10.3k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.73k
: nullptr;
545
12.0k
  }
clang::CUDALaunchBoundsAttr* clang::Decl::getAttr<clang::CUDALaunchBoundsAttr>() const
Line
Count
Source
543
291
  template<typename T> T *getAttr() const {
544
287
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr4
;
545
291
  }
clang::MSP430InterruptAttr* clang::Decl::getAttr<clang::MSP430InterruptAttr>() const
Line
Count
Source
543
21
  template<typename T> T *getAttr() const {
544
20
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
: nullptr;
545
21
  }
clang::BlocksAttr* clang::Decl::getAttr<clang::BlocksAttr>() const
Line
Count
Source
543
4
  template<typename T> T *getAttr() const {
544
4
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
4
  }
clang::AcquireHandleAttr* clang::Decl::getAttr<clang::AcquireHandleAttr>() const
Line
Count
Source
543
62
  template<typename T> T *getAttr() const {
544
62
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
62
  }
clang::ReleaseHandleAttr* clang::Decl::getAttr<clang::ReleaseHandleAttr>() const
Line
Count
Source
543
112
  template<typename T> T *getAttr() const {
544
112
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
112
  }
clang::UseHandleAttr* clang::Decl::getAttr<clang::UseHandleAttr>() const
Line
Count
Source
543
32
  template<typename T> T *getAttr() const {
544
32
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
545
32
  }
clang::IBOutletCollectionAttr* clang::Decl::getAttr<clang::IBOutletCollectionAttr>() const
Line
Count
Source
543
33
  template<typename T> T *getAttr() const {
544
26
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())7
: nullptr;
545
33
  }
clang::AnnotateAttr* clang::Decl::getAttr<clang::AnnotateAttr>() const
Line
Count
Source
543
65
  template<typename T> T *getAttr() const {
544
54
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())11
: nullptr;
545
65
  }
546
547
1.01G
  template<typename T> bool hasAttr() const {
548
1.01G
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())564M
;
549
1.01G
  }
bool clang::Decl::hasAttr<clang::DLLImportAttr>() const
Line
Count
Source
547
36.7M
  template<typename T> bool hasAttr() const {
548
36.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())22.9M
;
549
36.7M
  }
bool clang::Decl::hasAttr<clang::DLLExportAttr>() const
Line
Count
Source
547
9.01M
  template<typename T> bool hasAttr() const {
548
9.01M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.47M
;
549
9.01M
  }
bool clang::Decl::hasAttr<clang::CUDAGlobalAttr>() const
Line
Count
Source
547
51.9M
  template<typename T> bool hasAttr() const {
548
51.9M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())41.1M
;
549
51.9M
  }
bool clang::Decl::hasAttr<clang::GNUInlineAttr>() const
Line
Count
Source
547
9.05M
  template<typename T> bool hasAttr() const {
548
9.05M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8.13M
;
549
9.05M
  }
bool clang::Decl::hasAttr<clang::PackedAttr>() const
Line
Count
Source
547
1.71M
  template<typename T> bool hasAttr() const {
548
1.71M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())231k
;
549
1.71M
  }
bool clang::Decl::hasAttr<clang::AlignedAttr>() const
Line
Count
Source
547
1.39M
  template<typename T> bool hasAttr() const {
548
1.39M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())239k
;
549
1.39M
  }
bool clang::Decl::hasAttr<clang::BlocksAttr>() const
Line
Count
Source
547
50.0M
  template<typename T> bool hasAttr() const {
548
50.0M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.56M
;
549
50.0M
  }
bool clang::Decl::hasAttr<clang::TransparentUnionAttr>() const
Line
Count
Source
547
238
  template<typename T> bool hasAttr() const {
548
238
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())141
;
549
238
  }
bool clang::Decl::hasAttr<clang::WeakRefAttr>() const
Line
Count
Source
547
36.8M
  template<typename T> bool hasAttr() const {
548
36.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())29.7M
;
549
36.8M
  }
bool clang::Decl::hasAttr<clang::AliasAttr>() const
Line
Count
Source
547
39.9M
  template<typename T> bool hasAttr() const {
548
39.9M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())22.1M
;
549
39.9M
  }
bool clang::Decl::hasAttr<clang::UsedAttr>() const
Line
Count
Source
547
42.4M
  template<typename T> bool hasAttr() const {
548
42.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())19.1M
;
549
42.4M
  }
bool clang::Decl::hasAttr<clang::ConstructorAttr>() const
Line
Count
Source
547
5.44M
  template<typename T> bool hasAttr() const {
548
5.44M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.08M
;
549
5.44M
  }
bool clang::Decl::hasAttr<clang::DestructorAttr>() const
Line
Count
Source
547
5.44M
  template<typename T> bool hasAttr() const {
548
5.44M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.08M
;
549
5.44M
  }
bool clang::Decl::hasAttr<clang::UnavailableAttr>() const
Line
Count
Source
547
3.17M
  template<typename T> bool hasAttr() const {
548
3.17M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())305k
;
549
3.17M
  }
bool clang::Decl::hasAttr<clang::DeprecatedAttr>() const
Line
Count
Source
547
101
  template<typename T> bool hasAttr() const {
548
101
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())19
;
549
101
  }
bool clang::Decl::hasAttr<clang::CUDADeviceAttr>() const
Line
Count
Source
547
12.8M
  template<typename T> bool hasAttr() const {
548
12.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())55.8k
;
549
12.8M
  }
bool clang::Decl::hasAttr<clang::CUDAConstantAttr>() const
Line
Count
Source
547
12.8M
  template<typename T> bool hasAttr() const {
548
12.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())43.7k
;
549
12.8M
  }
bool clang::Decl::hasAttr<clang::AvailabilityAttr>() const
Line
Count
Source
547
115
  template<typename T> bool hasAttr() const {
548
115
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())13
;
549
115
  }
bool clang::Decl::hasAttr<clang::VisibilityAttr>() const
Line
Count
Source
547
89.2k
  template<typename T> bool hasAttr() const {
548
89.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())9.01k
;
549
89.2k
  }
bool clang::Decl::hasAttr<clang::TypeVisibilityAttr>() const
Line
Count
Source
547
41.1k
  template<typename T> bool hasAttr() const {
548
41.1k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())40.4k
;
549
41.1k
  }
bool clang::Decl::hasAttr<clang::InternalLinkageAttr>() const
Line
Count
Source
547
101M
  template<typename T> bool hasAttr() const {
548
101M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())75.4M
;
549
101M
  }
bool clang::Decl::hasAttr<clang::ThreadAttr>() const
Line
Count
Source
547
6.37M
  template<typename T> bool hasAttr() const {
548
6.37M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())130k
;
549
6.37M
  }
bool clang::Decl::hasAttr<clang::OMPThreadPrivateDeclAttr>() const
Line
Count
Source
547
6.20M
  template<typename T> bool hasAttr() const {
548
6.20M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())68.6k
;
549
6.20M
  }
bool clang::Decl::hasAttr<clang::CUDASharedAttr>() const
Line
Count
Source
547
42.6k
  template<typename T> bool hasAttr() const {
548
42.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.44k
;
549
42.6k
  }
bool clang::Decl::hasAttr<clang::NoDestroyAttr>() const
Line
Count
Source
547
1.20M
  template<typename T> bool hasAttr() const {
548
1.20M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())21.6k
;
549
1.20M
  }
bool clang::Decl::hasAttr<clang::AlwaysDestroyAttr>() const
Line
Count
Source
547
44
  template<typename T> bool hasAttr() const {
548
44
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())21
;
549
44
  }
bool clang::Decl::hasAttr<clang::OpenCLKernelAttr>() const
Line
Count
Source
547
30.7M
  template<typename T> bool hasAttr() const {
548
30.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())22.6M
;
549
30.7M
  }
bool clang::Decl::hasAttr<clang::NoReturnAttr>() const
Line
Count
Source
547
5.19M
  template<typename T> bool hasAttr() const {
548
5.19M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.57M
;
549
5.19M
  }
bool clang::Decl::hasAttr<clang::CXX11NoReturnAttr>() const
Line
Count
Source
547
4.57M
  template<typename T> bool hasAttr() const {
548
4.57M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.28M
;
549
4.57M
  }
bool clang::Decl::hasAttr<clang::C11NoReturnAttr>() const
Line
Count
Source
547
4.56M
  template<typename T> bool hasAttr() const {
548
4.56M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.28M
;
549
4.56M
  }
bool clang::Decl::hasAttr<clang::TargetAttr>() const
Line
Count
Source
547
15.3M
  template<typename T> bool hasAttr() const {
548
15.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())12.8M
;
549
15.3M
  }
bool clang::Decl::hasAttr<clang::CPUDispatchAttr>() const
Line
Count
Source
547
26.0M
  template<typename T> bool hasAttr() const {
548
26.0M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())21.9M
;
549
26.0M
  }
bool clang::Decl::hasAttr<clang::CPUSpecificAttr>() const
Line
Count
Source
547
14.2M
  template<typename T> bool hasAttr() const {
548
14.2M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11.7M
;
549
14.2M
  }
bool clang::Decl::hasAttr<clang::OverloadableAttr>() const
Line
Count
Source
547
76.7M
  template<typename T> bool hasAttr() const {
548
76.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())73.6M
;
549
76.7M
  }
bool clang::Decl::hasAttr<clang::ArmBuiltinAliasAttr>() const
Line
Count
Source
547
42.6M
  template<typename T> bool hasAttr() const {
548
42.6M
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
42.6M
  }
bool clang::Decl::hasAttr<clang::FlagEnumAttr>() const
Line
Count
Source
547
475k
  template<typename T> bool hasAttr() const {
548
475k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.93k
;
549
475k
  }
bool clang::Decl::hasAttr<clang::CapturedRecordAttr>() const
Line
Count
Source
547
8.77k
  template<typename T> bool hasAttr() const {
548
8.77k
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
8.77k
  }
bool clang::Decl::hasAttr<clang::MSStructAttr>() const
Line
Count
Source
547
1.71M
  template<typename T> bool hasAttr() const {
548
1.71M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())315k
;
549
1.71M
  }
bool clang::Decl::hasAttr<clang::IFuncAttr>() const
Line
Count
Source
547
33.4M
  template<typename T> bool hasAttr() const {
548
33.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())18.2M
;
549
33.4M
  }
bool clang::Decl::hasAttr<clang::LoaderUninitializedAttr>() const
Line
Count
Source
547
25.2M
  template<typename T> bool hasAttr() const {
548
25.2M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())9.09M
;
549
25.2M
  }
bool clang::Decl::hasAttr<clang::FinalAttr>() const
Line
Count
Source
547
5.76M
  template<typename T> bool hasAttr() const {
548
5.76M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.59M
;
549
5.76M
  }
bool clang::Decl::hasAttr<clang::ArcWeakrefUnavailableAttr>() const
Line
Count
Source
547
569
  template<typename T> bool hasAttr() const {
548
569
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())81
;
549
569
  }
bool clang::Decl::hasAttr<clang::ObjCRequiresPropertyDefsAttr>() const
Line
Count
Source
547
18.6k
  template<typename T> bool hasAttr() const {
548
18.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.96k
;
549
18.6k
  }
bool clang::Decl::hasAttr<clang::ObjCDirectAttr>() const
Line
Count
Source
547
3.13M
  template<typename T> bool hasAttr() const {
548
3.13M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.74M
;
549
3.13M
  }
bool clang::Decl::hasAttr<clang::ObjCDesignatedInitializerAttr>() const
Line
Count
Source
547
17.7M
  template<typename T> bool hasAttr() const {
548
17.7M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())15.3M
;
549
17.7M
  }
bool clang::Decl::hasAttr<clang::NSConsumesSelfAttr>() const
Line
Count
Source
547
30.7k
  template<typename T> bool hasAttr() const {
548
30.7k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())12.5k
;
549
30.7k
  }
bool clang::Decl::hasAttr<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
547
11.8k
  template<typename T> bool hasAttr() const {
548
11.8k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())777
;
549
11.8k
  }
bool clang::Decl::hasAttr<clang::PureAttr>() const
Line
Count
Source
547
1.07M
  template<typename T> bool hasAttr() const {
548
1.07M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())499k
;
549
1.07M
  }
bool clang::Decl::hasAttr<clang::ConstAttr>() const
Line
Count
Source
547
16.3M
  template<typename T> bool hasAttr() const {
548
16.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())15.7M
;
549
16.3M
  }
bool clang::Decl::hasAttr<clang::WarnUnusedAttr>() const
Line
Count
Source
547
5.91k
  template<typename T> bool hasAttr() const {
548
5.91k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())438
;
549
5.91k
  }
bool clang::Decl::hasAttr<clang::WarnUnusedResultAttr>() const
Line
Count
Source
547
9.33k
  template<typename T> bool hasAttr() const {
548
9.33k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())615
;
549
9.33k
  }
bool clang::Decl::hasAttr<clang::AsmLabelAttr>() const
Line
Count
Source
547
3.65M
  template<typename T> bool hasAttr() const {
548
3.65M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.01M
;
549
3.65M
  }
bool clang::Decl::hasAttr<clang::NonNullAttr>() const
Line
Count
Source
547
5.79M
  template<typename T> bool hasAttr() const {
548
5.79M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())121k
;
549
5.79M
  }
bool clang::Decl::hasAttr<clang::EnableIfAttr>() const
Line
Count
Source
547
1.80M
  template<typename T> bool hasAttr() const {
548
1.80M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.53M
;
549
1.80M
  }
bool clang::Decl::hasAttr<clang::EmptyBasesAttr>() const
Line
Count
Source
547
3.24k
  template<typename T> bool hasAttr() const {
548
3.24k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())862
;
549
3.24k
  }
bool clang::Decl::hasAttr<clang::AlignMac68kAttr>() const
Line
Count
Source
547
311k
  template<typename T> bool hasAttr() const {
548
311k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())92.0k
;
549
311k
  }
bool clang::Decl::hasAttr<clang::NoUniqueAddressAttr>() const
Line
Count
Source
547
3.46M
  template<typename T> bool hasAttr() const {
548
3.46M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())9.07k
;
549
3.46M
  }
bool clang::Decl::hasAttr<clang::CUDAHostAttr>() const
Line
Count
Source
547
5.97k
  template<typename T> bool hasAttr() const {
548
5.97k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.19k
;
549
5.97k
  }
bool clang::Decl::hasAttr<clang::ObjCBoxableAttr>() const
Line
Count
Source
547
141
  template<typename T> bool hasAttr() const {
548
141
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())135
;
549
141
  }
bool clang::Decl::hasAttr<clang::MSInheritanceAttr>() const
Line
Count
Source
547
6.32k
  template<typename T> bool hasAttr() const {
548
6.32k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.86k
;
549
6.32k
  }
bool clang::Decl::hasAttr<clang::ObjCNSObjectAttr>() const
Line
Count
Source
547
747k
  template<typename T> bool hasAttr() const {
548
747k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())49.8k
;
549
747k
  }
bool clang::Decl::hasAttr<clang::ObjCIndependentClassAttr>() const
Line
Count
Source
547
2.84k
  template<typename T> bool hasAttr() const {
548
2.84k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1
;
549
2.84k
  }
bool clang::Decl::hasAttr<clang::CUDADeviceBuiltinSurfaceTypeAttr>() const
Line
Count
Source
547
1.46k
  template<typename T> bool hasAttr() const {
548
1.46k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())63
;
549
1.46k
  }
bool clang::Decl::hasAttr<clang::CUDADeviceBuiltinTextureTypeAttr>() const
Line
Count
Source
547
1.43k
  template<typename T> bool hasAttr() const {
548
1.43k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())37
;
549
1.43k
  }
bool clang::Decl::hasAttr<clang::ExcludeFromExplicitInstantiationAttr>() const
Line
Count
Source
547
82.1k
  template<typename T> bool hasAttr() const {
548
82.1k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())35.8k
;
549
82.1k
  }
bool clang::Decl::hasAttr<clang::NSConsumedAttr>() const
Line
Count
Source
547
316k
  template<typename T> bool hasAttr() const {
548
316k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())13.8k
;
549
316k
  }
bool clang::Decl::hasAttr<clang::OwnerAttr>() const
Line
Count
Source
547
279k
  template<typename T> bool hasAttr() const {
548
279k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())136k
;
549
279k
  }
bool clang::Decl::hasAttr<clang::PointerAttr>() const
Line
Count
Source
547
379k
  template<typename T> bool hasAttr() const {
548
379k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())161k
;
549
379k
  }
bool clang::Decl::hasAttr<clang::CFAuditedTransferAttr>() const
Line
Count
Source
547
644k
  template<typename T> bool hasAttr() const {
548
644k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())439k
;
549
644k
  }
bool clang::Decl::hasAttr<clang::CFUnknownTransferAttr>() const
Line
Count
Source
547
626k
  template<typename T> bool hasAttr() const {
548
626k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())425k
;
549
626k
  }
bool clang::Decl::hasAttr<clang::MinSizeAttr>() const
Line
Count
Source
547
546k
  template<typename T> bool hasAttr() const {
548
546k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())203k
;
549
546k
  }
bool clang::Decl::hasAttr<clang::AlwaysInlineAttr>() const
Line
Count
Source
547
8.71M
  template<typename T> bool hasAttr() const {
548
8.71M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())479k
;
549
8.71M
  }
bool clang::Decl::hasAttr<clang::OptimizeNoneAttr>() const
Line
Count
Source
547
944k
  template<typename T> bool hasAttr() const {
548
944k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())419k
;
549
944k
  }
bool clang::Decl::hasAttr<clang::NoInlineAttr>() const
Line
Count
Source
547
65.6k
  template<typename T> bool hasAttr() const {
548
65.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())28.6k
;
549
65.6k
  }
bool clang::Decl::hasAttr<clang::CUDAInvalidTargetAttr>() const
Line
Count
Source
547
56.4k
  template<typename T> bool hasAttr() const {
548
56.4k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())47.0k
;
549
56.4k
  }
bool clang::Decl::hasAttr<clang::ObjCPreciseLifetimeAttr>() const
Line
Count
Source
547
20.0M
  template<typename T> bool hasAttr() const {
548
20.0M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())693k
;
549
20.0M
  }
bool clang::Decl::hasAttr<clang::UnusedAttr>() const
Line
Count
Source
547
34.9M
  template<typename T> bool hasAttr() const {
548
34.9M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())14.2M
;
549
34.9M
  }
bool clang::Decl::hasAttr<clang::SectionAttr>() const
Line
Count
Source
547
14.4M
  template<typename T> bool hasAttr() const {
548
14.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())227k
;
549
14.4M
  }
bool clang::Decl::hasAttr<clang::CodeSegAttr>() const
Line
Count
Source
547
13.8M
  template<typename T> bool hasAttr() const {
548
13.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())57.2k
;
549
13.8M
  }
bool clang::Decl::hasAttr<clang::CarriesDependencyAttr>() const
Line
Count
Source
547
5
  template<typename T> bool hasAttr() const {
548
5
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2
;
549
5
  }
bool clang::Decl::hasAttr<clang::WeakImportAttr>() const
Line
Count
Source
547
56.8k
  template<typename T> bool hasAttr() const {
548
56.8k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.48k
;
549
56.8k
  }
bool clang::Decl::hasAttr<clang::CleanupAttr>() const
Line
Count
Source
547
3.10M
  template<typename T> bool hasAttr() const {
548
3.10M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.06M
;
549
3.10M
  }
bool clang::Decl::hasAttr<clang::SelectAnyAttr>() const
Line
Count
Source
547
353k
  template<typename T> bool hasAttr() const {
548
353k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())38.7k
;
549
353k
  }
bool clang::Decl::hasAttr<clang::ConstInitAttr>() const
Line
Count
Source
547
158k
  template<typename T> bool hasAttr() const {
548
158k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.10k
;
549
158k
  }
bool clang::Decl::hasAttr<clang::DLLExportStaticLocalAttr>() const
Line
Count
Source
547
9.69k
  template<typename T> bool hasAttr() const {
548
9.69k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.89k
;
549
9.69k
  }
bool clang::Decl::hasAttr<clang::DLLImportStaticLocalAttr>() const
Line
Count
Source
547
9.69k
  template<typename T> bool hasAttr() const {
548
9.69k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.88k
;
549
9.69k
  }
bool clang::Decl::hasAttr<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
547
2.73M
  template<typename T> bool hasAttr() const {
548
2.73M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.06M
;
549
2.73M
  }
bool clang::Decl::hasAttr<clang::NakedAttr>() const
Line
Count
Source
547
7.54M
  template<typename T> bool hasAttr() const {
548
7.54M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.95M
;
549
7.54M
  }
bool clang::Decl::hasAttr<clang::ReturnsNonNullAttr>() const
Line
Count
Source
547
611k
  template<typename T> bool hasAttr() const {
548
611k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())294k
;
549
611k
  }
bool clang::Decl::hasAttr<clang::AllocSizeAttr>() const
Line
Count
Source
547
7.04k
  template<typename T> bool hasAttr() const {
548
7.04k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.72k
;
549
7.04k
  }
bool clang::Decl::hasAttr<clang::AllocAlignAttr>() const
Line
Count
Source
547
3.29M
  template<typename T> bool hasAttr() const {
548
3.29M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.61M
;
549
3.29M
  }
bool clang::Decl::hasAttr<clang::FormatAttr>() const
Line
Count
Source
547
5.20k
  template<typename T> bool hasAttr() const {
548
5.20k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.20k
;
549
5.20k
  }
bool clang::Decl::hasAttr<clang::CallbackAttr>() const
Line
Count
Source
547
8.34M
  template<typename T> bool hasAttr() const {
548
8.34M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8.34M
;
549
8.34M
  }
bool clang::Decl::hasAttr<clang::ReturnsTwiceAttr>() const
Line
Count
Source
547
609k
  template<typename T> bool hasAttr() const {
548
609k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())291k
;
549
609k
  }
bool clang::Decl::hasAttr<clang::NoThrowAttr>() const
Line
Count
Source
547
9.24M
  template<typename T> bool hasAttr() const {
548
9.24M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8.69M
;
549
9.24M
  }
bool clang::Decl::hasAttr<clang::FormatArgAttr>() const
Line
Count
Source
547
296
  template<typename T> bool hasAttr() const {
548
296
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())295
;
549
296
  }
bool clang::Decl::hasAttr<clang::SYCLKernelAttr>() const
Line
Count
Source
547
116
  template<typename T> bool hasAttr() const {
548
116
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())18
;
549
116
  }
bool clang::Decl::hasAttr<clang::NoBuiltinAttr>() const
Line
Count
Source
547
31
  template<typename T> bool hasAttr() const {
548
31
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8
;
549
31
  }
bool clang::Decl::hasAttr<clang::CapabilityAttr>() const
Line
Count
Source
547
3.15k
  template<typename T> bool hasAttr() const {
548
3.15k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.97k
;
549
3.15k
  }
bool clang::Decl::hasAttr<clang::ConsumableAttr>() const
Line
Count
Source
547
299
  template<typename T> bool hasAttr() const {
548
299
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())291
;
549
299
  }
bool clang::Decl::hasAttr<clang::SwiftBridgeAttr>() const
Line
Count
Source
547
5
  template<typename T> bool hasAttr() const {
548
5
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())0
;
549
5
  }
bool clang::Decl::hasAttr<clang::BPFPreserveAccessIndexAttr>() const
Line
Count
Source
547
2.01M
  template<typename T> bool hasAttr() const {
548
2.01M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())703k
;
549
2.01M
  }
bool clang::Decl::hasAttr<clang::WeakAttr>() const
Line
Count
Source
547
1.06M
  template<typename T> bool hasAttr() const {
548
1.06M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())262k
;
549
1.06M
  }
bool clang::Decl::hasAttr<clang::OverrideAttr>() const
Line
Count
Source
547
4.43M
  template<typename T> bool hasAttr() const {
548
4.43M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.78M
;
549
4.43M
  }
bool clang::Decl::hasAttr<clang::TrivialABIAttr>() const
Line
Count
Source
547
2.96M
  template<typename T> bool hasAttr() const {
548
2.96M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())458k
;
549
2.96M
  }
bool clang::Decl::hasAttr<clang::NoEscapeAttr>() const
Line
Count
Source
547
34.8M
  template<typename T> bool hasAttr() const {
548
34.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())71.6k
;
549
34.8M
  }
bool clang::Decl::hasAttr<clang::ObjCExplicitProtocolImplAttr>() const
Line
Count
Source
547
1.34k
  template<typename T> bool hasAttr() const {
548
1.34k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())38
;
549
1.34k
  }
bool clang::Decl::hasAttr<clang::ObjCDirectMembersAttr>() const
Line
Count
Source
547
1.23M
  template<typename T> bool hasAttr() const {
548
1.23M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())442k
;
549
1.23M
  }
bool clang::Decl::hasAttr<clang::NSReturnsRetainedAttr>() const
Line
Count
Source
547
390k
  template<typename T> bool hasAttr() const {
548
390k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())149k
;
549
390k
  }
bool clang::Decl::hasAttr<clang::NSReturnsNotRetainedAttr>() const
Line
Count
Source
547
847k
  template<typename T> bool hasAttr() const {
548
847k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())259k
;
549
847k
  }
bool clang::Decl::hasAttr<clang::NSReturnsAutoreleasedAttr>() const
Line
Count
Source
547
1.17k
  template<typename T> bool hasAttr() const {
548
1.17k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())79
;
549
1.17k
  }
bool clang::Decl::hasAttr<clang::ObjCRequiresSuperAttr>() const
Line
Count
Source
547
6.08k
  template<typename T> bool hasAttr() const {
548
6.08k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())839
;
549
6.08k
  }
bool clang::Decl::hasAttr<clang::ObjCRuntimeVisibleAttr>() const
Line
Count
Source
547
8.21k
  template<typename T> bool hasAttr() const {
548
8.21k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())783
;
549
8.21k
  }
bool clang::Decl::hasAttr<clang::ObjCRootClassAttr>() const
Line
Count
Source
547
4.77k
  template<typename T> bool hasAttr() const {
548
4.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())176
;
549
4.77k
  }
bool clang::Decl::hasAttr<clang::ObjCSubclassingRestrictedAttr>() const
Line
Count
Source
547
166k
  template<typename T> bool hasAttr() const {
548
166k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())98.9k
;
549
166k
  }
bool clang::Decl::hasAttr<clang::ObjCClassStubAttr>() const
Line
Count
Source
547
105k
  template<typename T> bool hasAttr() const {
548
105k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())42.1k
;
549
105k
  }
bool clang::Decl::hasAttr<clang::ObjCExternallyRetainedAttr>() const
Line
Count
Source
547
39
  template<typename T> bool hasAttr() const {
548
39
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6
;
549
39
  }
bool clang::Decl::hasAttr<clang::AnyX86InterruptAttr>() const
Line
Count
Source
547
3.51M
  template<typename T> bool hasAttr() const {
548
3.51M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.82M
;
549
3.51M
  }
bool clang::Decl::hasAttr<clang::ARMInterruptAttr>() const
Line
Count
Source
547
3.00M
  template<typename T> bool hasAttr() const {
548
3.00M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.57M
;
549
3.00M
  }
bool clang::Decl::hasAttr<clang::CFReturnsNotRetainedAttr>() const
Line
Count
Source
547
4.72k
  template<typename T> bool hasAttr() const {
548
4.72k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())190
;
549
4.72k
  }
bool clang::Decl::hasAttr<clang::CFReturnsRetainedAttr>() const
Line
Count
Source
547
4.74k
  template<typename T> bool hasAttr() const {
548
4.74k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())262
;
549
4.74k
  }
bool clang::Decl::hasAttr<clang::LifetimeBoundAttr>() const
Line
Count
Source
547
3.37M
  template<typename T> bool hasAttr() const {
548
3.37M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())185
;
549
3.37M
  }
bool clang::Decl::hasAttr<clang::IBOutletAttr>() const
Line
Count
Source
547
731
  template<typename T> bool hasAttr() const {
548
731
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32
;
549
731
  }
bool clang::Decl::hasAttr<clang::ObjCReturnsInnerPointerAttr>() const
Line
Count
Source
547
461k
  template<typename T> bool hasAttr() const {
548
461k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())113k
;
549
461k
  }
bool clang::Decl::hasAttr<clang::IBOutletCollectionAttr>() const
Line
Count
Source
547
7.75k
  template<typename T> bool hasAttr() const {
548
7.75k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())886
;
549
7.75k
  }
bool clang::Decl::hasAttr<clang::OMPAllocateDeclAttr>() const
Line
Count
Source
547
203k
  template<typename T> bool hasAttr() const {
548
203k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())31.7k
;
549
203k
  }
bool clang::Decl::hasAttr<clang::OMPCaptureNoInitAttr>() const
Line
Count
Source
547
6.28k
  template<typename T> bool hasAttr() const {
548
6.28k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())284
;
549
6.28k
  }
bool clang::Decl::hasAttr<clang::OMPDeclareVariantAttr>() const
Line
Count
Source
547
133k
  template<typename T> bool hasAttr() const {
548
133k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8.78k
;
549
133k
  }
bool clang::Decl::hasAttr<clang::PassObjectSizeAttr>() const
Line
Count
Source
547
37.3M
  template<typename T> bool hasAttr() const {
548
37.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())61.3k
;
549
37.3M
  }
bool clang::Decl::hasAttr<clang::CFConsumedAttr>() const
Line
Count
Source
547
2.07k
  template<typename T> bool hasAttr() const {
548
2.07k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())106
;
549
2.07k
  }
bool clang::Decl::hasAttr<clang::CmseNSEntryAttr>() const
Line
Count
Source
547
3.28M
  template<typename T> bool hasAttr() const {
548
3.28M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.65M
;
549
3.28M
  }
bool clang::Decl::hasAttr<clang::OpenCLAccessAttr>() const
Line
Count
Source
547
8.46k
  template<typename T> bool hasAttr() const {
548
8.46k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())9
;
549
8.46k
  }
bool clang::Decl::hasAttr<clang::ConsumableSetOnReadAttr>() const
Line
Count
Source
547
19
  template<typename T> bool hasAttr() const {
548
19
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
19
  }
bool clang::Decl::hasAttr<clang::TestTypestateAttr>() const
Line
Count
Source
547
231
  template<typename T> bool hasAttr() const {
548
231
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())218
;
549
231
  }
bool clang::Decl::hasAttr<clang::ConsumableAutoCastAttr>() const
Line
Count
Source
547
4
  template<typename T> bool hasAttr() const {
548
4
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
4
  }
bool clang::Decl::hasAttr<clang::NoThreadSafetyAnalysisAttr>() const
Line
Count
Source
547
7.99k
  template<typename T> bool hasAttr() const {
548
7.99k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.74k
;
549
7.99k
  }
bool clang::Decl::hasAttr<clang::ScopedLockableAttr>() const
Line
Count
Source
547
441
  template<typename T> bool hasAttr() const {
548
441
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())394
;
549
441
  }
bool clang::Decl::hasAttr<clang::PtGuardedVarAttr>() const
Line
Count
Source
547
442
  template<typename T> bool hasAttr() const {
548
442
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
442
  }
bool clang::Decl::hasAttr<clang::GuardedVarAttr>() const
Line
Count
Source
547
2.48k
  template<typename T> bool hasAttr() const {
548
2.48k
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
2.48k
  }
bool clang::Decl::hasAttr<clang::AnalyzerNoReturnAttr>() const
Line
Count
Source
547
104k
  template<typename T> bool hasAttr() const {
548
104k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.60k
;
549
104k
  }
bool clang::Decl::hasAttr<clang::StdCallAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.73k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::FastCallAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::RegCallAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::ThisCallAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::VectorCallAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::PascalAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::AArch64VectorPcsAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::IntelOclBiccAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::MSABIAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::SysVABIAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::PreserveMostAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::PreserveAllAttr>() const
Line
Count
Source
547
16.6k
  template<typename T> bool hasAttr() const {
548
16.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.72k
;
549
16.6k
  }
bool clang::Decl::hasAttr<clang::DisableTailCallsAttr>() const
Line
Count
Source
547
301k
  template<typename T> bool hasAttr() const {
548
301k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())112k
;
549
301k
  }
bool clang::Decl::hasAttr<clang::ConvergentAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::NoAliasAttr>() const
Line
Count
Source
547
604k
  template<typename T> bool hasAttr() const {
548
604k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())287k
;
549
604k
  }
bool clang::Decl::hasAttr<clang::RestrictAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::AnyX86NoCfCheckAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::NoSpeculativeLoadHardeningAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::SpeculativeLoadHardeningAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::NoSplitStackAttr>() const
Line
Count
Source
547
605k
  template<typename T> bool hasAttr() const {
548
605k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())288k
;
549
605k
  }
bool clang::Decl::hasAttr<clang::FlattenAttr>() const
Line
Count
Source
547
318k
  template<typename T> bool hasAttr() const {
548
318k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())97.5k
;
549
318k
  }
bool clang::Decl::hasAttr<clang::NotTailCalledAttr>() const
Line
Count
Source
547
276k
  template<typename T> bool hasAttr() const {
548
276k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())158k
;
549
276k
  }
bool clang::Decl::hasAttr<clang::MSAllocatorAttr>() const
Line
Count
Source
547
188k
  template<typename T> bool hasAttr() const {
548
188k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())123k
;
549
188k
  }
bool clang::Decl::hasAttr<clang::NoDebugAttr>() const
Line
Count
Source
547
1.11M
  template<typename T> bool hasAttr() const {
548
1.11M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())420k
;
549
1.11M
  }
bool clang::Decl::hasAttr<clang::ArtificialAttr>() const
Line
Count
Source
547
87.0k
  template<typename T> bool hasAttr() const {
548
87.0k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())61.9k
;
549
87.0k
  }
bool clang::Decl::hasAttr<clang::ObjCNonLazyClassAttr>() const
Line
Count
Source
547
2.22k
  template<typename T> bool hasAttr() const {
548
2.22k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())76
;
549
2.22k
  }
bool clang::Decl::hasAttr<clang::LTOVisibilityPublicAttr>() const
Line
Count
Source
547
424
  template<typename T> bool hasAttr() const {
548
424
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())91
;
549
424
  }
bool clang::Decl::hasAttr<clang::UuidAttr>() const
Line
Count
Source
547
404
  template<typename T> bool hasAttr() const {
548
404
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())71
;
549
404
  }
bool clang::Decl::hasAttr<clang::NoInstrumentFunctionAttr>() const
Line
Count
Source
547
147
  template<typename T> bool hasAttr() const {
548
147
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())29
;
549
147
  }
bool clang::Decl::hasAttr<clang::CFICanonicalJumpTableAttr>() const
Line
Count
Source
547
279k
  template<typename T> bool hasAttr() const {
548
279k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())102k
;
549
279k
  }
bool clang::Decl::hasAttr<clang::NoCommonAttr>() const
Line
Count
Source
547
41
  template<typename T> bool hasAttr() const {
548
41
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2
;
549
41
  }
bool clang::Decl::hasAttr<clang::CommonAttr>() const
Line
Count
Source
547
6.56k
  template<typename T> bool hasAttr() const {
548
6.56k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())210
;
549
6.56k
  }
bool clang::Decl::hasAttr<clang::PragmaClangBSSSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::PragmaClangDataSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::PragmaClangRelroSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::PragmaClangRodataSectionAttr>() const
Line
Count
Source
547
18
  template<typename T> bool hasAttr() const {
548
18
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3
;
549
18
  }
bool clang::Decl::hasAttr<clang::NoStackProtectorAttr>() const
Line
Count
Source
547
273k
  template<typename T> bool hasAttr() const {
548
273k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())101k
;
549
273k
  }
bool clang::Decl::hasAttr<clang::NoDuplicateAttr>() const
Line
Count
Source
547
671k
  template<typename T> bool hasAttr() const {
548
671k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())317k
;
549
671k
  }
bool clang::Decl::hasAttr<clang::ColdAttr>() const
Line
Count
Source
547
878k
  template<typename T> bool hasAttr() const {
548
878k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())390k
;
549
878k
  }
bool clang::Decl::hasAttr<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
547
34.7k
  template<typename T> bool hasAttr() const {
548
34.7k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.26k
;
549
34.7k
  }
bool clang::Decl::hasAttr<clang::AnnotateAttr>() const
Line
Count
Source
547
1.07M
  template<typename T> bool hasAttr() const {
548
1.07M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())107k
;
549
1.07M
  }
bool clang::Decl::hasAttr<clang::MayAliasAttr>() const
Line
Count
Source
547
520k
  template<typename T> bool hasAttr() const {
548
520k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())46.8k
;
549
520k
  }
bool clang::Decl::hasAttr<clang::MSNoVTableAttr>() const
Line
Count
Source
547
853
  template<typename T> bool hasAttr() const {
548
853
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())178
;
549
853
  }
bool clang::Decl::hasAttr<clang::MipsLongCallAttr>() const
Line
Count
Source
547
853
  template<typename T> bool hasAttr() const {
548
853
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())139
;
549
853
  }
bool clang::Decl::hasAttr<clang::MipsShortCallAttr>() const
Line
Count
Source
547
847
  template<typename T> bool hasAttr() const {
548
847
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())133
;
549
847
  }
bool clang::Decl::hasAttr<clang::Mips16Attr>() const
Line
Count
Source
547
401
  template<typename T> bool hasAttr() const {
548
401
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())62
;
549
401
  }
bool clang::Decl::hasAttr<clang::NoMips16Attr>() const
Line
Count
Source
547
400
  template<typename T> bool hasAttr() const {
548
400
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())61
;
549
400
  }
bool clang::Decl::hasAttr<clang::MicroMipsAttr>() const
Line
Count
Source
547
401
  template<typename T> bool hasAttr() const {
548
401
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())62
;
549
401
  }
bool clang::Decl::hasAttr<clang::NoMicroMipsAttr>() const
Line
Count
Source
547
400
  template<typename T> bool hasAttr() const {
548
400
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())61
;
549
400
  }
bool clang::Decl::hasAttr<clang::X86ForceAlignArgPointerAttr>() const
Line
Count
Source
547
171k
  template<typename T> bool hasAttr() const {
548
171k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())80.5k
;
549
171k
  }
bool clang::Decl::hasAttr<clang::ObjCExceptionAttr>() const
Line
Count
Source
547
2.01k
  template<typename T> bool hasAttr() const {
548
2.01k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())637
;
549
2.01k
  }
bool clang::Decl::hasAttr<clang::AcquireHandleAttr>() const
Line
Count
Source
547
187
  template<typename T> bool hasAttr() const {
548
187
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())83
;
549
187
  }
bool clang::Decl::hasAttr<clang::ReleaseHandleAttr>() const
Line
Count
Source
547
236
  template<typename T> bool hasAttr() const {
548
236
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())227
;
549
236
  }
bool clang::Decl::hasAttr<clang::UseHandleAttr>() const
Line
Count
Source
547
114
  template<typename T> bool hasAttr() const {
548
114
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())104
;
549
114
  }
bool clang::Decl::hasAttr<clang::OwnershipAttr>() const
Line
Count
Source
547
8
  template<typename T> bool hasAttr() const {
548
8
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
549
8
  }
bool clang::Decl::hasAttr<clang::MIGServerRoutineAttr>() const
Line
Count
Source
547
135
  template<typename T> bool hasAttr() const {
548
135
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())52
;
549
135
  }
bool clang::Decl::hasAttr<clang::ReinitializesAttr>() const
Line
Count
Source
547
8.08k
  template<typename T> bool hasAttr() const {
548
8.08k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8
;
549
8.08k
  }
bool clang::Decl::hasAttr<clang::OSReturnsRetainedAttr>() const
Line
Count
Source
547
436
  template<typename T> bool hasAttr() const {
548
436
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())28
;
549
436
  }
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedReturnsRetainedAttr>() const
Line
Count
Source
547
4.34k
  template<typename T> bool hasAttr() const {
548
4.34k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())126
;
549
4.34k
  }
bool clang::Decl::hasAttr<clang::OSReturnsNotRetainedAttr>() const
Line
Count
Source
547
470
  template<typename T> bool hasAttr() const {
548
470
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())14
;
549
470
  }
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedReturnsNotRetainedAttr>() const
Line
Count
Source
547
4.31k
  template<typename T> bool hasAttr() const {
548
4.31k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())98
;
549
4.31k
  }
bool clang::Decl::hasAttr<clang::OSConsumedAttr>() const
Line
Count
Source
547
216
  template<typename T> bool hasAttr() const {
548
216
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())25
;
549
216
  }
RetainSummaryManager.cpp:bool clang::Decl::hasAttr<(anonymous namespace)::GeneralizedConsumedAttr>() const
Line
Count
Source
547
1.99k
  template<typename T> bool hasAttr() const {
548
1.99k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())50
;
549
1.99k
  }
bool clang::Decl::hasAttr<clang::OSReturnsRetainedOnZeroAttr>() const
Line
Count
Source
547
158
  template<typename T> bool hasAttr() const {
548
158
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())17
;
549
158
  }
bool clang::Decl::hasAttr<clang::OSReturnsRetainedOnNonZeroAttr>() const
Line
Count
Source
547
159
  template<typename T> bool hasAttr() const {
548
159
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())18
;
549
159
  }
bool clang::Decl::hasAttr<clang::OSConsumesThisAttr>() const
Line
Count
Source
547
250
  template<typename T> bool hasAttr() const {
548
250
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10
;
549
250
  }
bool clang::Decl::hasAttr<clang::IBActionAttr>() const
Line
Count
Source
547
393
  template<typename T> bool hasAttr() const {
548
393
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())26
;
549
393
  }
550
551
  /// getMaxAlignment - return the maximum alignment specified by attributes
552
  /// on this decl, 0 if there are none.
553
  unsigned getMaxAlignment() const;
554
555
  /// setInvalidDecl - Indicates the Decl had a semantic error. This
556
  /// allows for graceful error recovery.
557
  void setInvalidDecl(bool Invalid = true);
558
556M
  bool isInvalidDecl() const { return (bool) InvalidDecl; }
559
560
  /// isImplicit - Indicates whether the declaration was implicitly
561
  /// generated by the implementation. If false, this declaration
562
  /// was written explicitly in the source code.
563
42.2M
  bool isImplicit() const { return Implicit; }
564
19.6M
  void setImplicit(bool I = true) { Implicit = I; }
565
566
  /// Whether *any* (re-)declaration of the entity was used, meaning that
567
  /// a definition is required.
568
  ///
569
  /// \param CheckUsedAttr When true, also consider the "used" attribute
570
  /// (in addition to the "used" bit set by \c setUsed()) when determining
571
  /// whether the function is used.
572
  bool isUsed(bool CheckUsedAttr = true) const;
573
574
  /// Set whether the declaration is used, in the sense of odr-use.
575
  ///
576
  /// This should only be used immediately after creating a declaration.
577
  /// It intentionally doesn't notify any listeners.
578
7.79M
  void setIsUsed() { getCanonicalDecl()->Used = true; }
579
580
  /// Mark the declaration used, in the sense of odr-use.
581
  ///
582
  /// This notifies any mutation listeners in addition to setting a bit
583
  /// indicating the declaration is used.
584
  void markUsed(ASTContext &C);
585
586
  /// Whether any declaration of this entity was referenced.
587
  bool isReferenced() const;
588
589
  /// Whether this declaration was referenced. This should not be relied
590
  /// upon for anything other than debugging.
591
17.6k
  bool isThisDeclarationReferenced() const { return Referenced; }
592
593
81.8M
  void setReferenced(bool R = true) { Referenced = R; }
594
595
  /// Whether this declaration is a top-level declaration (function,
596
  /// global variable, etc.) that is lexically inside an objc container
597
  /// definition.
598
4.46M
  bool isTopLevelDeclInObjCContainer() const {
599
4.46M
    return TopLevelDeclInObjCContainer;
600
4.46M
  }
601
602
4.63M
  void setTopLevelDeclInObjCContainer(bool V = true) {
603
4.63M
    TopLevelDeclInObjCContainer = V;
604
4.63M
  }
605
606
  /// Looks on this and related declarations for an applicable
607
  /// external source symbol attribute.
608
  ExternalSourceSymbolAttr *getExternalSourceSymbolAttr() const;
609
610
  /// Whether this declaration was marked as being private to the
611
  /// module in which it was defined.
612
5.26M
  bool isModulePrivate() const {
613
5.26M
    return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate;
614
5.26M
  }
615
616
  /// Return true if this declaration has an attribute which acts as
617
  /// definition of the entity, such as 'alias' or 'ifunc'.
618
  bool hasDefiningAttr() const;
619
620
  /// Return this declaration's defining attribute if it has one.
621
  const Attr *getDefiningAttr() const;
622
623
protected:
624
  /// Specify that this declaration was marked as being private
625
  /// to the module in which it was defined.
626
44
  void setModulePrivate() {
627
    // The module-private specifier has no effect on unowned declarations.
628
    // FIXME: We should track this in some way for source fidelity.
629
44
    if (getModuleOwnershipKind() == ModuleOwnershipKind::Unowned)
630
24
      return;
631
20
    setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate);
632
20
  }
633
634
public:
635
  /// Set the FromASTFile flag. This indicates that this declaration
636
  /// was deserialized and not parsed from source code and enables
637
  /// features such as module ownership information.
638
64.1k
  void setFromASTFile() {
639
64.1k
    FromASTFile = true;
640
64.1k
  }
641
642
  /// Set the owning module ID.  This may only be called for
643
  /// deserialized Decls.
644
4.20M
  void setOwningModuleID(unsigned ID) {
645
4.20M
    assert(isFromASTFile() && "Only works on a deserialized declaration");
646
4.20M
    *((unsigned*)this - 2) = ID;
647
4.20M
  }
648
649
public:
650
  /// Determine the availability of the given declaration.
651
  ///
652
  /// This routine will determine the most restrictive availability of
653
  /// the given declaration (e.g., preferring 'unavailable' to
654
  /// 'deprecated').
655
  ///
656
  /// \param Message If non-NULL and the result is not \c
657
  /// AR_Available, will be set to a (possibly empty) message
658
  /// describing why the declaration has not been introduced, is
659
  /// deprecated, or is unavailable.
660
  ///
661
  /// \param EnclosingVersion The version to compare with. If empty, assume the
662
  /// deployment target version.
663
  ///
664
  /// \param RealizedPlatform If non-NULL and the availability result is found
665
  /// in an available attribute it will set to the platform which is written in
666
  /// the available attribute.
667
  AvailabilityResult
668
  getAvailability(std::string *Message = nullptr,
669
                  VersionTuple EnclosingVersion = VersionTuple(),
670
                  StringRef *RealizedPlatform = nullptr) const;
671
672
  /// Retrieve the version of the target platform in which this
673
  /// declaration was introduced.
674
  ///
675
  /// \returns An empty version tuple if this declaration has no 'introduced'
676
  /// availability attributes, or the version tuple that's specified in the
677
  /// attribute otherwise.
678
  VersionTuple getVersionIntroduced() const;
679
680
  /// Determine whether this declaration is marked 'deprecated'.
681
  ///
682
  /// \param Message If non-NULL and the declaration is deprecated,
683
  /// this will be set to the message describing why the declaration
684
  /// was deprecated (which may be empty).
685
1.83M
  bool isDeprecated(std::string *Message = nullptr) const {
686
1.83M
    return getAvailability(Message) == AR_Deprecated;
687
1.83M
  }
688
689
  /// Determine whether this declaration is marked 'unavailable'.
690
  ///
691
  /// \param Message If non-NULL and the declaration is unavailable,
692
  /// this will be set to the message describing why the declaration
693
  /// was made unavailable (which may be empty).
694
1.50M
  bool isUnavailable(std::string *Message = nullptr) const {
695
1.50M
    return getAvailability(Message) == AR_Unavailable;
696
1.50M
  }
697
698
  /// Determine whether this is a weak-imported symbol.
699
  ///
700
  /// Weak-imported symbols are typically marked with the
701
  /// 'weak_import' attribute, but may also be marked with an
702
  /// 'availability' attribute where we're targing a platform prior to
703
  /// the introduction of this feature.
704
  bool isWeakImported() const;
705
706
  /// Determines whether this symbol can be weak-imported,
707
  /// e.g., whether it would be well-formed to add the weak_import
708
  /// attribute.
709
  ///
710
  /// \param IsDefinition Set to \c true to indicate that this
711
  /// declaration cannot be weak-imported because it has a definition.
712
  bool canBeWeakImported(bool &IsDefinition) const;
713
714
  /// Determine whether this declaration came from an AST file (such as
715
  /// a precompiled header or module) rather than having been parsed.
716
261M
  bool isFromASTFile() const { return FromASTFile; }
717
718
  /// Retrieve the global declaration ID associated with this
719
  /// declaration, which specifies where this Decl was loaded from.
720
1.00M
  unsigned getGlobalID() const {
721
1.00M
    if (isFromASTFile())
722
1.00M
      return *((const unsigned*)this - 1);
723
0
    return 0;
724
0
  }
725
726
  /// Retrieve the global ID of the module that owns this particular
727
  /// declaration.
728
1.12M
  unsigned getOwningModuleID() const {
729
1.12M
    if (isFromASTFile())
730
1.07M
      return *((const unsigned*)this - 2);
731
48.3k
    return 0;
732
48.3k
  }
733
734
private:
735
  Module *getOwningModuleSlow() const;
736
737
protected:
738
  bool hasLocalOwningModuleStorage() const;
739
740
public:
741
  /// Get the imported owning module, if this decl is from an imported
742
  /// (non-local) module.
743
1.33M
  Module *getImportedOwningModule() const {
744
1.33M
    if (!isFromASTFile() || 
!hasOwningModule()1.27M
)
745
367k
      return nullptr;
746
970k
747
970k
    return getOwningModuleSlow();
748
970k
  }
749
750
  /// Get the local owning module, if known. Returns nullptr if owner is
751
  /// not yet known or declaration is not from a module.
752
51.2M
  Module *getLocalOwningModule() const {
753
51.2M
    if (
isFromASTFile()51.2M
|| !hasOwningModule())
754
43.6M
      return nullptr;
755
7.58M
756
7.58M
    assert(hasLocalOwningModuleStorage() &&
757
7.58M
           "owned local decl but no local module storage");
758
7.58M
    return reinterpret_cast<Module *const *>(this)[-1];
759
7.58M
  }
760
219k
  void setLocalOwningModule(Module *M) {
761
219k
    assert(!isFromASTFile() && hasOwningModule() &&
762
219k
           hasLocalOwningModuleStorage() &&
763
219k
           "should not have a cached owning module");
764
219k
    reinterpret_cast<Module **>(this)[-1] = M;
765
219k
  }
766
767
  /// Is this declaration owned by some module?
768
53.1M
  bool hasOwningModule() const {
769
53.1M
    return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned;
770
53.1M
  }
771
772
  /// Get the module that owns this declaration (for visibility purposes).
773
51.5M
  Module *getOwningModule() const {
774
51.2M
    return isFromASTFile() ? 
getImportedOwningModule()326k
: getLocalOwningModule();
775
51.5M
  }
776
777
  /// Get the module that owns this declaration for linkage purposes.
778
  /// There only ever is such a module under the C++ Modules TS.
779
  ///
780
  /// \param IgnoreLinkage Ignore the linkage of the entity; assume that
781
  /// all declarations in a global module fragment are unowned.
782
  Module *getOwningModuleForLinkage(bool IgnoreLinkage = false) const;
783
784
  /// Determine whether this declaration is definitely visible to name lookup,
785
  /// independent of whether the owning module is visible.
786
  /// Note: The declaration may be visible even if this returns \c false if the
787
  /// owning module is visible within the query context. This is a low-level
788
  /// helper function; most code should be calling Sema::isVisible() instead.
789
196M
  bool isUnconditionallyVisible() const {
790
196M
    return (int)getModuleOwnershipKind() <= (int)ModuleOwnershipKind::Visible;
791
196M
  }
792
793
  /// Set that this declaration is globally visible, even if it came from a
794
  /// module that is not visible.
795
4.70M
  void setVisibleDespiteOwningModule() {
796
4.70M
    if (!isUnconditionallyVisible())
797
3.80M
      setModuleOwnershipKind(ModuleOwnershipKind::Visible);
798
4.70M
  }
799
800
  /// Get the kind of module ownership for this declaration.
801
354M
  ModuleOwnershipKind getModuleOwnershipKind() const {
802
354M
    return NextInContextAndBits.getInt();
803
354M
  }
804
805
  /// Set whether this declaration is hidden from name lookup.
806
8.53M
  void setModuleOwnershipKind(ModuleOwnershipKind MOK) {
807
8.53M
    assert(!(getModuleOwnershipKind() == ModuleOwnershipKind::Unowned &&
808
8.53M
             MOK != ModuleOwnershipKind::Unowned && !isFromASTFile() &&
809
8.53M
             !hasLocalOwningModuleStorage()) &&
810
8.53M
           "no storage available for owning module for this declaration");
811
8.53M
    NextInContextAndBits.setInt(MOK);
812
8.53M
  }
813
814
213M
  unsigned getIdentifierNamespace() const {
815
213M
    return IdentifierNamespace;
816
213M
  }
817
818
158M
  bool isInIdentifierNamespace(unsigned NS) const {
819
158M
    return getIdentifierNamespace() & NS;
820
158M
  }
821
822
  static unsigned getIdentifierNamespaceForKind(Kind DK);
823
824
4.54M
  bool hasTagIdentifierNamespace() const {
825
4.54M
    return isTagIdentifierNamespace(getIdentifierNamespace());
826
4.54M
  }
827
828
4.54M
  static bool isTagIdentifierNamespace(unsigned NS) {
829
    // TagDecls have Tag and Type set and may also have TagFriend.
830
4.54M
    return (NS & ~IDNS_TagFriend) == (IDNS_Tag | IDNS_Type);
831
4.54M
  }
832
833
  /// getLexicalDeclContext - The declaration context where this Decl was
834
  /// lexically declared (LexicalDC). May be different from
835
  /// getDeclContext() (SemanticDC).
836
  /// e.g.:
837
  ///
838
  ///   namespace A {
839
  ///      void f(); // SemanticDC == LexicalDC == 'namespace A'
840
  ///   }
841
  ///   void A::f(); // SemanticDC == namespace 'A'
842
  ///                // LexicalDC == global namespace
843
330M
  DeclContext *getLexicalDeclContext() {
844
330M
    if (isInSemaDC())
845
315M
      return getSemanticDC();
846
15.1M
    return getMultipleDC()->LexicalDC;
847
15.1M
  }
848
159M
  const DeclContext *getLexicalDeclContext() const {
849
159M
    return const_cast<Decl*>(this)->getLexicalDeclContext();
850
159M
  }
851
852
  /// Determine whether this declaration is declared out of line (outside its
853
  /// semantic context).
854
  virtual bool isOutOfLine() const;
855
856
  /// setDeclContext - Set both the semantic and lexical DeclContext
857
  /// to DC.
858
  void setDeclContext(DeclContext *DC);
859
860
  void setLexicalDeclContext(DeclContext *DC);
861
862
  /// Determine whether this declaration is a templated entity (whether it is
863
  // within the scope of a template parameter).
864
  bool isTemplated() const;
865
866
  /// Determine the number of levels of template parameter surrounding this
867
  /// declaration.
868
  unsigned getTemplateDepth() const;
869
870
  /// isDefinedOutsideFunctionOrMethod - This predicate returns true if this
871
  /// scoped decl is defined outside the current function or method.  This is
872
  /// roughly global variables and functions, but also handles enums (which
873
  /// could be defined inside or outside a function etc).
874
1.62M
  bool isDefinedOutsideFunctionOrMethod() const {
875
1.62M
    return getParentFunctionOrMethod() == nullptr;
876
1.62M
  }
877
878
  /// Determine whether a substitution into this declaration would occur as
879
  /// part of a substitution into a dependent local scope. Such a substitution
880
  /// transitively substitutes into all constructs nested within this
881
  /// declaration.
882
  ///
883
  /// This recognizes non-defining declarations as well as members of local
884
  /// classes and lambdas:
885
  /// \code
886
  ///     template<typename T> void foo() { void bar(); }
887
  ///     template<typename T> void foo2() { class ABC { void bar(); }; }
888
  ///     template<typename T> inline int x = [](){ return 0; }();
889
  /// \endcode
890
  bool isInLocalScopeForInstantiation() const;
891
892
  /// If this decl is defined inside a function/method/block it returns
893
  /// the corresponding DeclContext, otherwise it returns null.
894
  const DeclContext *getParentFunctionOrMethod() const;
895
29.0k
  DeclContext *getParentFunctionOrMethod() {
896
29.0k
    return const_cast<DeclContext*>(
897
29.0k
                    const_cast<const Decl*>(this)->getParentFunctionOrMethod());
898
29.0k
  }
899
900
  /// Retrieves the "canonical" declaration of the given declaration.
901
5.04M
  virtual Decl *getCanonicalDecl() { return this; }
902
227M
  const Decl *getCanonicalDecl() const {
903
227M
    return const_cast<Decl*>(this)->getCanonicalDecl();
904
227M
  }
905
906
  /// Whether this particular Decl is a canonical one.
907
3.83M
  bool isCanonicalDecl() const { return getCanonicalDecl() == this; }
908
909
protected:
910
  /// Returns the next redeclaration or itself if this is the only decl.
911
  ///
912
  /// Decl subclasses that can be redeclared should override this method so that
913
  /// Decl::redecl_iterator can iterate over them.
914
4.70M
  virtual Decl *getNextRedeclarationImpl() { return this; }
915
916
  /// Implementation of getPreviousDecl(), to be overridden by any
917
  /// subclass that has a redeclaration chain.
918
1.46k
  virtual Decl *getPreviousDeclImpl() { return nullptr; }
919
920
  /// Implementation of getMostRecentDecl(), to be overridden by any
921
  /// subclass that has a redeclaration chain.
922
15.0M
  virtual Decl *getMostRecentDeclImpl() { return this; }
923
924
public:
925
  /// Iterates through all the redeclarations of the same decl.
926
  class redecl_iterator {
927
    /// Current - The current declaration.
928
    Decl *Current = nullptr;
929
    Decl *Starter;
930
931
  public:
932
    using value_type = Decl *;
933
    using reference = const value_type &;
934
    using pointer = const value_type *;
935
    using iterator_category = std::forward_iterator_tag;
936
    using difference_type = std::ptrdiff_t;
937
938
29.4M
    redecl_iterator() = default;
939
29.4M
    explicit redecl_iterator(Decl *C) : Current(C), Starter(C) {}
940
941
31.7M
    reference operator*() const { return Current; }
942
0
    value_type operator->() const { return Current; }
943
944
31.5M
    redecl_iterator& operator++() {
945
31.5M
      assert(Current && "Advancing while iterator has reached end");
946
      // Get either previous decl or latest decl.
947
31.5M
      Decl *Next = Current->getNextRedeclarationImpl();
948
31.5M
      assert(Next && "Should return next redeclaration or itself, never null!");
949
29.1M
      Current = (Next != Starter) ? 
Next2.35M
: nullptr;
950
31.5M
      return *this;
951
31.5M
    }
952
953
0
    redecl_iterator operator++(int) {
954
0
      redecl_iterator tmp(*this);
955
0
      ++(*this);
956
0
      return tmp;
957
0
    }
958
959
0
    friend bool operator==(redecl_iterator x, redecl_iterator y) {
960
0
      return x.Current == y.Current;
961
0
    }
962
963
60.9M
    friend bool operator!=(redecl_iterator x, redecl_iterator y) {
964
60.9M
      return x.Current != y.Current;
965
60.9M
    }
966
  };
967
968
  using redecl_range = llvm::iterator_range<redecl_iterator>;
969
970
  /// Returns an iterator range for all the redeclarations of the same
971
  /// decl. It will iterate at least once (when this decl is the only one).
972
29.4M
  redecl_range redecls() const {
973
29.4M
    return redecl_range(redecls_begin(), redecls_end());
974
29.4M
  }
975
976
29.4M
  redecl_iterator redecls_begin() const {
977
29.4M
    return redecl_iterator(const_cast<Decl *>(this));
978
29.4M
  }
979
980
29.4M
  redecl_iterator redecls_end() const { return redecl_iterator(); }
981
982
  /// Retrieve the previous declaration that declares the same entity
983
  /// as this declaration, or NULL if there is no previous declaration.
984
4.59M
  Decl *getPreviousDecl() { return getPreviousDeclImpl(); }
985
986
  /// Retrieve the previous declaration that declares the same entity
987
  /// as this declaration, or NULL if there is no previous declaration.
988
400k
  const Decl *getPreviousDecl() const {
989
400k
    return const_cast<Decl *>(this)->getPreviousDeclImpl();
990
400k
  }
991
992
  /// True if this is the first declaration in its redeclaration chain.
993
19
  bool isFirstDecl() const {
994
19
    return getPreviousDecl() == nullptr;
995
19
  }
996
997
  /// Retrieve the most recent declaration that declares the same entity
998
  /// as this declaration (which may be this declaration).
999
28.2M
  Decl *getMostRecentDecl() { return getMostRecentDeclImpl(); }
1000
1001
  /// Retrieve the most recent declaration that declares the same entity
1002
  /// as this declaration (which may be this declaration).
1003
106M
  const Decl *getMostRecentDecl() const {
1004
106M
    return const_cast<Decl *>(this)->getMostRecentDeclImpl();
1005
106M
  }
1006
1007
  /// getBody - If this Decl represents a declaration for a body of code,
1008
  ///  such as a function or method definition, this method returns the
1009
  ///  top-level Stmt* of that body.  Otherwise this method returns null.
1010
179k
  virtual Stmt* getBody() const { return nullptr; }
1011
1012
  /// Returns true if this \c Decl represents a declaration for a body of
1013
  /// code, such as a function or method definition.
1014
  /// Note that \c hasBody can also return true if any redeclaration of this
1015
  /// \c Decl represents a declaration for a body of code.
1016
48.8k
  virtual bool hasBody() const { return getBody() != nullptr; }
1017
1018
  /// getBodyRBrace - Gets the right brace of the body, if a body exists.
1019
  /// This works whether the body is a CompoundStmt or a CXXTryStmt.
1020
  SourceLocation getBodyRBrace() const;
1021
1022
  // global temp stats (until we have a per-module visitor)
1023
  static void add(Kind k);
1024
  static void EnableStatistics();
1025
  static void PrintStats();
1026
1027
  /// isTemplateParameter - Determines whether this declaration is a
1028
  /// template parameter.
1029
  bool isTemplateParameter() const;
1030
1031
  /// isTemplateParameter - Determines whether this declaration is a
1032
  /// template parameter pack.
1033
  bool isTemplateParameterPack() const;
1034
1035
  /// Whether this declaration is a parameter pack.
1036
  bool isParameterPack() const;
1037
1038
  /// returns true if this declaration is a template
1039
  bool isTemplateDecl() const;
1040
1041
  /// Whether this declaration is a function or function template.
1042
570k
  bool isFunctionOrFunctionTemplate() const {
1043
570k
    return (DeclKind >= Decl::firstFunction &&
1044
462k
            DeclKind <= Decl::lastFunction) ||
1045
120k
           DeclKind == FunctionTemplate;
1046
570k
  }
1047
1048
  /// If this is a declaration that describes some template, this
1049
  /// method returns that template declaration.
1050
  ///
1051
  /// Note that this returns nullptr for partial specializations, because they
1052
  /// are not modeled as TemplateDecls. Use getDescribedTemplateParams to handle
1053
  /// those cases.
1054
  TemplateDecl *getDescribedTemplate() const;
1055
1056
  /// If this is a declaration that describes some template or partial
1057
  /// specialization, this returns the corresponding template parameter list.
1058
  const TemplateParameterList *getDescribedTemplateParams() const;
1059
1060
  /// Returns the function itself, or the templated function if this is a
1061
  /// function template.
1062
  FunctionDecl *getAsFunction() LLVM_READONLY;
1063
1064
4.40M
  const FunctionDecl *getAsFunction() const {
1065
4.40M
    return const_cast<Decl *>(this)->getAsFunction();
1066
4.40M
  }
1067
1068
  /// Changes the namespace of this declaration to reflect that it's
1069
  /// a function-local extern declaration.
1070
  ///
1071
  /// These declarations appear in the lexical context of the extern
1072
  /// declaration, but in the semantic context of the enclosing namespace
1073
  /// scope.
1074
5.22k
  void setLocalExternDecl() {
1075
5.22k
    Decl *Prev = getPreviousDecl();
1076
5.22k
    IdentifierNamespace &= ~IDNS_Ordinary;
1077
5.22k
1078
    // It's OK for the declaration to still have the "invisible friend" flag or
1079
    // the "conflicts with tag declarations in this scope" flag for the outer
1080
    // scope.
1081
5.22k
    assert((IdentifierNamespace & ~(IDNS_OrdinaryFriend | IDNS_Tag)) == 0 &&
1082
5.22k
           "namespace is not ordinary");
1083
5.22k
1084
5.22k
    IdentifierNamespace |= IDNS_LocalExtern;
1085
5.22k
    if (Prev && 
Prev->getIdentifierNamespace() & IDNS_Ordinary9
)
1086
0
      IdentifierNamespace |= IDNS_Ordinary;
1087
5.22k
  }
1088
1089
  /// Determine whether this is a block-scope declaration with linkage.
1090
  /// This will either be a local variable declaration declared 'extern', or a
1091
  /// local function declaration.
1092
48.2M
  bool isLocalExternDecl() {
1093
48.2M
    return IdentifierNamespace & IDNS_LocalExtern;
1094
48.2M
  }
1095
1096
  /// Changes the namespace of this declaration to reflect that it's
1097
  /// the object of a friend declaration.
1098
  ///
1099
  /// These declarations appear in the lexical context of the friending
1100
  /// class, but in the semantic context of the actual entity.  This property
1101
  /// applies only to a specific decl object;  other redeclarations of the
1102
  /// same entity may not (and probably don't) share this property.
1103
108k
  void setObjectOfFriendDecl(bool PerformFriendInjection = false) {
1104
108k
    unsigned OldNS = IdentifierNamespace;
1105
108k
    assert((OldNS & (IDNS_Tag | IDNS_Ordinary |
1106
108k
                     IDNS_TagFriend | IDNS_OrdinaryFriend |
1107
108k
                     IDNS_LocalExtern | IDNS_NonMemberOperator)) &&
1108
108k
           "namespace includes neither ordinary nor tag");
1109
108k
    assert(!(OldNS & ~(IDNS_Tag | IDNS_Ordinary | IDNS_Type |
1110
108k
                       IDNS_TagFriend | IDNS_OrdinaryFriend |
1111
108k
                       IDNS_LocalExtern | IDNS_NonMemberOperator)) &&
1112
108k
           "namespace includes other than ordinary or tag");
1113
108k
1114
108k
    Decl *Prev = getPreviousDecl();
1115
108k
    IdentifierNamespace &= ~(IDNS_Ordinary | IDNS_Tag | IDNS_Type);
1116
108k
1117
108k
    if (OldNS & (IDNS_Tag | IDNS_TagFriend)) {
1118
12.0k
      IdentifierNamespace |= IDNS_TagFriend;
1119
12.0k
      if (PerformFriendInjection ||
1120
12.0k
          (Prev && 
Prev->getIdentifierNamespace() & IDNS_Tag5.46k
))
1121
5.24k
        IdentifierNamespace |= IDNS_Tag | IDNS_Type;
1122
12.0k
    }
1123
108k
1124
108k
    if (OldNS & (IDNS_Ordinary | IDNS_OrdinaryFriend |
1125
107k
                 IDNS_LocalExtern | IDNS_NonMemberOperator)) {
1126
107k
      IdentifierNamespace |= IDNS_OrdinaryFriend;
1127
107k
      if (PerformFriendInjection ||
1128
107k
          (Prev && 
Prev->getIdentifierNamespace() & IDNS_Ordinary30.2k
))
1129
29.9k
        IdentifierNamespace |= IDNS_Ordinary;
1130
107k
    }
1131
108k
  }
1132
1133
  enum FriendObjectKind {
1134
    FOK_None,      ///< Not a friend object.
1135
    FOK_Declared,  ///< A friend of a previously-declared entity.
1136
    FOK_Undeclared ///< A friend of a previously-undeclared entity.
1137
  };
1138
1139
  /// Determines whether this declaration is the object of a
1140
  /// friend declaration and, if so, what kind.
1141
  ///
1142
  /// There is currently no direct way to find the associated FriendDecl.
1143
109M
  FriendObjectKind getFriendObjectKind() const {
1144
109M
    unsigned mask =
1145
109M
        (IdentifierNamespace & (IDNS_TagFriend | IDNS_OrdinaryFriend));
1146
109M
    if (!mask) 
return FOK_None109M
;
1147
417k
    return (IdentifierNamespace & (IDNS_Tag | IDNS_Ordinary) ? 
FOK_Declared65.0k
1148
352k
                                                             : FOK_Undeclared);
1149
417k
  }
1150
1151
  /// Specifies that this declaration is a C++ overloaded non-member.
1152
107k
  void setNonMemberOperator() {
1153
107k
    assert(getKind() == Function || getKind() == FunctionTemplate);
1154
107k
    assert((IdentifierNamespace & IDNS_Ordinary) &&
1155
107k
           "visible non-member operators should be in ordinary namespace");
1156
107k
    IdentifierNamespace |= IDNS_NonMemberOperator;
1157
107k
  }
1158
1159
2.04G
  static bool classofKind(Kind K) { return true; }
1160
  static DeclContext *castToDeclContext(const Decl *);
1161
  static Decl *castFromDeclContext(const DeclContext *);
1162
1163
  void print(raw_ostream &Out, unsigned Indentation = 0,
1164
             bool PrintInstantiation = false) const;
1165
  void print(raw_ostream &Out, const PrintingPolicy &Policy,
1166
             unsigned Indentation = 0, bool PrintInstantiation = false) const;
1167
  static void printGroup(Decl** Begin, unsigned NumDecls,
1168
                         raw_ostream &Out, const PrintingPolicy &Policy,
1169
                         unsigned Indentation = 0);
1170
1171
  // Debuggers don't usually respect default arguments.
1172
  void dump() const;
1173
1174
  // Same as dump(), but forces color printing.
1175
  void dumpColor() const;
1176
1177
  void dump(raw_ostream &Out, bool Deserialize = false,
1178
            ASTDumpOutputFormat OutputFormat = ADOF_Default) const;
1179
1180
  /// \return Unique reproducible object identifier
1181
  int64_t getID() const;
1182
1183
  /// Looks through the Decl's underlying type to extract a FunctionType
1184
  /// when possible. Will return null if the type underlying the Decl does not
1185
  /// have a FunctionType.
1186
  const FunctionType *getFunctionType(bool BlocksToo = true) const;
1187
1188
private:
1189
  void setAttrsImpl(const AttrVec& Attrs, ASTContext &Ctx);
1190
  void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
1191
                           ASTContext &Ctx);
1192
1193
protected:
1194
  ASTMutationListener *getASTMutationListener() const;
1195
};
1196
1197
/// Determine whether two declarations declare the same entity.
1198
7.50M
inline bool declaresSameEntity(const Decl *D1, const Decl *D2) {
1199
7.50M
  if (!D1 || 
!D26.29M
)
1200
1.21M
    return false;
1201
6.29M
1202
6.29M
  if (D1 == D2)
1203
2.91M
    return true;
1204
3.37M
1205
3.37M
  return D1->getCanonicalDecl() == D2->getCanonicalDecl();
1206
3.37M
}
1207
1208
/// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when
1209
/// doing something to a specific decl.
1210
class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry {
1211
  const Decl *TheDecl;
1212
  SourceLocation Loc;
1213
  SourceManager &SM;
1214
  const char *Message;
1215
1216
public:
1217
  PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L,
1218
                       SourceManager &sm, const char *Msg)
1219
16.7M
      : TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {}
1220
1221
  void print(raw_ostream &OS) const override;
1222
};
1223
1224
/// The results of name lookup within a DeclContext. This is either a
1225
/// single result (with no stable storage) or a collection of results (with
1226
/// stable storage provided by the lookup table).
1227
class DeclContextLookupResult {
1228
  using ResultTy = ArrayRef<NamedDecl *>;
1229
1230
  ResultTy Result;
1231
1232
  // If there is only one lookup result, it would be invalidated by
1233
  // reallocations of the name table, so store it separately.
1234
  NamedDecl *Single = nullptr;
1235
1236
  static NamedDecl *const SingleElementDummyList;
1237
1238
public:
1239
117M
  DeclContextLookupResult() = default;
1240
  DeclContextLookupResult(ArrayRef<NamedDecl *> Result)
1241
6.63M
      : Result(Result) {}
1242
  DeclContextLookupResult(NamedDecl *Single)
1243
37.0M
      : Result(SingleElementDummyList), Single(Single) {}
1244
1245
  class iterator;
1246
1247
  using IteratorBase =
1248
      llvm::iterator_adaptor_base<iterator, ResultTy::iterator,
1249
                                  std::random_access_iterator_tag,
1250
                                  NamedDecl *const>;
1251
1252
  class iterator : public IteratorBase {
1253
    value_type SingleElement;
1254
1255
  public:
1256
    explicit iterator(pointer Pos, value_type Single = nullptr)
1257
249M
        : IteratorBase(Pos), SingleElement(Single) {}
1258
1259
62.5M
    reference operator*() const {
1260
34.4M
      return SingleElement ? SingleElement : 
IteratorBase::operator*()28.1M
;
1261
62.5M
    }
1262
  };
1263
1264
  using const_iterator = iterator;
1265
  using pointer = iterator::pointer;
1266
  using reference = iterator::reference;
1267
1268
124M
  iterator begin() const { return iterator(Result.begin(), Single); }
1269
124M
  iterator end() const { return iterator(Result.end(), Single); }
1270
1271
25.2M
  bool empty() const { return Result.empty(); }
1272
0
  pointer data() const { return Single ? &Single : Result.data(); }
1273
1.04M
  size_t size() const { return Single ? 
16.82k
:
Result.size()1.03M
; }
1274
2.46M
  reference front() const { return Single ? 
Single2.28M
:
Result.front()181k
; }
1275
0
  reference back() const { return Single ? Single : Result.back(); }
1276
8.32k
  reference operator[](size_t N) const { return Single ? 
Single7.59k
:
Result[N]733
; }
1277
1278
  // FIXME: Remove this from the interface
1279
661k
  DeclContextLookupResult slice(size_t N) const {
1280
661k
    DeclContextLookupResult Sliced = Result.slice(N);
1281
661k
    Sliced.Single = Single;
1282
661k
    return Sliced;
1283
661k
  }
1284
};
1285
1286
/// DeclContext - This is used only as base class of specific decl types that
1287
/// can act as declaration contexts. These decls are (only the top classes
1288
/// that directly derive from DeclContext are mentioned, not their subclasses):
1289
///
1290
///   TranslationUnitDecl
1291
///   ExternCContext
1292
///   NamespaceDecl
1293
///   TagDecl
1294
///   OMPDeclareReductionDecl
1295
///   OMPDeclareMapperDecl
1296
///   FunctionDecl
1297
///   ObjCMethodDecl
1298
///   ObjCContainerDecl
1299
///   LinkageSpecDecl
1300
///   ExportDecl
1301
///   BlockDecl
1302
///   CapturedDecl
1303
class DeclContext {
1304
  /// For makeDeclVisibleInContextImpl
1305
  friend class ASTDeclReader;
1306
  /// For reconcileExternalVisibleStorage, CreateStoredDeclsMap,
1307
  /// hasNeedToReconcileExternalVisibleStorage
1308
  friend class ExternalASTSource;
1309
  /// For CreateStoredDeclsMap
1310
  friend class DependentDiagnostic;
1311
  /// For hasNeedToReconcileExternalVisibleStorage,
1312
  /// hasLazyLocalLexicalLookups, hasLazyExternalLexicalLookups
1313
  friend class ASTWriter;
1314
1315
  // We use uint64_t in the bit-fields below since some bit-fields
1316
  // cross the unsigned boundary and this breaks the packing.
1317
1318
  /// Stores the bits used by DeclContext.
1319
  /// If modified NumDeclContextBit, the ctor of DeclContext and the accessor
1320
  /// methods in DeclContext should be updated appropriately.
1321
  class DeclContextBitfields {
1322
    friend class DeclContext;
1323
    /// DeclKind - This indicates which class this is.
1324
    uint64_t DeclKind : 7;
1325
1326
    /// Whether this declaration context also has some external
1327
    /// storage that contains additional declarations that are lexically
1328
    /// part of this context.
1329
    mutable uint64_t ExternalLexicalStorage : 1;
1330
1331
    /// Whether this declaration context also has some external
1332
    /// storage that contains additional declarations that are visible
1333
    /// in this context.
1334
    mutable uint64_t ExternalVisibleStorage : 1;
1335
1336
    /// Whether this declaration context has had externally visible
1337
    /// storage added since the last lookup. In this case, \c LookupPtr's
1338
    /// invariant may not hold and needs to be fixed before we perform
1339
    /// another lookup.
1340
    mutable uint64_t NeedToReconcileExternalVisibleStorage : 1;
1341
1342
    /// If \c true, this context may have local lexical declarations
1343
    /// that are missing from the lookup table.
1344
    mutable uint64_t HasLazyLocalLexicalLookups : 1;
1345
1346
    /// If \c true, the external source may have lexical declarations
1347
    /// that are missing from the lookup table.
1348
    mutable uint64_t HasLazyExternalLexicalLookups : 1;
1349
1350
    /// If \c true, lookups should only return identifier from
1351
    /// DeclContext scope (for example TranslationUnit). Used in
1352
    /// LookupQualifiedName()
1353
    mutable uint64_t UseQualifiedLookup : 1;
1354
  };
1355
1356
  /// Number of bits in DeclContextBitfields.
1357
  enum { NumDeclContextBits = 13 };
1358
1359
  /// Stores the bits used by TagDecl.
1360
  /// If modified NumTagDeclBits and the accessor
1361
  /// methods in TagDecl should be updated appropriately.
1362
  class TagDeclBitfields {
1363
    friend class TagDecl;
1364
    /// For the bits in DeclContextBitfields
1365
    uint64_t : NumDeclContextBits;
1366
1367
    /// The TagKind enum.
1368
    uint64_t TagDeclKind : 3;
1369
1370
    /// True if this is a definition ("struct foo {};"), false if it is a
1371
    /// declaration ("struct foo;").  It is not considered a definition
1372
    /// until the definition has been fully processed.
1373
    uint64_t IsCompleteDefinition : 1;
1374
1375
    /// True if this is currently being defined.
1376
    uint64_t IsBeingDefined : 1;
1377
1378
    /// True if this tag declaration is "embedded" (i.e., defined or declared
1379
    /// for the very first time) in the syntax of a declarator.
1380
    uint64_t IsEmbeddedInDeclarator : 1;
1381
1382
    /// True if this tag is free standing, e.g. "struct foo;".
1383
    uint64_t IsFreeStanding : 1;
1384
1385
    /// Indicates whether it is possible for declarations of this kind
1386
    /// to have an out-of-date definition.
1387
    ///
1388
    /// This option is only enabled when modules are enabled.
1389
    uint64_t MayHaveOutOfDateDef : 1;
1390
1391
    /// Has the full definition of this type been required by a use somewhere in
1392
    /// the TU.
1393
    uint64_t IsCompleteDefinitionRequired : 1;
1394
  };
1395
1396
  /// Number of non-inherited bits in TagDeclBitfields.
1397
  enum { NumTagDeclBits = 9 };
1398
1399
  /// Stores the bits used by EnumDecl.
1400
  /// If modified NumEnumDeclBit and the accessor
1401
  /// methods in EnumDecl should be updated appropriately.
1402
  class EnumDeclBitfields {
1403
    friend class EnumDecl;
1404
    /// For the bits in DeclContextBitfields.
1405
    uint64_t : NumDeclContextBits;
1406
    /// For the bits in TagDeclBitfields.
1407
    uint64_t : NumTagDeclBits;
1408
1409
    /// Width in bits required to store all the non-negative
1410
    /// enumerators of this enum.
1411
    uint64_t NumPositiveBits : 8;
1412
1413
    /// Width in bits required to store all the negative
1414
    /// enumerators of this enum.
1415
    uint64_t NumNegativeBits : 8;
1416
1417
    /// True if this tag declaration is a scoped enumeration. Only
1418
    /// possible in C++11 mode.
1419
    uint64_t IsScoped : 1;
1420
1421
    /// If this tag declaration is a scoped enum,
1422
    /// then this is true if the scoped enum was declared using the class
1423
    /// tag, false if it was declared with the struct tag. No meaning is
1424
    /// associated if this tag declaration is not a scoped enum.
1425
    uint64_t IsScopedUsingClassTag : 1;
1426
1427
    /// True if this is an enumeration with fixed underlying type. Only
1428
    /// possible in C++11, Microsoft extensions, or Objective C mode.
1429
    uint64_t IsFixed : 1;
1430
1431
    /// True if a valid hash is stored in ODRHash.
1432
    uint64_t HasODRHash : 1;
1433
  };
1434
1435
  /// Number of non-inherited bits in EnumDeclBitfields.
1436
  enum { NumEnumDeclBits = 20 };
1437
1438
  /// Stores the bits used by RecordDecl.
1439
  /// If modified NumRecordDeclBits and the accessor
1440
  /// methods in RecordDecl should be updated appropriately.
1441
  class RecordDeclBitfields {
1442
    friend class RecordDecl;
1443
    /// For the bits in DeclContextBitfields.
1444
    uint64_t : NumDeclContextBits;
1445
    /// For the bits in TagDeclBitfields.
1446
    uint64_t : NumTagDeclBits;
1447
1448
    /// This is true if this struct ends with a flexible
1449
    /// array member (e.g. int X[]) or if this union contains a struct that does.
1450
    /// If so, this cannot be contained in arrays or other structs as a member.
1451
    uint64_t HasFlexibleArrayMember : 1;
1452
1453
    /// Whether this is the type of an anonymous struct or union.
1454
    uint64_t AnonymousStructOrUnion : 1;
1455
1456
    /// This is true if this struct has at least one member
1457
    /// containing an Objective-C object pointer type.
1458
    uint64_t HasObjectMember : 1;
1459
1460
    /// This is true if struct has at least one member of
1461
    /// 'volatile' type.
1462
    uint64_t HasVolatileMember : 1;
1463
1464
    /// Whether the field declarations of this record have been loaded
1465
    /// from external storage. To avoid unnecessary deserialization of
1466
    /// methods/nested types we allow deserialization of just the fields
1467
    /// when needed.
1468
    mutable uint64_t LoadedFieldsFromExternalStorage : 1;
1469
1470
    /// Basic properties of non-trivial C structs.
1471
    uint64_t NonTrivialToPrimitiveDefaultInitialize : 1;
1472
    uint64_t NonTrivialToPrimitiveCopy : 1;
1473
    uint64_t NonTrivialToPrimitiveDestroy : 1;
1474
1475
    /// The following bits indicate whether this is or contains a C union that
1476
    /// is non-trivial to default-initialize, destruct, or copy. These bits
1477
    /// imply the associated basic non-triviality predicates declared above.
1478
    uint64_t HasNonTrivialToPrimitiveDefaultInitializeCUnion : 1;
1479
    uint64_t HasNonTrivialToPrimitiveDestructCUnion : 1;
1480
    uint64_t HasNonTrivialToPrimitiveCopyCUnion : 1;
1481
1482
    /// Indicates whether this struct is destroyed in the callee.
1483
    uint64_t ParamDestroyedInCallee : 1;
1484
1485
    /// Represents the way this type is passed to a function.
1486
    uint64_t ArgPassingRestrictions : 2;
1487
  };
1488
1489
  /// Number of non-inherited bits in RecordDeclBitfields.
1490
  enum { NumRecordDeclBits = 14 };
1491
1492
  /// Stores the bits used by OMPDeclareReductionDecl.
1493
  /// If modified NumOMPDeclareReductionDeclBits and the accessor
1494
  /// methods in OMPDeclareReductionDecl should be updated appropriately.
1495
  class OMPDeclareReductionDeclBitfields {
1496
    friend class OMPDeclareReductionDecl;
1497
    /// For the bits in DeclContextBitfields
1498
    uint64_t : NumDeclContextBits;
1499
1500
    /// Kind of initializer,
1501
    /// function call or omp_priv<init_expr> initializtion.
1502
    uint64_t InitializerKind : 2;
1503
  };
1504
1505
  /// Number of non-inherited bits in OMPDeclareReductionDeclBitfields.
1506
  enum { NumOMPDeclareReductionDeclBits = 2 };
1507
1508
  /// Stores the bits used by FunctionDecl.
1509
  /// If modified NumFunctionDeclBits and the accessor
1510
  /// methods in FunctionDecl and CXXDeductionGuideDecl
1511
  /// (for IsCopyDeductionCandidate) should be updated appropriately.
1512
  class FunctionDeclBitfields {
1513
    friend class FunctionDecl;
1514
    /// For IsCopyDeductionCandidate
1515
    friend class CXXDeductionGuideDecl;
1516
    /// For the bits in DeclContextBitfields.
1517
    uint64_t : NumDeclContextBits;
1518
1519
    uint64_t SClass : 3;
1520
    uint64_t IsInline : 1;
1521
    uint64_t IsInlineSpecified : 1;
1522
1523
    uint64_t IsVirtualAsWritten : 1;
1524
    uint64_t IsPure : 1;
1525
    uint64_t HasInheritedPrototype : 1;
1526
    uint64_t HasWrittenPrototype : 1;
1527
    uint64_t IsDeleted : 1;
1528
    /// Used by CXXMethodDecl
1529
    uint64_t IsTrivial : 1;
1530
1531
    /// This flag indicates whether this function is trivial for the purpose of
1532
    /// calls. This is meaningful only when this function is a copy/move
1533
    /// constructor or a destructor.
1534
    uint64_t IsTrivialForCall : 1;
1535
1536
    uint64_t IsDefaulted : 1;
1537
    uint64_t IsExplicitlyDefaulted : 1;
1538
    uint64_t HasDefaultedFunctionInfo : 1;
1539
    uint64_t HasImplicitReturnZero : 1;
1540
    uint64_t IsLateTemplateParsed : 1;
1541
1542
    /// Kind of contexpr specifier as defined by ConstexprSpecKind.
1543
    uint64_t ConstexprKind : 2;
1544
    uint64_t InstantiationIsPending : 1;
1545
1546
    /// Indicates if the function uses __try.
1547
    uint64_t UsesSEHTry : 1;
1548
1549
    /// Indicates if the function was a definition
1550
    /// but its body was skipped.
1551
    uint64_t HasSkippedBody : 1;
1552
1553
    /// Indicates if the function declaration will
1554
    /// have a body, once we're done parsing it.
1555
    uint64_t WillHaveBody : 1;
1556
1557
    /// Indicates that this function is a multiversioned
1558
    /// function using attribute 'target'.
1559
    uint64_t IsMultiVersion : 1;
1560
1561
    /// [C++17] Only used by CXXDeductionGuideDecl. Indicates that
1562
    /// the Deduction Guide is the implicitly generated 'copy
1563
    /// deduction candidate' (is used during overload resolution).
1564
    uint64_t IsCopyDeductionCandidate : 1;
1565
1566
    /// Store the ODRHash after first calculation.
1567
    uint64_t HasODRHash : 1;
1568
1569
    /// Indicates if the function uses Floating Point Constrained Intrinsics
1570
    uint64_t UsesFPIntrin : 1;
1571
  };
1572
1573
  /// Number of non-inherited bits in FunctionDeclBitfields.
1574
  enum { NumFunctionDeclBits = 27 };
1575
1576
  /// Stores the bits used by CXXConstructorDecl. If modified
1577
  /// NumCXXConstructorDeclBits and the accessor
1578
  /// methods in CXXConstructorDecl should be updated appropriately.
1579
  class CXXConstructorDeclBitfields {
1580
    friend class CXXConstructorDecl;
1581
    /// For the bits in DeclContextBitfields.
1582
    uint64_t : NumDeclContextBits;
1583
    /// For the bits in FunctionDeclBitfields.
1584
    uint64_t : NumFunctionDeclBits;
1585
1586
    /// 24 bits to fit in the remaining available space.
1587
    /// Note that this makes CXXConstructorDeclBitfields take
1588
    /// exactly 64 bits and thus the width of NumCtorInitializers
1589
    /// will need to be shrunk if some bit is added to NumDeclContextBitfields,
1590
    /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields.
1591
    uint64_t NumCtorInitializers : 21;
1592
    uint64_t IsInheritingConstructor : 1;
1593
1594
    /// Whether this constructor has a trail-allocated explicit specifier.
1595
    uint64_t HasTrailingExplicitSpecifier : 1;
1596
    /// If this constructor does't have a trail-allocated explicit specifier.
1597
    /// Whether this constructor is explicit specified.
1598
    uint64_t IsSimpleExplicit : 1;
1599
  };
1600
1601
  /// Number of non-inherited bits in CXXConstructorDeclBitfields.
1602
  enum {
1603
    NumCXXConstructorDeclBits = 64 - NumDeclContextBits - NumFunctionDeclBits
1604
  };
1605
1606
  /// Stores the bits used by ObjCMethodDecl.
1607
  /// If modified NumObjCMethodDeclBits and the accessor
1608
  /// methods in ObjCMethodDecl should be updated appropriately.
1609
  class ObjCMethodDeclBitfields {
1610
    friend class ObjCMethodDecl;
1611
1612
    /// For the bits in DeclContextBitfields.
1613
    uint64_t : NumDeclContextBits;
1614
1615
    /// The conventional meaning of this method; an ObjCMethodFamily.
1616
    /// This is not serialized; instead, it is computed on demand and
1617
    /// cached.
1618
    mutable uint64_t Family : ObjCMethodFamilyBitWidth;
1619
1620
    /// instance (true) or class (false) method.
1621
    uint64_t IsInstance : 1;
1622
    uint64_t IsVariadic : 1;
1623
1624
    /// True if this method is the getter or setter for an explicit property.
1625
    uint64_t IsPropertyAccessor : 1;
1626
1627
    /// True if this method is a synthesized property accessor stub.
1628
    uint64_t IsSynthesizedAccessorStub : 1;
1629
1630
    /// Method has a definition.
1631
    uint64_t IsDefined : 1;
1632
1633
    /// Method redeclaration in the same interface.
1634
    uint64_t IsRedeclaration : 1;
1635
1636
    /// Is redeclared in the same interface.
1637
    mutable uint64_t HasRedeclaration : 1;
1638
1639
    /// \@required/\@optional
1640
    uint64_t DeclImplementation : 2;
1641
1642
    /// in, inout, etc.
1643
    uint64_t objcDeclQualifier : 7;
1644
1645
    /// Indicates whether this method has a related result type.
1646
    uint64_t RelatedResultType : 1;
1647
1648
    /// Whether the locations of the selector identifiers are in a
1649
    /// "standard" position, a enum SelectorLocationsKind.
1650
    uint64_t SelLocsKind : 2;
1651
1652
    /// Whether this method overrides any other in the class hierarchy.
1653
    ///
1654
    /// A method is said to override any method in the class's
1655
    /// base classes, its protocols, or its categories' protocols, that has
1656
    /// the same selector and is of the same kind (class or instance).
1657
    /// A method in an implementation is not considered as overriding the same
1658
    /// method in the interface or its categories.
1659
    uint64_t IsOverriding : 1;
1660
1661
    /// Indicates if the method was a definition but its body was skipped.
1662
    uint64_t HasSkippedBody : 1;
1663
  };
1664
1665
  /// Number of non-inherited bits in ObjCMethodDeclBitfields.
1666
  enum { NumObjCMethodDeclBits = 24 };
1667
1668
  /// Stores the bits used by ObjCContainerDecl.
1669
  /// If modified NumObjCContainerDeclBits and the accessor
1670
  /// methods in ObjCContainerDecl should be updated appropriately.
1671
  class ObjCContainerDeclBitfields {
1672
    friend class ObjCContainerDecl;
1673
    /// For the bits in DeclContextBitfields
1674
    uint32_t : NumDeclContextBits;
1675
1676
    // Not a bitfield but this saves space.
1677
    // Note that ObjCContainerDeclBitfields is full.
1678
    SourceLocation AtStart;
1679
  };
1680
1681
  /// Number of non-inherited bits in ObjCContainerDeclBitfields.
1682
  /// Note that here we rely on the fact that SourceLocation is 32 bits
1683
  /// wide. We check this with the static_assert in the ctor of DeclContext.
1684
  enum { NumObjCContainerDeclBits = 64 - NumDeclContextBits };
1685
1686
  /// Stores the bits used by LinkageSpecDecl.
1687
  /// If modified NumLinkageSpecDeclBits and the accessor
1688
  /// methods in LinkageSpecDecl should be updated appropriately.
1689
  class LinkageSpecDeclBitfields {
1690
    friend class LinkageSpecDecl;
1691
    /// For the bits in DeclContextBitfields.
1692
    uint64_t : NumDeclContextBits;
1693
1694
    /// The language for this linkage specification with values
1695
    /// in the enum LinkageSpecDecl::LanguageIDs.
1696
    uint64_t Language : 3;
1697
1698
    /// True if this linkage spec has braces.
1699
    /// This is needed so that hasBraces() returns the correct result while the
1700
    /// linkage spec body is being parsed.  Once RBraceLoc has been set this is
1701
    /// not used, so it doesn't need to be serialized.
1702
    uint64_t HasBraces : 1;
1703
  };
1704
1705
  /// Number of non-inherited bits in LinkageSpecDeclBitfields.
1706
  enum { NumLinkageSpecDeclBits = 4 };
1707
1708
  /// Stores the bits used by BlockDecl.
1709
  /// If modified NumBlockDeclBits and the accessor
1710
  /// methods in BlockDecl should be updated appropriately.
1711
  class BlockDeclBitfields {
1712
    friend class BlockDecl;
1713
    /// For the bits in DeclContextBitfields.
1714
    uint64_t : NumDeclContextBits;
1715
1716
    uint64_t IsVariadic : 1;
1717
    uint64_t CapturesCXXThis : 1;
1718
    uint64_t BlockMissingReturnType : 1;
1719
    uint64_t IsConversionFromLambda : 1;
1720
1721
    /// A bit that indicates this block is passed directly to a function as a
1722
    /// non-escaping parameter.
1723
    uint64_t DoesNotEscape : 1;
1724
1725
    /// A bit that indicates whether it's possible to avoid coying this block to
1726
    /// the heap when it initializes or is assigned to a local variable with
1727
    /// automatic storage.
1728
    uint64_t CanAvoidCopyToHeap : 1;
1729
  };
1730
1731
  /// Number of non-inherited bits in BlockDeclBitfields.
1732
  enum { NumBlockDeclBits = 5 };
1733
1734
  /// Pointer to the data structure used to lookup declarations
1735
  /// within this context (or a DependentStoredDeclsMap if this is a
1736
  /// dependent context). We maintain the invariant that, if the map
1737
  /// contains an entry for a DeclarationName (and we haven't lazily
1738
  /// omitted anything), then it contains all relevant entries for that
1739
  /// name (modulo the hasExternalDecls() flag).
1740
  mutable StoredDeclsMap *LookupPtr = nullptr;
1741
1742
protected:
1743
  /// This anonymous union stores the bits belonging to DeclContext and classes
1744
  /// deriving from it. The goal is to use otherwise wasted
1745
  /// space in DeclContext to store data belonging to derived classes.
1746
  /// The space saved is especially significient when pointers are aligned
1747
  /// to 8 bytes. In this case due to alignment requirements we have a
1748
  /// little less than 8 bytes free in DeclContext which we can use.
1749
  /// We check that none of the classes in this union is larger than
1750
  /// 8 bytes with static_asserts in the ctor of DeclContext.
1751
  union {
1752
    DeclContextBitfields DeclContextBits;
1753
    TagDeclBitfields TagDeclBits;
1754
    EnumDeclBitfields EnumDeclBits;
1755
    RecordDeclBitfields RecordDeclBits;
1756
    OMPDeclareReductionDeclBitfields OMPDeclareReductionDeclBits;
1757
    FunctionDeclBitfields FunctionDeclBits;
1758
    CXXConstructorDeclBitfields CXXConstructorDeclBits;
1759
    ObjCMethodDeclBitfields ObjCMethodDeclBits;
1760
    ObjCContainerDeclBitfields ObjCContainerDeclBits;
1761
    LinkageSpecDeclBitfields LinkageSpecDeclBits;
1762
    BlockDeclBitfields BlockDeclBits;
1763
1764
    static_assert(sizeof(DeclContextBitfields) <= 8,
1765
                  "DeclContextBitfields is larger than 8 bytes!");
1766
    static_assert(sizeof(TagDeclBitfields) <= 8,
1767
                  "TagDeclBitfields is larger than 8 bytes!");
1768
    static_assert(sizeof(EnumDeclBitfields) <= 8,
1769
                  "EnumDeclBitfields is larger than 8 bytes!");
1770
    static_assert(sizeof(RecordDeclBitfields) <= 8,
1771
                  "RecordDeclBitfields is larger than 8 bytes!");
1772
    static_assert(sizeof(OMPDeclareReductionDeclBitfields) <= 8,
1773
                  "OMPDeclareReductionDeclBitfields is larger than 8 bytes!");
1774
    static_assert(sizeof(FunctionDeclBitfields) <= 8,
1775
                  "FunctionDeclBitfields is larger than 8 bytes!");
1776
    static_assert(sizeof(CXXConstructorDeclBitfields) <= 8,
1777
                  "CXXConstructorDeclBitfields is larger than 8 bytes!");
1778
    static_assert(sizeof(ObjCMethodDeclBitfields) <= 8,
1779
                  "ObjCMethodDeclBitfields is larger than 8 bytes!");
1780
    static_assert(sizeof(ObjCContainerDeclBitfields) <= 8,
1781
                  "ObjCContainerDeclBitfields is larger than 8 bytes!");
1782
    static_assert(sizeof(LinkageSpecDeclBitfields) <= 8,
1783
                  "LinkageSpecDeclBitfields is larger than 8 bytes!");
1784
    static_assert(sizeof(BlockDeclBitfields) <= 8,
1785
                  "BlockDeclBitfields is larger than 8 bytes!");
1786
  };
1787
1788
  /// FirstDecl - The first declaration stored within this declaration
1789
  /// context.
1790
  mutable Decl *FirstDecl = nullptr;
1791
1792
  /// LastDecl - The last declaration stored within this declaration
1793
  /// context. FIXME: We could probably cache this value somewhere
1794
  /// outside of the DeclContext, to reduce the size of DeclContext by
1795
  /// another pointer.
1796
  mutable Decl *LastDecl = nullptr;
1797
1798
  /// Build up a chain of declarations.
1799
  ///
1800
  /// \returns the first/last pair of declarations.
1801
  static std::pair<Decl *, Decl *>
1802
  BuildDeclChain(ArrayRef<Decl*> Decls, bool FieldsAlreadyLoaded);
1803
1804
  DeclContext(Decl::Kind K);
1805
1806
public:
1807
  ~DeclContext();
1808
1809
18.9G
  Decl::Kind getDeclKind() const {
1810
18.9G
    return static_cast<Decl::Kind>(DeclContextBits.DeclKind);
1811
18.9G
  }
1812
1813
  const char *getDeclKindName() const;
1814
1815
  /// getParent - Returns the containing DeclContext.
1816
1.50G
  DeclContext *getParent() {
1817
1.50G
    return cast<Decl>(this)->getDeclContext();
1818
1.50G
  }
1819
269M
  const DeclContext *getParent() const {
1820
269M
    return const_cast<DeclContext*>(this)->getParent();
1821
269M
  }
1822
1823
  /// getLexicalParent - Returns the containing lexical DeclContext. May be
1824
  /// different from getParent, e.g.:
1825
  ///
1826
  ///   namespace A {
1827
  ///      struct S;
1828
  ///   }
1829
  ///   struct A::S {}; // getParent() == namespace 'A'
1830
  ///                   // getLexicalParent() == translation unit
1831
  ///
1832
46.3M
  DeclContext *getLexicalParent() {
1833
46.3M
    return cast<Decl>(this)->getLexicalDeclContext();
1834
46.3M
  }
1835
25.1M
  const DeclContext *getLexicalParent() const {
1836
25.1M
    return const_cast<DeclContext*>(this)->getLexicalParent();
1837
25.1M
  }
1838
1839
  DeclContext *getLookupParent();
1840
1841
121
  const DeclContext *getLookupParent() const {
1842
121
    return const_cast<DeclContext*>(this)->getLookupParent();
1843
121
  }
1844
1845
258M
  ASTContext &getParentASTContext() const {
1846
258M
    return cast<Decl>(this)->getASTContext();
1847
258M
  }
1848
1849
2.12k
  bool isClosure() const { return getDeclKind() == Decl::Block; }
1850
1851
  /// Return this DeclContext if it is a BlockDecl. Otherwise, return the
1852
  /// innermost enclosing BlockDecl or null if there are no enclosing blocks.
1853
  const BlockDecl *getInnermostBlockDecl() const;
1854
1855
5.93M
  bool isObjCContainer() const {
1856
5.93M
    switch (getDeclKind()) {
1857
916k
    case Decl::ObjCCategory:
1858
916k
    case Decl::ObjCCategoryImpl:
1859
916k
    case Decl::ObjCImplementation:
1860
916k
    case Decl::ObjCInterface:
1861
916k
    case Decl::ObjCProtocol:
1862
916k
      return true;
1863
5.01M
    default:
1864
5.01M
      return false;
1865
5.93M
    }
1866
5.93M
  }
1867
1868
249M
  bool isFunctionOrMethod() const {
1869
249M
    switch (getDeclKind()) {
1870
7.93M
    case Decl::Block:
1871
7.93M
    case Decl::Captured:
1872
7.93M
    case Decl::ObjCMethod:
1873
7.93M
      return true;
1874
241M
    default:
1875
241M
      return getDeclKind() >= Decl::firstFunction &&
1876
163M
             getDeclKind() <= Decl::lastFunction;
1877
249M
    }
1878
249M
  }
1879
1880
  /// Test whether the context supports looking up names.
1881
56.5M
  bool isLookupContext() const {
1882
56.5M
    return !isFunctionOrMethod() && 
getDeclKind() != Decl::LinkageSpec46.1M
&&
1883
44.3M
           getDeclKind() != Decl::Export;
1884
56.5M
  }
1885
1886
688M
  bool isFileContext() const {
1887
688M
    return getDeclKind() == Decl::TranslationUnit ||
1888
408M
           getDeclKind() == Decl::Namespace;
1889
688M
  }
1890
1891
2.91G
  bool isTranslationUnit() const {
1892
2.91G
    return getDeclKind() == Decl::TranslationUnit;
1893
2.91G
  }
1894
1895
343M
  bool isRecord() const {
1896
343M
    return getDeclKind() >= Decl::firstRecord &&
1897
305M
           getDeclKind() <= Decl::lastRecord;
1898
343M
  }
1899
1900
51.8M
  bool isNamespace() const { return getDeclKind() == Decl::Namespace; }
1901
1902
  bool isStdNamespace() const;
1903
1904
  bool isInlineNamespace() const;
1905
1906
  /// Determines whether this context is dependent on a
1907
  /// template parameter.
1908
  bool isDependentContext() const;
1909
1910
  /// isTransparentContext - Determines whether this context is a
1911
  /// "transparent" context, meaning that the members declared in this
1912
  /// context are semantically declared in the nearest enclosing
1913
  /// non-transparent (opaque) context but are lexically declared in
1914
  /// this context. For example, consider the enumerators of an
1915
  /// enumeration type:
1916
  /// @code
1917
  /// enum E {
1918
  ///   Val1
1919
  /// };
1920
  /// @endcode
1921
  /// Here, E is a transparent context, so its enumerator (Val1) will
1922
  /// appear (semantically) that it is in the same context of E.
1923
  /// Examples of transparent contexts include: enumerations (except for
1924
  /// C++0x scoped enums), and C++ linkage specifications.
1925
  bool isTransparentContext() const;
1926
1927
  /// Determines whether this context or some of its ancestors is a
1928
  /// linkage specification context that specifies C linkage.
1929
  bool isExternCContext() const;
1930
1931
  /// Retrieve the nearest enclosing C linkage specification context.
1932
  const LinkageSpecDecl *getExternCContext() const;
1933
1934
  /// Determines whether this context or some of its ancestors is a
1935
  /// linkage specification context that specifies C++ linkage.
1936
  bool isExternCXXContext() const;
1937
1938
  /// Determine whether this declaration context is equivalent
1939
  /// to the declaration context DC.
1940
285M
  bool Equals(const DeclContext *DC) const {
1941
285M
    return DC && 
this->getPrimaryContext() == DC->getPrimaryContext()274M
;
1942
285M
  }
1943
1944
  /// Determine whether this declaration context encloses the
1945
  /// declaration context DC.
1946
  bool Encloses(const DeclContext *DC) const;
1947
1948
  /// Find the nearest non-closure ancestor of this context,
1949
  /// i.e. the innermost semantic parent of this context which is not
1950
  /// a closure.  A context may be its own non-closure ancestor.
1951
  Decl *getNonClosureAncestor();
1952
0
  const Decl *getNonClosureAncestor() const {
1953
0
    return const_cast<DeclContext*>(this)->getNonClosureAncestor();
1954
0
  }
1955
1956
  /// getPrimaryContext - There may be many different
1957
  /// declarations of the same entity (including forward declarations
1958
  /// of classes, multiple definitions of namespaces, etc.), each with
1959
  /// a different set of declarations. This routine returns the
1960
  /// "primary" DeclContext structure, which will contain the
1961
  /// information needed to perform name lookup into this context.
1962
  DeclContext *getPrimaryContext();
1963
807M
  const DeclContext *getPrimaryContext() const {
1964
807M
    return const_cast<DeclContext*>(this)->getPrimaryContext();
1965
807M
  }
1966
1967
  /// getRedeclContext - Retrieve the context in which an entity conflicts with
1968
  /// other entities of the same name, or where it is a redeclaration if the
1969
  /// two entities are compatible. This skips through transparent contexts.
1970
  DeclContext *getRedeclContext();
1971
355M
  const DeclContext *getRedeclContext() const {
1972
355M
    return const_cast<DeclContext *>(this)->getRedeclContext();
1973
355M
  }
1974
1975
  /// Retrieve the nearest enclosing namespace context.
1976
  DeclContext *getEnclosingNamespaceContext();
1977
16.7k
  const DeclContext *getEnclosingNamespaceContext() const {
1978
16.7k
    return const_cast<DeclContext *>(this)->getEnclosingNamespaceContext();
1979
16.7k
  }
1980
1981
  /// Retrieve the outermost lexically enclosing record context.
1982
  RecordDecl *getOuterLexicalRecordContext();
1983
0
  const RecordDecl *getOuterLexicalRecordContext() const {
1984
0
    return const_cast<DeclContext *>(this)->getOuterLexicalRecordContext();
1985
0
  }
1986
1987
  /// Test if this context is part of the enclosing namespace set of
1988
  /// the context NS, as defined in C++0x [namespace.def]p9. If either context
1989
  /// isn't a namespace, this is equivalent to Equals().
1990
  ///
1991
  /// The enclosing namespace set of a namespace is the namespace and, if it is
1992
  /// inline, its enclosing namespace, recursively.
1993
  bool InEnclosingNamespaceSetOf(const DeclContext *NS) const;
1994
1995
  /// Collects all of the declaration contexts that are semantically
1996
  /// connected to this declaration context.
1997
  ///
1998
  /// For declaration contexts that have multiple semantically connected but
1999
  /// syntactically distinct contexts, such as C++ namespaces, this routine
2000
  /// retrieves the complete set of such declaration contexts in source order.
2001
  /// For example, given:
2002
  ///
2003
  /// \code
2004
  /// namespace N {
2005
  ///   int x;
2006
  /// }
2007
  /// namespace N {
2008
  ///   int y;
2009
  /// }
2010
  /// \endcode
2011
  ///
2012
  /// The \c Contexts parameter will contain both definitions of N.
2013
  ///
2014
  /// \param Contexts Will be cleared and set to the set of declaration
2015
  /// contexts that are semanticaly connected to this declaration context,
2016
  /// in source order, including this context (which may be the only result,
2017
  /// for non-namespace contexts).
2018
  void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts);
2019
2020
  /// decl_iterator - Iterates through the declarations stored
2021
  /// within this context.
2022
  class decl_iterator {
2023
    /// Current - The current declaration.
2024
    Decl *Current = nullptr;
2025
2026
  public:
2027
    using value_type = Decl *;
2028
    using reference = const value_type &;
2029
    using pointer = const value_type *;
2030
    using iterator_category = std::forward_iterator_tag;
2031
    using difference_type = std::ptrdiff_t;
2032
2033
21.7M
    decl_iterator() = default;
2034
21.3M
    explicit decl_iterator(Decl *C) : Current(C) {}
2035
2036
171M
    reference operator*() const { return Current; }
2037
2038
    // This doesn't meet the iterator requirements, but it's convenient
2039
32.9k
    value_type operator->() const { return Current; }
2040
2041
87.3M
    decl_iterator& operator++() {
2042
87.3M
      Current = Current->getNextDeclInContext();
2043
87.3M
      return *this;
2044
87.3M
    }
2045
2046
41
    decl_iterator operator++(int) {
2047
41
      decl_iterator tmp(*this);
2048
41
      ++(*this);
2049
41
      return tmp;
2050
41
    }
2051
2052
927k
    friend bool operator==(decl_iterator x, decl_iterator y) {
2053
927k
      return x.Current == y.Current;
2054
927k
    }
2055
2056
67.8M
    friend bool operator!=(decl_iterator x, decl_iterator y) {
2057
67.8M
      return x.Current != y.Current;
2058
67.8M
    }
2059
  };
2060
2061
  using decl_range = llvm::iterator_range<decl_iterator>;
2062
2063
  /// decls_begin/decls_end - Iterate over the declarations stored in
2064
  /// this context.
2065
10.2M
  decl_range decls() const { return decl_range(decls_begin(), decls_end()); }
2066
  decl_iterator decls_begin() const;
2067
13.6M
  decl_iterator decls_end() const { return decl_iterator(); }
2068
  bool decls_empty() const;
2069
2070
  /// noload_decls_begin/end - Iterate over the declarations stored in this
2071
  /// context that are currently loaded; don't attempt to retrieve anything
2072
  /// from an external source.
2073
1.69M
  decl_range noload_decls() const {
2074
1.69M
    return decl_range(noload_decls_begin(), noload_decls_end());
2075
1.69M
  }
2076
1.69M
  decl_iterator noload_decls_begin() const { return decl_iterator(FirstDecl); }
2077
1.69M
  decl_iterator noload_decls_end() const { return decl_iterator(); }
2078
2079
  /// specific_decl_iterator - Iterates over a subrange of
2080
  /// declarations stored in a DeclContext, providing only those that
2081
  /// are of type SpecificDecl (or a class derived from it). This
2082
  /// iterator is used, for example, to provide iteration over just
2083
  /// the fields within a RecordDecl (with SpecificDecl = FieldDecl).
2084
  template<typename SpecificDecl>
2085
  class specific_decl_iterator {
2086
    /// Current - The current, underlying declaration iterator, which
2087
    /// will either be NULL or will point to a declaration of
2088
    /// type SpecificDecl.
2089
    DeclContext::decl_iterator Current;
2090
2091
    /// SkipToNextDecl - Advances the current position up to the next
2092
    /// declaration of type SpecificDecl that also meets the criteria
2093
    /// required by Acceptable.
2094
32.1M
    void SkipToNextDecl() {
2095
70.5M
      while (*Current && 
!isa<SpecificDecl>(*Current)52.4M
)
2096
38.4M
        ++Current;
2097
32.1M
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::SkipToNextDecl()
Line
Count
Source
2094
376k
    void SkipToNextDecl() {
2095
376k
      while (*Current && 
!isa<SpecificDecl>(*Current)247k
)
2096
13
        ++Current;
2097
376k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::SkipToNextDecl()
Line
Count
Source
2094
21.3M
    void SkipToNextDecl() {
2095
45.7M
      while (*Current && 
!isa<SpecificDecl>(*Current)33.9M
)
2096
24.3M
        ++Current;
2097
21.3M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::SkipToNextDecl()
Line
Count
Source
2094
7.75M
    void SkipToNextDecl() {
2095
15.9M
      while (*Current && 
!isa<SpecificDecl>(*Current)11.1M
)
2096
8.22M
        ++Current;
2097
7.75M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::SkipToNextDecl()
Line
Count
Source
2094
20.4k
    void SkipToNextDecl() {
2095
85.1k
      while (*Current && 
!isa<SpecificDecl>(*Current)76.0k
)
2096
64.6k
        ++Current;
2097
20.4k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::SkipToNextDecl()
Line
Count
Source
2094
1.32M
    void SkipToNextDecl() {
2095
5.13M
      while (*Current && 
!isa<SpecificDecl>(*Current)4.46M
)
2096
3.81M
        ++Current;
2097
1.32M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::SkipToNextDecl()
Line
Count
Source
2094
131k
    void SkipToNextDecl() {
2095
265k
      while (*Current && 
!isa<SpecificDecl>(*Current)183k
)
2096
133k
        ++Current;
2097
131k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::SkipToNextDecl()
Line
Count
Source
2094
890k
    void SkipToNextDecl() {
2095
2.68M
      while (*Current && 
!isa<SpecificDecl>(*Current)2.28M
)
2096
1.79M
        ++Current;
2097
890k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::SkipToNextDecl()
Line
Count
Source
2094
27.0k
    void SkipToNextDecl() {
2095
35.7k
      while (*Current && 
!isa<SpecificDecl>(*Current)25.6k
)
2096
8.73k
        ++Current;
2097
27.0k
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::SkipToNextDecl()
Line
Count
Source
2094
5
    void SkipToNextDecl() {
2095
6
      while (*Current && 
!isa<SpecificDecl>(*Current)4
)
2096
1
        ++Current;
2097
5
    }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::SkipToNextDecl()
Line
Count
Source
2094
28
    void SkipToNextDecl() {
2095
54
      while (*Current && 
!isa<SpecificDecl>(*Current)40
)
2096
26
        ++Current;
2097
28
    }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::SkipToNextDecl()
Line
Count
Source
2094
161k
    void SkipToNextDecl() {
2095
163k
      while (*Current && 
!isa<SpecificDecl>(*Current)81.9k
)
2096
2.69k
        ++Current;
2097
161k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::SkipToNextDecl()
Line
Count
Source
2094
282
    void SkipToNextDecl() {
2095
2.82k
      while (*Current && 
!isa<SpecificDecl>(*Current)2.64k
)
2096
2.54k
        ++Current;
2097
282
    }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::SkipToNextDecl()
Line
Count
Source
2094
16.5k
    void SkipToNextDecl() {
2095
40.3k
      while (*Current && 
!isa<SpecificDecl>(*Current)24.0k
)
2096
23.8k
        ++Current;
2097
16.5k
    }
2098
2099
  public:
2100
    using value_type = SpecificDecl *;
2101
    // TODO: Add reference and pointer types (with some appropriate proxy type)
2102
    // if we ever have a need for them.
2103
    using reference = void;
2104
    using pointer = void;
2105
    using difference_type =
2106
        std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2107
    using iterator_category = std::forward_iterator_tag;
2108
2109
604k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator()
Line
Count
Source
2109
343k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator()
Line
Count
Source
2109
261k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator()
Line
Count
Source
2109
18
    specific_decl_iterator() = default;
2110
2111
    /// specific_decl_iterator - Construct a new iterator over a
2112
    /// subset of the declarations the range [C,
2113
    /// end-of-declarations). If A is non-NULL, it is a pointer to a
2114
    /// member function of SpecificDecl that should return true for
2115
    /// all of the SpecificDecl instances that will be in the subset
2116
    /// of iterators. For example, if you want Objective-C instance
2117
    /// methods, SpecificDecl will be ObjCMethodDecl and A will be
2118
    /// &ObjCMethodDecl::isInstanceMethod.
2119
18.3M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
18.3M
      SkipToNextDecl();
2121
18.3M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
844k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
844k
      SkipToNextDecl();
2121
844k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
11.7M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
11.7M
      SkipToNextDecl();
2121
11.7M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
87.0k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
87.0k
      SkipToNextDecl();
2121
87.0k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
400k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
400k
      SkipToNextDecl();
2121
400k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
4.88M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
4.88M
      SkipToNextDecl();
2121
4.88M
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
210k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
210k
      SkipToNextDecl();
2121
210k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
10.1k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
10.1k
      SkipToNextDecl();
2121
10.1k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
11.1k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
11.1k
      SkipToNextDecl();
2121
11.1k
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
2
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
2
      SkipToNextDecl();
2121
2
    }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
28
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
28
      SkipToNextDecl();
2121
28
    }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
81.9k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
81.9k
      SkipToNextDecl();
2121
81.9k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
178
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
178
      SkipToNextDecl();
2121
178
    }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2119
16.3k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2120
16.3k
      SkipToNextDecl();
2121
16.3k
    }
2122
2123
12.5M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator*() const
Line
Count
Source
2123
581k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator*() const
Line
Count
Source
2123
8.19M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator*() const
Line
Count
Source
2123
49.4k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator*() const
Line
Count
Source
2123
489k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator*() const
Line
Count
Source
2123
2.93M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator*() const
Line
Count
Source
2123
168k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator*() const
Line
Count
Source
2123
16.8k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator*() const
Line
Count
Source
2123
11.3k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator*() const
Line
Count
Source
2123
6
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator*() const
Line
Count
Source
2123
14
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator*() const
Line
Count
Source
2123
79.2k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator*() const
Line
Count
Source
2123
104
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::operator*() const
Line
Count
Source
2123
205
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
2124
2125
    // This doesn't meet the iterator requirements, but it's convenient
2126
2.15M
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator->() const
Line
Count
Source
2126
2.12k
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator->() const
Line
Count
Source
2126
2.15M
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator->() const
Line
Count
Source
2126
3
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator->() const
Line
Count
Source
2126
14
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator->() const
Line
Count
Source
2126
98
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator->() const
Line
Count
Source
2126
104
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator->() const
Line
Count
Source
2126
57
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator->() const
Line
Count
Source
2126
9
    value_type operator->() const { return **this; }
2127
2128
13.8M
    specific_decl_iterator& operator++() {
2129
13.8M
      ++Current;
2130
13.8M
      SkipToNextDecl();
2131
13.8M
      return *this;
2132
13.8M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator++()
Line
Count
Source
2128
482k
    specific_decl_iterator& operator++() {
2129
482k
      ++Current;
2130
482k
      SkipToNextDecl();
2131
482k
      return *this;
2132
482k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator++()
Line
Count
Source
2128
9.63M
    specific_decl_iterator& operator++() {
2129
9.63M
      ++Current;
2130
9.63M
      SkipToNextDecl();
2131
9.63M
      return *this;
2132
9.63M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator++()
Line
Count
Source
2128
44.8k
    specific_decl_iterator& operator++() {
2129
44.8k
      ++Current;
2130
44.8k
      SkipToNextDecl();
2131
44.8k
      return *this;
2132
44.8k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator++()
Line
Count
Source
2128
489k
    specific_decl_iterator& operator++() {
2129
489k
      ++Current;
2130
489k
      SkipToNextDecl();
2131
489k
      return *this;
2132
489k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator++()
Line
Count
Source
2128
2.87M
    specific_decl_iterator& operator++() {
2129
2.87M
      ++Current;
2130
2.87M
      SkipToNextDecl();
2131
2.87M
      return *this;
2132
2.87M
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator++()
Line
Count
Source
2128
166k
    specific_decl_iterator& operator++() {
2129
166k
      ++Current;
2130
166k
      SkipToNextDecl();
2131
166k
      return *this;
2132
166k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator++()
Line
Count
Source
2128
16.8k
    specific_decl_iterator& operator++() {
2129
16.8k
      ++Current;
2130
16.8k
      SkipToNextDecl();
2131
16.8k
      return *this;
2132
16.8k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator++()
Line
Count
Source
2128
9.30k
    specific_decl_iterator& operator++() {
2129
9.30k
      ++Current;
2130
9.30k
      SkipToNextDecl();
2131
9.30k
      return *this;
2132
9.30k
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator++()
Line
Count
Source
2128
3
    specific_decl_iterator& operator++() {
2129
3
      ++Current;
2130
3
      SkipToNextDecl();
2131
3
      return *this;
2132
3
    }
Unexecuted instantiation: clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator++()
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator++()
Line
Count
Source
2128
79.2k
    specific_decl_iterator& operator++() {
2129
79.2k
      ++Current;
2130
79.2k
      SkipToNextDecl();
2131
79.2k
      return *this;
2132
79.2k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator++()
Line
Count
Source
2128
104
    specific_decl_iterator& operator++() {
2129
104
      ++Current;
2130
104
      SkipToNextDecl();
2131
104
      return *this;
2132
104
    }
clang::DeclContext::specific_decl_iterator<clang::TypeDecl>::operator++()
Line
Count
Source
2128
205
    specific_decl_iterator& operator++() {
2129
205
      ++Current;
2130
205
      SkipToNextDecl();
2131
205
      return *this;
2132
205
    }
2133
2134
6.87k
    specific_decl_iterator operator++(int) {
2135
6.87k
      specific_decl_iterator tmp(*this);
2136
6.87k
      ++(*this);
2137
6.87k
      return tmp;
2138
6.87k
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator++(int)
Line
Count
Source
2134
6.87k
    specific_decl_iterator operator++(int) {
2135
6.87k
      specific_decl_iterator tmp(*this);
2136
6.87k
      ++(*this);
2137
6.87k
      return tmp;
2138
6.87k
    }
Unexecuted instantiation: clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator++(int)
2139
2140
    friend bool operator==(const specific_decl_iterator& x,
2141
927k
                           const specific_decl_iterator& y) {
2142
927k
      return x.Current == y.Current;
2143
927k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&)
Line
Count
Source
2141
584k
                           const specific_decl_iterator& y) {
2142
584k
      return x.Current == y.Current;
2143
584k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&)
Line
Count
Source
2141
260k
                           const specific_decl_iterator& y) {
2142
260k
      return x.Current == y.Current;
2143
260k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&)
Line
Count
Source
2141
81.2k
                           const specific_decl_iterator& y) {
2142
81.2k
      return x.Current == y.Current;
2143
81.2k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&)
Line
Count
Source
2141
12
                           const specific_decl_iterator& y) {
2142
12
      return x.Current == y.Current;
2143
12
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&)
Line
Count
Source
2141
32
                           const specific_decl_iterator& y) {
2142
32
      return x.Current == y.Current;
2143
32
    }
2144
2145
    friend bool operator!=(const specific_decl_iterator& x,
2146
20.8M
                           const specific_decl_iterator& y) {
2147
20.8M
      return x.Current != y.Current;
2148
20.8M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&)
Line
Count
Source
2146
625k
                           const specific_decl_iterator& y) {
2147
625k
      return x.Current != y.Current;
2148
625k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&)
Line
Count
Source
2146
13.7M
                           const specific_decl_iterator& y) {
2147
13.7M
      return x.Current != y.Current;
2148
13.7M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&)
Line
Count
Source
2146
88.3k
                           const specific_decl_iterator& y) {
2147
88.3k
      return x.Current != y.Current;
2148
88.3k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&)
Line
Count
Source
2146
689k
                           const specific_decl_iterator& y) {
2147
689k
      return x.Current != y.Current;
2148
689k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&)
Line
Count
Source
2146
5.31M
                           const specific_decl_iterator& y) {
2147
5.31M
      return x.Current != y.Current;
2148
5.31M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&)
Line
Count
Source
2146
189k
                           const specific_decl_iterator& y) {
2147
189k
      return x.Current != y.Current;
2148
189k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&)
Line
Count
Source
2146
21.9k
                           const specific_decl_iterator& y) {
2147
21.9k
      return x.Current != y.Current;
2148
21.9k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&)
Line
Count
Source
2146
14.8k
                           const specific_decl_iterator& y) {
2147
14.8k
      return x.Current != y.Current;
2148
14.8k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&, clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&)
Line
Count
Source
2146
4
                           const specific_decl_iterator& y) {
2147
4
      return x.Current != y.Current;
2148
4
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&)
Line
Count
Source
2146
14
                           const specific_decl_iterator& y) {
2147
14
      return x.Current != y.Current;
2148
14
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&)
Line
Count
Source
2146
120k
                           const specific_decl_iterator& y) {
2147
120k
      return x.Current != y.Current;
2148
120k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&)
Line
Count
Source
2146
193
                           const specific_decl_iterator& y) {
2147
193
      return x.Current != y.Current;
2148
193
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::TypeDecl> const&, clang::DeclContext::specific_decl_iterator<clang::TypeDecl> const&)
Line
Count
Source
2146
8.37k
                           const specific_decl_iterator& y) {
2147
8.37k
      return x.Current != y.Current;
2148
8.37k
    }
2149
  };
2150
2151
  /// Iterates over a filtered subrange of declarations stored
2152
  /// in a DeclContext.
2153
  ///
2154
  /// This iterator visits only those declarations that are of type
2155
  /// SpecificDecl (or a class derived from it) and that meet some
2156
  /// additional run-time criteria. This iterator is used, for
2157
  /// example, to provide access to the instance methods within an
2158
  /// Objective-C interface (with SpecificDecl = ObjCMethodDecl and
2159
  /// Acceptable = ObjCMethodDecl::isInstanceMethod).
2160
  template<typename SpecificDecl, bool (SpecificDecl::*Acceptable)() const>
2161
  class filtered_decl_iterator {
2162
    /// Current - The current, underlying declaration iterator, which
2163
    /// will either be NULL or will point to a declaration of
2164
    /// type SpecificDecl.
2165
    DeclContext::decl_iterator Current;
2166
2167
    /// SkipToNextDecl - Advances the current position up to the next
2168
    /// declaration of type SpecificDecl that also meets the criteria
2169
    /// required by Acceptable.
2170
274k
    void SkipToNextDecl() {
2171
461k
      while (*Current &&
2172
321k
             (!isa<SpecificDecl>(*Current) ||
2173
251k
              (Acceptable && !(cast<SpecificDecl>(*Current)->*Acceptable)())))
2174
187k
        ++Current;
2175
274k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::SkipToNextDecl()
Line
Count
Source
2170
11.6k
    void SkipToNextDecl() {
2171
24.4k
      while (*Current &&
2172
19.9k
             (!isa<SpecificDecl>(*Current) ||
2173
7.45k
              (Acceptable && !(cast<SpecificDecl>(*Current)->*Acceptable)())))
2174
12.7k
        ++Current;
2175
11.6k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::SkipToNextDecl()
Line
Count
Source
2170
1.45k
    void SkipToNextDecl() {
2171
7.81k
      while (*Current &&
2172
7.25k
             (!isa<SpecificDecl>(*Current) ||
2173
1.77k
              (Acceptable && !(cast<SpecificDecl>(*Current)->*Acceptable)())))
2174
6.36k
        ++Current;
2175
1.45k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::SkipToNextDecl()
Line
Count
Source
2170
179k
    void SkipToNextDecl() {
2171
227k
      while (*Current &&
2172
155k
             (!isa<SpecificDecl>(*Current) ||
2173
127k
              (Acceptable && !(cast<SpecificDecl>(*Current)->*Acceptable)())))
2174
48.4k
        ++Current;
2175
179k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::SkipToNextDecl()
Line
Count
Source
2170
81.8k
    void SkipToNextDecl() {
2171
201k
      while (*Current &&
2172
138k
             (!isa<SpecificDecl>(*Current) ||
2173
115k
              (Acceptable && !(cast<SpecificDecl>(*Current)->*Acceptable)())))
2174
119k
        ++Current;
2175
81.8k
    }
2176
2177
  public:
2178
    using value_type = SpecificDecl *;
2179
    // TODO: Add reference and pointer types (with some appropriate proxy type)
2180
    // if we ever have a need for them.
2181
    using reference = void;
2182
    using pointer = void;
2183
    using difference_type =
2184
        std::iterator_traits<DeclContext::decl_iterator>::difference_type;
2185
    using iterator_category = std::forward_iterator_tag;
2186
2187
    filtered_decl_iterator() = default;
2188
2189
    /// filtered_decl_iterator - Construct a new iterator over a
2190
    /// subset of the declarations the range [C,
2191
    /// end-of-declarations). If A is non-NULL, it is a pointer to a
2192
    /// member function of SpecificDecl that should return true for
2193
    /// all of the SpecificDecl instances that will be in the subset
2194
    /// of iterators. For example, if you want Objective-C instance
2195
    /// methods, SpecificDecl will be ObjCMethodDecl and A will be
2196
    /// &ObjCMethodDecl::isInstanceMethod.
2197
143k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2198
143k
      SkipToNextDecl();
2199
143k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2197
72.4k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2198
72.4k
      SkipToNextDecl();
2199
72.4k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2197
6.50k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2198
6.50k
      SkipToNextDecl();
2199
6.50k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2197
1.11k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2198
1.11k
      SkipToNextDecl();
2199
1.11k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
2197
62.9k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
2198
62.9k
      SkipToNextDecl();
2199
62.9k
    }
2200
2201
133k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator*() const
Line
Count
Source
2201
7.16k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator*() const
Line
Count
Source
2201
893
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator*() const
Line
Count
Source
2201
107k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator*() const
Line
Count
Source
2201
18.8k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
2202
    value_type operator->() const { return cast<SpecificDecl>(*Current); }
2203
2204
131k
    filtered_decl_iterator& operator++() {
2205
131k
      ++Current;
2206
131k
      SkipToNextDecl();
2207
131k
      return *this;
2208
131k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator++()
Line
Count
Source
2204
5.15k
    filtered_decl_iterator& operator++() {
2205
5.15k
      ++Current;
2206
5.15k
      SkipToNextDecl();
2207
5.15k
      return *this;
2208
5.15k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator++()
Line
Count
Source
2204
345
    filtered_decl_iterator& operator++() {
2205
345
      ++Current;
2206
345
      SkipToNextDecl();
2207
345
      return *this;
2208
345
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator++()
Line
Count
Source
2204
106k
    filtered_decl_iterator& operator++() {
2205
106k
      ++Current;
2206
106k
      SkipToNextDecl();
2207
106k
      return *this;
2208
106k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator++()
Line
Count
Source
2204
18.8k
    filtered_decl_iterator& operator++() {
2205
18.8k
      ++Current;
2206
18.8k
      SkipToNextDecl();
2207
18.8k
      return *this;
2208
18.8k
    }
2209
2210
    filtered_decl_iterator operator++(int) {
2211
      filtered_decl_iterator tmp(*this);
2212
      ++(*this);
2213
      return tmp;
2214
    }
2215
2216
    friend bool operator==(const filtered_decl_iterator& x,
2217
81
                           const filtered_decl_iterator& y) {
2218
81
      return x.Current == y.Current;
2219
81
    }
clang::operator==(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&)
Line
Count
Source
2217
77
                           const filtered_decl_iterator& y) {
2218
77
      return x.Current == y.Current;
2219
77
    }
clang::operator==(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&)
Line
Count
Source
2217
4
                           const filtered_decl_iterator& y) {
2218
4
      return x.Current == y.Current;
2219
4
    }
2220
2221
    friend bool operator!=(const filtered_decl_iterator& x,
2222
202k
                           const filtered_decl_iterator& y) {
2223
202k
      return x.Current != y.Current;
2224
202k
    }
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)> const&)
Line
Count
Source
2222
8.50k
                           const filtered_decl_iterator& y) {
2223
8.50k
      return x.Current != y.Current;
2224
8.50k
    }
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)> const&)
Line
Count
Source
2222
900
                           const filtered_decl_iterator& y) {
2223
900
      return x.Current != y.Current;
2224
900
    }
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)> const&)
Line
Count
Source
2222
143k
                           const filtered_decl_iterator& y) {
2223
143k
      return x.Current != y.Current;
2224
143k
    }
clang::operator!=(clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&, clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)> const&)
Line
Count
Source
2222
50.3k
                           const filtered_decl_iterator& y) {
2223
50.3k
      return x.Current != y.Current;
2224
50.3k
    }
2225
  };
2226
2227
  /// Add the declaration D into this context.
2228
  ///
2229
  /// This routine should be invoked when the declaration D has first
2230
  /// been declared, to place D into the context where it was
2231
  /// (lexically) defined. Every declaration must be added to one
2232
  /// (and only one!) context, where it can be visited via
2233
  /// [decls_begin(), decls_end()). Once a declaration has been added
2234
  /// to its lexical context, the corresponding DeclContext owns the
2235
  /// declaration.
2236
  ///
2237
  /// If D is also a NamedDecl, it will be made visible within its
2238
  /// semantic context via makeDeclVisibleInContext.
2239
  void addDecl(Decl *D);
2240
2241
  /// Add the declaration D into this context, but suppress
2242
  /// searches for external declarations with the same name.
2243
  ///
2244
  /// Although analogous in function to addDecl, this removes an
2245
  /// important check.  This is only useful if the Decl is being
2246
  /// added in response to an external search; in all other cases,
2247
  /// addDecl() is the right function to use.
2248
  /// See the ASTImporter for use cases.
2249
  void addDeclInternal(Decl *D);
2250
2251
  /// Add the declaration D to this context without modifying
2252
  /// any lookup tables.
2253
  ///
2254
  /// This is useful for some operations in dependent contexts where
2255
  /// the semantic context might not be dependent;  this basically
2256
  /// only happens with friends.
2257
  void addHiddenDecl(Decl *D);
2258
2259
  /// Removes a declaration from this context.
2260
  void removeDecl(Decl *D);
2261
2262
  /// Checks whether a declaration is in this context.
2263
  bool containsDecl(Decl *D) const;
2264
2265
  /// Checks whether a declaration is in this context.
2266
  /// This also loads the Decls from the external source before the check.
2267
  bool containsDeclAndLoad(Decl *D) const;
2268
2269
  using lookup_result = DeclContextLookupResult;
2270
  using lookup_iterator = lookup_result::iterator;
2271
2272
  /// lookup - Find the declarations (if any) with the given Name in
2273
  /// this context. Returns a range of iterators that contains all of
2274
  /// the declarations with this name, with object, function, member,
2275
  /// and enumerator names preceding any tag name. Note that this
2276
  /// routine will not look into parent contexts.
2277
  lookup_result lookup(DeclarationName Name) const;
2278
2279
  /// Find the declarations with the given name that are visible
2280
  /// within this context; don't attempt to retrieve anything from an
2281
  /// external source.
2282
  lookup_result noload_lookup(DeclarationName Name);
2283
2284
  /// A simplistic name lookup mechanism that performs name lookup
2285
  /// into this declaration context without consulting the external source.
2286
  ///
2287
  /// This function should almost never be used, because it subverts the
2288
  /// usual relationship between a DeclContext and the external source.
2289
  /// See the ASTImporter for the (few, but important) use cases.
2290
  ///
2291
  /// FIXME: This is very inefficient; replace uses of it with uses of
2292
  /// noload_lookup.
2293
  void localUncachedLookup(DeclarationName Name,
2294
                           SmallVectorImpl<NamedDecl *> &Results);
2295
2296
  /// Makes a declaration visible within this context.
2297
  ///
2298
  /// This routine makes the declaration D visible to name lookup
2299
  /// within this context and, if this is a transparent context,
2300
  /// within its parent contexts up to the first enclosing
2301
  /// non-transparent context. Making a declaration visible within a
2302
  /// context does not transfer ownership of a declaration, and a
2303
  /// declaration can be visible in many contexts that aren't its
2304
  /// lexical context.
2305
  ///
2306
  /// If D is a redeclaration of an existing declaration that is
2307
  /// visible from this context, as determined by
2308
  /// NamedDecl::declarationReplaces, the previous declaration will be
2309
  /// replaced with D.
2310
  void makeDeclVisibleInContext(NamedDecl *D);
2311
2312
  /// all_lookups_iterator - An iterator that provides a view over the results
2313
  /// of looking up every possible name.
2314
  class all_lookups_iterator;
2315
2316
  using lookups_range = llvm::iterator_range<all_lookups_iterator>;
2317
2318
  lookups_range lookups() const;
2319
  // Like lookups(), but avoids loading external declarations.
2320
  // If PreserveInternalState, avoids building lookup data structures too.
2321
  lookups_range noload_lookups(bool PreserveInternalState) const;
2322
2323
  /// Iterators over all possible lookups within this context.
2324
  all_lookups_iterator lookups_begin() const;
2325
  all_lookups_iterator lookups_end() const;
2326
2327
  /// Iterators over all possible lookups within this context that are
2328
  /// currently loaded; don't attempt to retrieve anything from an external
2329
  /// source.
2330
  all_lookups_iterator noload_lookups_begin() const;
2331
  all_lookups_iterator noload_lookups_end() const;
2332
2333
  struct udir_iterator;
2334
2335
  using udir_iterator_base =
2336
      llvm::iterator_adaptor_base<udir_iterator, lookup_iterator,
2337
                                  std::random_access_iterator_tag,
2338
                                  UsingDirectiveDecl *>;
2339
2340
  struct udir_iterator : udir_iterator_base {
2341
106M
    udir_iterator(lookup_iterator I) : udir_iterator_base(I) {}
2342
2343
    UsingDirectiveDecl *operator*() const;
2344
  };
2345
2346
  using udir_range = llvm::iterator_range<udir_iterator>;
2347
2348
  udir_range using_directives() const;
2349
2350
  // These are all defined in DependentDiagnostic.h.
2351
  class ddiag_iterator;
2352
2353
  using ddiag_range = llvm::iterator_range<DeclContext::ddiag_iterator>;
2354
2355
  inline ddiag_range ddiags() const;
2356
2357
  // Low-level accessors
2358
2359
  /// Mark that there are external lexical declarations that we need
2360
  /// to include in our lookup table (and that are not available as external
2361
  /// visible lookups). These extra lookup results will be found by walking
2362
  /// the lexical declarations of this context. This should be used only if
2363
  /// setHasExternalLexicalStorage() has been called on any decl context for
2364
  /// which this is the primary context.
2365
38.0k
  void setMustBuildLookupTable() {
2366
38.0k
    assert(this == getPrimaryContext() &&
2367
38.0k
           "should only be called on primary context");
2368
38.0k
    DeclContextBits.HasLazyExternalLexicalLookups = true;
2369
38.0k
  }
2370
2371
  /// Retrieve the internal representation of the lookup structure.
2372
  /// This may omit some names if we are lazily building the structure.
2373
900k
  StoredDeclsMap *getLookupPtr() const { return LookupPtr; }
2374
2375
  /// Ensure the lookup structure is fully-built and return it.
2376
  StoredDeclsMap *buildLookup();
2377
2378
  /// Whether this DeclContext has external storage containing
2379
  /// additional declarations that are lexically in this context.
2380
24.5M
  bool hasExternalLexicalStorage() const {
2381
24.5M
    return DeclContextBits.ExternalLexicalStorage;
2382
24.5M
  }
2383
2384
  /// State whether this DeclContext has external storage for
2385
  /// declarations lexically in this context.
2386
27.8M
  void setHasExternalLexicalStorage(bool ES = true) const {
2387
27.8M
    DeclContextBits.ExternalLexicalStorage = ES;
2388
27.8M
  }
2389
2390
  /// Whether this DeclContext has external storage containing
2391
  /// additional declarations that are visible in this context.
2392
184M
  bool hasExternalVisibleStorage() const {
2393
184M
    return DeclContextBits.ExternalVisibleStorage;
2394
184M
  }
2395
2396
  /// State whether this DeclContext has external storage for
2397
  /// declarations visible in this context.
2398
27.3M
  void setHasExternalVisibleStorage(bool ES = true) const {
2399
27.3M
    DeclContextBits.ExternalVisibleStorage = ES;
2400
27.3M
    if (ES && 
LookupPtr916k
)
2401
42.2k
      DeclContextBits.NeedToReconcileExternalVisibleStorage = true;
2402
27.3M
  }
2403
2404
  /// Determine whether the given declaration is stored in the list of
2405
  /// declarations lexically within this context.
2406
318k
  bool isDeclInLexicalTraversal(const Decl *D) const {
2407
318k
    return D && (D->NextInContextAndBits.getPointer() || 
D == FirstDecl317k
||
2408
316k
                 D == LastDecl);
2409
318k
  }
2410
2411
56.4M
  bool setUseQualifiedLookup(bool use = true) const {
2412
56.4M
    bool old_value = DeclContextBits.UseQualifiedLookup;
2413
56.4M
    DeclContextBits.UseQualifiedLookup = use;
2414
56.4M
    return old_value;
2415
56.4M
  }
2416
2417
0
  bool shouldUseQualifiedLookup() const {
2418
0
    return DeclContextBits.UseQualifiedLookup;
2419
0
  }
2420
2421
  static bool classof(const Decl *D);
2422
0
  static bool classof(const DeclContext *D) { return true; }
2423
2424
  void dumpDeclContext() const;
2425
  void dumpLookups() const;
2426
  void dumpLookups(llvm::raw_ostream &OS, bool DumpDecls = false,
2427
                   bool Deserialize = false) const;
2428
2429
private:
2430
  /// Whether this declaration context has had externally visible
2431
  /// storage added since the last lookup. In this case, \c LookupPtr's
2432
  /// invariant may not hold and needs to be fixed before we perform
2433
  /// another lookup.
2434
7.97M
  bool hasNeedToReconcileExternalVisibleStorage() const {
2435
7.97M
    return DeclContextBits.NeedToReconcileExternalVisibleStorage;
2436
7.97M
  }
2437
2438
  /// State that this declaration context has had externally visible
2439
  /// storage added since the last lookup. In this case, \c LookupPtr's
2440
  /// invariant may not hold and needs to be fixed before we perform
2441
  /// another lookup.
2442
26.4M
  void setNeedToReconcileExternalVisibleStorage(bool Need = true) const {
2443
26.4M
    DeclContextBits.NeedToReconcileExternalVisibleStorage = Need;
2444
26.4M
  }
2445
2446
  /// If \c true, this context may have local lexical declarations
2447
  /// that are missing from the lookup table.
2448
164M
  bool hasLazyLocalLexicalLookups() const {
2449
164M
    return DeclContextBits.HasLazyLocalLexicalLookups;
2450
164M
  }
2451
2452
  /// If \c true, this context may have local lexical declarations
2453
  /// that are missing from the lookup table.
2454
58.1M
  void setHasLazyLocalLexicalLookups(bool HasLLLL = true) const {
2455
58.1M
    DeclContextBits.HasLazyLocalLexicalLookups = HasLLLL;
2456
58.1M
  }
2457
2458
  /// If \c true, the external source may have lexical declarations
2459
  /// that are missing from the lookup table.
2460
161M
  bool hasLazyExternalLexicalLookups() const {
2461
161M
    return DeclContextBits.HasLazyExternalLexicalLookups;
2462
161M
  }
2463
2464
  /// If \c true, the external source may have lexical declarations
2465
  /// that are missing from the lookup table.
2466
26.4M
  void setHasLazyExternalLexicalLookups(bool HasLELL = true) const {
2467
26.4M
    DeclContextBits.HasLazyExternalLexicalLookups = HasLELL;
2468
26.4M
  }
2469
2470
  void reconcileExternalVisibleStorage() const;
2471
  bool LoadLexicalDeclsFromExternalStorage() const;
2472
2473
  /// Makes a declaration visible within this context, but
2474
  /// suppresses searches for external declarations with the same
2475
  /// name.
2476
  ///
2477
  /// Analogous to makeDeclVisibleInContext, but for the exclusive
2478
  /// use of addDeclInternal().
2479
  void makeDeclVisibleInContextInternal(NamedDecl *D);
2480
2481
  StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const;
2482
2483
  void loadLazyLocalLexicalLookups();
2484
  void buildLookupImpl(DeclContext *DCtx, bool Internal);
2485
  void makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal,
2486
                                         bool Rediscoverable);
2487
  void makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal);
2488
};
2489
2490
51.4M
inline bool Decl::isTemplateParameter() const {
2491
51.4M
  return getKind() == TemplateTypeParm || 
getKind() == NonTypeTemplateParm50.8M
||
2492
50.8M
         getKind() == TemplateTemplateParm;
2493
51.4M
}
2494
2495
// Specialization selected when ToTy is not a known subclass of DeclContext.
2496
template <class ToTy,
2497
          bool IsKnownSubtype = ::std::is_base_of<DeclContext, ToTy>::value>
2498
struct cast_convert_decl_context {
2499
321M
  static const ToTy *doit(const DeclContext *Val) {
2500
321M
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
2501
321M
  }
clang::cast_convert_decl_context<clang::Decl, false>::doit(clang::DeclContext const*)
Line
Count
Source
2499
318M
  static const ToTy *doit(const DeclContext *Val) {
2500
318M
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
2501
318M
  }
clang::cast_convert_decl_context<clang::NamedDecl, false>::doit(clang::DeclContext const*)
Line
Count
Source
2499
3.47M
  static const ToTy *doit(const DeclContext *Val) {
2500
3.47M
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
2501
3.47M
  }
Unexecuted instantiation: clang::cast_convert_decl_context<clang::TypedefNameDecl, false>::doit(clang::DeclContext const*)
clang::cast_convert_decl_context<clang::TypeDecl, false>::doit(clang::DeclContext const*)
Line
Count
Source
2499
115
  static const ToTy *doit(const DeclContext *Val) {
2500
115
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
2501
115
  }
2502
2503
1.72G
  static ToTy *doit(DeclContext *Val) {
2504
1.72G
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
2505
1.72G
  }
clang::cast_convert_decl_context<clang::Decl, false>::doit(clang::DeclContext*)
Line
Count
Source
2503
1.72G
  static ToTy *doit(DeclContext *Val) {
2504
1.72G
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
2505
1.72G
  }
clang::cast_convert_decl_context<clang::TypeDecl, false>::doit(clang::DeclContext*)
Line
Count
Source
2503
2.93k
  static ToTy *doit(DeclContext *Val) {
2504
2.93k
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
2505
2.93k
  }
clang::cast_convert_decl_context<clang::NamedDecl, false>::doit(clang::DeclContext*)
Line
Count
Source
2503
1.80M
  static ToTy *doit(DeclContext *Val) {
2504
1.80M
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
2505
1.80M
  }
Unexecuted instantiation: clang::cast_convert_decl_context<clang::VarTemplatePartialSpecializationDecl, false>::doit(clang::DeclContext*)
2506
};
2507
2508
// Specialization selected when ToTy is a known subclass of DeclContext.
2509
template <class ToTy>
2510
struct cast_convert_decl_context<ToTy, true> {
2511
308M
  static const ToTy *doit(const DeclContext *Val) {
2512
308M
    return static_cast<const ToTy*>(Val);
2513
308M
  }
clang::cast_convert_decl_context<clang::RecordDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
2511
6.45M
  static const ToTy *doit(const DeclContext *Val) {
2512
6.45M
    return static_cast<const ToTy*>(Val);
2513
6.45M
  }
clang::cast_convert_decl_context<clang::FunctionDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source