Coverage Report

Created: 2019-07-24 05:18

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