Coverage Report

Created: 2019-03-22 08:08

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