Coverage Report

Created: 2018-07-21 08:31

/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
//                     The LLVM Compiler Infrastructure
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
//
10
//  This file defines the Decl and DeclContext interfaces.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_AST_DECLBASE_H
15
#define LLVM_CLANG_AST_DECLBASE_H
16
17
#include "clang/AST/AttrIterator.h"
18
#include "clang/AST/DeclarationName.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
181
  /// ObjCDeclQualifier - 'Qualifiers' written next to the return and
182
  /// parameter types in method declarations.  Other than remembering
183
  /// them and mangling them into the method's signature string, these
184
  /// are ignored by the compiler; they are consumed by certain
185
  /// remote-messaging frameworks.
186
  ///
187
  /// in, inout, and out are mutually exclusive and apply only to
188
  /// method parameters.  bycopy and byref are mutually exclusive and
189
  /// apply only to method parameters (?).  oneway applies only to
190
  /// results.  All of these expect their corresponding parameter to
191
  /// have a particular type.  None of this is currently enforced by
192
  /// clang.
193
  ///
194
  /// This should be kept in sync with ObjCDeclSpec::ObjCDeclQualifier.
195
  enum ObjCDeclQualifier {
196
    OBJC_TQ_None = 0x0,
197
    OBJC_TQ_In = 0x1,
198
    OBJC_TQ_Inout = 0x2,
199
    OBJC_TQ_Out = 0x4,
200
    OBJC_TQ_Bycopy = 0x8,
201
    OBJC_TQ_Byref = 0x10,
202
    OBJC_TQ_Oneway = 0x20,
203
204
    /// The nullability qualifier is set when the nullability of the
205
    /// result or parameter was expressed via a context-sensitive
206
    /// keyword.
207
    OBJC_TQ_CSNullability = 0x40
208
  };
209
210
  /// The kind of ownership a declaration has, for visibility purposes.
211
  /// This enumeration is designed such that higher values represent higher
212
  /// levels of name hiding.
213
  enum class ModuleOwnershipKind : unsigned {
214
    /// This declaration is not owned by a module.
215
    Unowned,
216
217
    /// This declaration has an owning module, but is globally visible
218
    /// (typically because its owning module is visible and we know that
219
    /// modules cannot later become hidden in this compilation).
220
    /// After serialization and deserialization, this will be converted
221
    /// to VisibleWhenImported.
222
    Visible,
223
224
    /// This declaration has an owning module, and is visible when that
225
    /// module is imported.
226
    VisibleWhenImported,
227
228
    /// This declaration has an owning module, but is only visible to
229
    /// lookups that occur within that module.
230
    ModulePrivate
231
  };
232
233
protected:
234
  /// The next declaration within the same lexical
235
  /// DeclContext. These pointers form the linked list that is
236
  /// traversed via DeclContext's decls_begin()/decls_end().
237
  ///
238
  /// The extra two bits are used for the ModuleOwnershipKind.
239
  llvm::PointerIntPair<Decl *, 2, ModuleOwnershipKind> NextInContextAndBits;
240
241
private:
242
  friend class DeclContext;
243
244
  struct MultipleDC {
245
    DeclContext *SemanticDC;
246
    DeclContext *LexicalDC;
247
  };
248
249
  /// DeclCtx - Holds either a DeclContext* or a MultipleDC*.
250
  /// For declarations that don't contain C++ scope specifiers, it contains
251
  /// the DeclContext where the Decl was declared.
252
  /// For declarations with C++ scope specifiers, it contains a MultipleDC*
253
  /// with the context where it semantically belongs (SemanticDC) and the
254
  /// context where it was lexically declared (LexicalDC).
255
  /// e.g.:
256
  ///
257
  ///   namespace A {
258
  ///      void f(); // SemanticDC == LexicalDC == 'namespace A'
259
  ///   }
260
  ///   void A::f(); // SemanticDC == namespace 'A'
261
  ///                // LexicalDC == global namespace
262
  llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
263
264
2.57G
  bool isInSemaDC() const { return DeclCtx.is<DeclContext*>(); }
265
0
  bool isOutOfSemaDC() const { return DeclCtx.is<MultipleDC*>(); }
266
267
100M
  MultipleDC *getMultipleDC() const {
268
100M
    return DeclCtx.get<MultipleDC*>();
269
100M
  }
270
271
2.47G
  DeclContext *getSemanticDC() const {
272
2.47G
    return DeclCtx.get<DeclContext*>();
273
2.47G
  }
274
275
  /// Loc - The location of this decl.
276
  SourceLocation Loc;
277
278
  /// DeclKind - This indicates which class this is.
279
  unsigned DeclKind : 7;
280
281
  /// InvalidDecl - This indicates a semantic error occurred.
282
  unsigned InvalidDecl :  1;
283
284
  /// HasAttrs - This indicates whether the decl has attributes or not.
285
  unsigned HasAttrs : 1;
286
287
  /// Implicit - Whether this declaration was implicitly generated by
288
  /// the implementation rather than explicitly written by the user.
289
  unsigned Implicit : 1;
290
291
  /// Whether this declaration was "used", meaning that a definition is
292
  /// required.
293
  unsigned Used : 1;
294
295
  /// Whether this declaration was "referenced".
296
  /// The difference with 'Used' is whether the reference appears in a
297
  /// evaluated context or not, e.g. functions used in uninstantiated templates
298
  /// are regarded as "referenced" but not "used".
299
  unsigned Referenced : 1;
300
301
  /// Whether this declaration is a top-level declaration (function,
302
  /// global variable, etc.) that is lexically inside an objc container
303
  /// definition.
304
  unsigned TopLevelDeclInObjCContainer : 1;
305
  
306
  /// Whether statistic collection is enabled.
307
  static bool StatisticsEnabled;
308
309
protected:
310
  friend class ASTDeclReader;
311
  friend class ASTDeclWriter;
312
  friend class ASTNodeImporter;
313
  friend class ASTReader;
314
  friend class CXXClassMemberWrapper;
315
  friend class LinkageComputer;
316
  template<typename decl_type> friend class Redeclarable;
317
318
  /// Access - Used by C++ decls for the access specifier.
319
  // NOTE: VC++ treats enums as signed, avoid using the AccessSpecifier enum
320
  unsigned Access : 2;
321
322
  /// Whether this declaration was loaded from an AST file.
323
  unsigned FromASTFile : 1;
324
325
  /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
326
  unsigned IdentifierNamespace : 13;
327
328
  /// If 0, we have not computed the linkage of this declaration.
329
  /// Otherwise, it is the linkage + 1.
330
  mutable unsigned CacheValidAndLinkage : 3;
331
332
  /// Allocate memory for a deserialized declaration.
333
  ///
334
  /// This routine must be used to allocate memory for any declaration that is
335
  /// deserialized from a module file.
336
  ///
337
  /// \param Size The size of the allocated object.
338
  /// \param Ctx The context in which we will allocate memory.
339
  /// \param ID The global ID of the deserialized declaration.
340
  /// \param Extra The amount of extra space to allocate after the object.
341
  void *operator new(std::size_t Size, const ASTContext &Ctx, unsigned ID,
342
                     std::size_t Extra = 0);
343
344
  /// Allocate memory for a non-deserialized declaration.
345
  void *operator new(std::size_t Size, const ASTContext &Ctx,
346
                     DeclContext *Parent, std::size_t Extra = 0);
347
348
private:
349
  bool AccessDeclContextSanity() const;
350
351
  /// Get the module ownership kind to use for a local lexical child of \p DC,
352
  /// which may be either a local or (rarely) an imported declaration.
353
39.5M
  static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) {
354
39.5M
    if (DC) {
355
39.0M
      auto *D = cast<Decl>(DC);
356
39.0M
      auto MOK = D->getModuleOwnershipKind();
357
39.0M
      if (MOK != ModuleOwnershipKind::Unowned &&
358
39.0M
          
(258k
!D->isFromASTFile()258k
||
D->hasLocalOwningModuleStorage()10.3k
))
359
248k
        return MOK;
360
39.2M
      // If D is not local and we have no local module storage, then we don't
361
39.2M
      // need to track module ownership at all.
362
39.2M
    }
363
39.2M
    return ModuleOwnershipKind::Unowned;
364
39.2M
  }
365
366
protected:
367
  Decl(Kind DK, DeclContext *DC, SourceLocation L)
368
      : NextInContextAndBits(nullptr, getModuleOwnershipKindForChildOf(DC)),
369
        DeclCtx(DC), Loc(L), DeclKind(DK), InvalidDecl(false), HasAttrs(false),
370
        Implicit(false), Used(false), Referenced(false),
371
        TopLevelDeclInObjCContainer(false), Access(AS_none), FromASTFile(0),
372
        IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
373
39.0M
        CacheValidAndLinkage(0) {
374
39.0M
    if (StatisticsEnabled) 
add(DK)61
;
375
39.0M
  }
376
377
  Decl(Kind DK, EmptyShell Empty)
378
      : DeclKind(DK), InvalidDecl(false), HasAttrs(false), Implicit(false),
379
        Used(false), Referenced(false), TopLevelDeclInObjCContainer(false),
380
        Access(AS_none), FromASTFile(0),
381
        IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
382
801
        CacheValidAndLinkage(0) {
383
801
    if (StatisticsEnabled) 
add(DK)0
;
384
801
  }
385
386
  virtual ~Decl();
387
388
  /// Update a potentially out-of-date declaration.
389
  void updateOutOfDate(IdentifierInfo &II) const;
390
391
41.9M
  Linkage getCachedLinkage() const {
392
41.9M
    return Linkage(CacheValidAndLinkage - 1);
393
41.9M
  }
394
395
10.3M
  void setCachedLinkage(Linkage L) const {
396
10.3M
    CacheValidAndLinkage = L + 1;
397
10.3M
  }
398
399
59.4M
  bool hasCachedLinkage() const {
400
59.4M
    return CacheValidAndLinkage;
401
59.4M
  }
402
403
public:
404
  /// Source range that this declaration covers.
405
279
  virtual SourceRange getSourceRange() const LLVM_READONLY {
406
279
    return SourceRange(getLocation(), getLocation());
407
279
  }
408
409
3.30M
  SourceLocation getLocStart() const LLVM_READONLY {
410
3.30M
    return getSourceRange().getBegin();
411
3.30M
  }
412
413
1.53M
  SourceLocation getLocEnd() const LLVM_READONLY {
414
1.53M
    return getSourceRange().getEnd();
415
1.53M
  }
416
417
116M
  SourceLocation getLocation() const { return Loc; }
418
1.06M
  void setLocation(SourceLocation L) { Loc = L; }
419
420
5.09G
  Kind getKind() const { return static_cast<Kind>(DeclKind); }
421
  const char *getDeclKindName() const;
422
423
86.1M
  Decl *getNextDeclInContext() { return NextInContextAndBits.getPointer(); }
424
7
  const Decl *getNextDeclInContext() const {return NextInContextAndBits.getPointer();}
425
426
2.37G
  DeclContext *getDeclContext() {
427
2.37G
    if (isInSemaDC())
428
2.28G
      return getSemanticDC();
429
89.8M
    return getMultipleDC()->SemanticDC;
430
89.8M
  }
431
484M
  const DeclContext *getDeclContext() const {
432
484M
    return const_cast<Decl*>(this)->getDeclContext();
433
484M
  }
434
435
  /// Find the innermost non-closure ancestor of this declaration,
436
  /// walking up through blocks, lambdas, etc.  If that ancestor is
437
  /// not a code context (!isFunctionOrMethod()), returns null.
438
  ///
439
  /// A declaration may be its own non-closure context.
440
  Decl *getNonClosureContext();
441
330k
  const Decl *getNonClosureContext() const {
442
330k
    return const_cast<Decl*>(this)->getNonClosureContext();
443
330k
  }
444
445
  TranslationUnitDecl *getTranslationUnitDecl();
446
615M
  const TranslationUnitDecl *getTranslationUnitDecl() const {
447
615M
    return const_cast<Decl*>(this)->getTranslationUnitDecl();
448
615M
  }
449
450
  bool isInAnonymousNamespace() const;
451
452
  bool isInStdNamespace() const;
453
454
  ASTContext &getASTContext() const LLVM_READONLY;
455
456
16.9M
  void setAccess(AccessSpecifier AS) {
457
16.9M
    Access = AS;
458
16.9M
    assert(AccessDeclContextSanity());
459
16.9M
  }
460
461
101M
  AccessSpecifier getAccess() const {
462
101M
    assert(AccessDeclContextSanity());
463
101M
    return AccessSpecifier(Access);
464
101M
  }
465
466
  /// Retrieve the access specifier for this declaration, even though
467
  /// it may not yet have been properly set.
468
22.1k
  AccessSpecifier getAccessUnsafe() const {
469
22.1k
    return AccessSpecifier(Access);
470
22.1k
  }
471
472
938M
  bool hasAttrs() const { return HasAttrs; }
473
474
4.94M
  void setAttrs(const AttrVec& Attrs) {
475
4.94M
    return setAttrsImpl(Attrs, getASTContext());
476
4.94M
  }
477
478
4.55M
  AttrVec &getAttrs() {
479
4.55M
    return const_cast<AttrVec&>(const_cast<const Decl*>(this)->getAttrs());
480
4.55M
  }
481
482
  const AttrVec &getAttrs() const;
483
  void dropAttrs();
484
485
8.81M
  void addAttr(Attr *A) {
486
8.81M
    if (hasAttrs())
487
4.04M
      getAttrs().push_back(A);
488
4.76M
    else
489
4.76M
      setAttrs(AttrVec(1, A));
490
8.81M
  }
491
492
  using attr_iterator = AttrVec::const_iterator;
493
  using attr_range = llvm::iterator_range<attr_iterator>;
494
495
58.9M
  attr_range attrs() const {
496
58.9M
    return attr_range(attr_begin(), attr_end());
497
58.9M
  }
498
499
115M
  attr_iterator attr_begin() const {
500
115M
    return hasAttrs() ? 
getAttrs().begin()16.7M
:
nullptr98.6M
;
501
115M
  }
502
115M
  attr_iterator attr_end() const {
503
115M
    return hasAttrs() ? 
getAttrs().end()16.7M
:
nullptr98.6M
;
504
115M
  }
505
506
  template <typename T>
507
15.8k
  void dropAttr() {
508
15.8k
    if (!HasAttrs) 
return9.88k
;
509
5.96k
510
5.96k
    AttrVec &Vec = getAttrs();
511
5.96k
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
5.96k
513
5.96k
    if (Vec.empty())
514
1.32k
      HasAttrs = false;
515
5.96k
  }
void clang::Decl::dropAttr<clang::DLLImportAttr>()
Line
Count
Source
507
8.33k
  void dropAttr() {
508
8.33k
    if (!HasAttrs) 
return4.90k
;
509
3.42k
510
3.42k
    AttrVec &Vec = getAttrs();
511
3.42k
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
3.42k
513
3.42k
    if (Vec.empty())
514
1.05k
      HasAttrs = false;
515
3.42k
  }
void clang::Decl::dropAttr<clang::WeakAttr>()
Line
Count
Source
507
10
  void dropAttr() {
508
10
    if (!HasAttrs) 
return0
;
509
10
510
10
    AttrVec &Vec = getAttrs();
511
10
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
10
513
10
    if (Vec.empty())
514
10
      HasAttrs = false;
515
10
  }
void clang::Decl::dropAttr<clang::WeakRefAttr>()
Line
Count
Source
507
5
  void dropAttr() {
508
5
    if (!HasAttrs) 
return0
;
509
5
510
5
    AttrVec &Vec = getAttrs();
511
5
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
5
513
5
    if (Vec.empty())
514
2
      HasAttrs = false;
515
5
  }
void clang::Decl::dropAttr<clang::SelectAnyAttr>()
Line
Count
Source
507
16
  void dropAttr() {
508
16
    if (!HasAttrs) 
return0
;
509
16
510
16
    AttrVec &Vec = getAttrs();
511
16
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
16
513
16
    if (Vec.empty())
514
16
      HasAttrs = false;
515
16
  }
void clang::Decl::dropAttr<clang::NotTailCalledAttr>()
Line
Count
Source
507
2
  void dropAttr() {
508
2
    if (!HasAttrs) 
return0
;
509
2
510
2
    AttrVec &Vec = getAttrs();
511
2
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
2
513
2
    if (Vec.empty())
514
2
      HasAttrs = false;
515
2
  }
void clang::Decl::dropAttr<clang::InternalLinkageAttr>()
Line
Count
Source
507
3
  void dropAttr() {
508
3
    if (!HasAttrs) 
return0
;
509
3
510
3
    AttrVec &Vec = getAttrs();
511
3
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
3
513
3
    if (Vec.empty())
514
3
      HasAttrs = false;
515
3
  }
void clang::Decl::dropAttr<clang::OverloadableAttr>()
Line
Count
Source
507
3
  void dropAttr() {
508
3
    if (!HasAttrs) 
return0
;
509
3
510
3
    AttrVec &Vec = getAttrs();
511
3
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
3
513
3
    if (Vec.empty())
514
2
      HasAttrs = false;
515
3
  }
void clang::Decl::dropAttr<clang::WeakImportAttr>()
Line
Count
Source
507
2
  void dropAttr() {
508
2
    if (!HasAttrs) 
return0
;
509
2
510
2
    AttrVec &Vec = getAttrs();
511
2
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
2
513
2
    if (Vec.empty())
514
2
      HasAttrs = false;
515
2
  }
void clang::Decl::dropAttr<clang::AliasAttr>()
Line
Count
Source
507
5
  void dropAttr() {
508
5
    if (!HasAttrs) 
return0
;
509
5
510
5
    AttrVec &Vec = getAttrs();
511
5
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
5
513
5
    if (Vec.empty())
514
5
      HasAttrs = false;
515
5
  }
void clang::Decl::dropAttr<clang::SectionAttr>()
Line
Count
Source
507
3
  void dropAttr() {
508
3
    if (!HasAttrs) 
return0
;
509
3
510
3
    AttrVec &Vec = getAttrs();
511
3
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
3
513
3
    if (Vec.empty())
514
3
      HasAttrs = false;
515
3
  }
void clang::Decl::dropAttr<clang::AvailabilityAttr>()
Line
Count
Source
507
6
  void dropAttr() {
508
6
    if (!HasAttrs) 
return0
;
509
6
510
6
    AttrVec &Vec = getAttrs();
511
6
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
6
513
6
    if (Vec.empty())
514
2
      HasAttrs = false;
515
6
  }
void clang::Decl::dropAttr<clang::UsedAttr>()
Line
Count
Source
507
4
  void dropAttr() {
508
4
    if (!HasAttrs) 
return0
;
509
4
510
4
    AttrVec &Vec = getAttrs();
511
4
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
4
513
4
    if (Vec.empty())
514
4
      HasAttrs = false;
515
4
  }
void clang::Decl::dropAttr<clang::IFuncAttr>()
Line
Count
Source
507
1
  void dropAttr() {
508
1
    if (!HasAttrs) 
return0
;
509
1
510
1
    AttrVec &Vec = getAttrs();
511
1
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
1
513
1
    if (Vec.empty())
514
1
      HasAttrs = false;
515
1
  }
void clang::Decl::dropAttr<clang::CodeSegAttr>()
Line
Count
Source
507
8
  void dropAttr() {
508
8
    if (!HasAttrs) 
return0
;
509
8
510
8
    AttrVec &Vec = getAttrs();
511
8
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
8
513
8
    if (Vec.empty())
514
5
      HasAttrs = false;
515
8
  }
void clang::Decl::dropAttr<clang::VisibilityAttr>()
Line
Count
Source
507
6
  void dropAttr() {
508
6
    if (!HasAttrs) 
return0
;
509
6
510
6
    AttrVec &Vec = getAttrs();
511
6
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
6
513
6
    if (Vec.empty())
514
6
      HasAttrs = false;
515
6
  }
Unexecuted instantiation: void clang::Decl::dropAttr<clang::TypeVisibilityAttr>()
void clang::Decl::dropAttr<clang::AlwaysInlineAttr>()
Line
Count
Source
507
7
  void dropAttr() {
508
7
    if (!HasAttrs) 
return0
;
509
7
510
7
    AttrVec &Vec = getAttrs();
511
7
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
7
513
7
    if (Vec.empty())
514
7
      HasAttrs = false;
515
7
  }
void clang::Decl::dropAttr<clang::MinSizeAttr>()
Line
Count
Source
507
3
  void dropAttr() {
508
3
    if (!HasAttrs) 
return0
;
509
3
510
3
    AttrVec &Vec = getAttrs();
511
3
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
3
513
3
    if (Vec.empty())
514
3
      HasAttrs = false;
515
3
  }
void clang::Decl::dropAttr<clang::UuidAttr>()
Line
Count
Source
507
16
  void dropAttr() {
508
16
    if (!HasAttrs) 
return0
;
509
16
510
16
    AttrVec &Vec = getAttrs();
511
16
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
16
513
16
    if (Vec.empty())
514
16
      HasAttrs = false;
515
16
  }
void clang::Decl::dropAttr<clang::MSInheritanceAttr>()
Line
Count
Source
507
3
  void dropAttr() {
508
3
    if (!HasAttrs) 
return0
;
509
3
510
3
    AttrVec &Vec = getAttrs();
511
3
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
3
513
3
    if (Vec.empty())
514
3
      HasAttrs = false;
515
3
  }
void clang::Decl::dropAttr<clang::TrivialABIAttr>()
Line
Count
Source
507
21
  void dropAttr() {
508
21
    if (!HasAttrs) 
return0
;
509
21
510
21
    AttrVec &Vec = getAttrs();
511
21
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
21
513
21
    if (Vec.empty())
514
21
      HasAttrs = false;
515
21
  }
void clang::Decl::dropAttr<clang::OverrideAttr>()
Line
Count
Source
507
8
  void dropAttr() {
508
8
    if (!HasAttrs) 
return0
;
509
8
510
8
    AttrVec &Vec = getAttrs();
511
8
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
8
513
8
    if (Vec.empty())
514
8
      HasAttrs = false;
515
8
  }
void clang::Decl::dropAttr<clang::FinalAttr>()
Line
Count
Source
507
6
  void dropAttr() {
508
6
    if (!HasAttrs) 
return0
;
509
6
510
6
    AttrVec &Vec = getAttrs();
511
6
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
6
513
6
    if (Vec.empty())
514
6
      HasAttrs = false;
515
6
  }
void clang::Decl::dropAttr<clang::DLLExportAttr>()
Line
Count
Source
507
7.38k
  void dropAttr() {
508
7.38k
    if (!HasAttrs) 
return4.98k
;
509
2.40k
510
2.40k
    AttrVec &Vec = getAttrs();
511
2.40k
    Vec.erase(std::remove_if(Vec.begin(), Vec.end(), isa<T, Attr*>), Vec.end());
512
2.40k
513
2.40k
    if (Vec.empty())
514
142
      HasAttrs = false;
515
2.40k
  }
516
517
  template <typename T>
518
55.7M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
55.7M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
55.7M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::NonNullAttr>() const
Line
Count
Source
518
3.32M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
3.32M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
3.32M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
518
78
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
78
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
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
518
330k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
330k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
330k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AnnotateAttr>() const
Line
Count
Source
518
10.2k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
10.2k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
10.2k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatAttr>() const
Line
Count
Source
518
3.24M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
3.24M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
3.24M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::OwnershipAttr>() const
Line
Count
Source
518
139
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
139
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
139
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::EnableIfAttr>() const
Line
Count
Source
518
44.9k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
44.9k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
44.9k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::FormatArgAttr>() const
Line
Count
Source
518
26
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
26
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
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
518
3.13M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
3.13M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
3.13M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::AlignedAttr>() const
Line
Count
Source
518
731k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
731k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
731k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableParamAttr>() const
Line
Count
Source
518
776
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
776
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
776
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::InheritableAttr>() const
Line
Count
Source
518
288k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
288k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
288k
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
518
101
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
101
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
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
518
44.6M
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
44.6M
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
44.6M
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::PtGuardedByAttr>() const
Line
Count
Source
518
426
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
426
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
426
  }
llvm::iterator_range<clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > > clang::Decl::specific_attrs<clang::GuardedByAttr>() const
Line
Count
Source
518
2.20k
  llvm::iterator_range<specific_attr_iterator<T>> specific_attrs() const {
519
2.20k
    return llvm::make_range(specific_attr_begin<T>(), specific_attr_end<T>());
520
2.20k
  }
521
522
  template <typename T>
523
56.5M
  specific_attr_iterator<T> specific_attr_begin() const {
524
56.5M
    return specific_attr_iterator<T>(attr_begin());
525
56.5M
  }
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NonNullAttr>() const
Line
Count
Source
523
3.32M
  specific_attr_iterator<T> specific_attr_begin() const {
524
3.32M
    return specific_attr_iterator<T>(attr_begin());
525
3.32M
  }
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
523
78
  specific_attr_iterator<T> specific_attr_begin() const {
524
78
    return specific_attr_iterator<T>(attr_begin());
525
78
  }
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::NoSanitizeAttr>() const
Line
Count
Source
523
330k
  specific_attr_iterator<T> specific_attr_begin() const {
524
330k
    return specific_attr_iterator<T>(attr_begin());
525
330k
  }
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AnnotateAttr>() const
Line
Count
Source
523
10.6k
  specific_attr_iterator<T> specific_attr_begin() const {
524
10.6k
    return specific_attr_iterator<T>(attr_begin());
525
10.6k
  }
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatAttr>() const
Line
Count
Source
523
3.24M
  specific_attr_iterator<T> specific_attr_begin() const {
524
3.24M
    return specific_attr_iterator<T>(attr_begin());
525
3.24M
  }
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::OwnershipAttr>() const
Line
Count
Source
523
139
  specific_attr_iterator<T> specific_attr_begin() const {
524
139
    return specific_attr_iterator<T>(attr_begin());
525
139
  }
clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::EnableIfAttr>() const
Line
Count
Source
523
791k
  specific_attr_iterator<T> specific_attr_begin() const {
524
791k
    return specific_attr_iterator<T>(attr_begin());
525
791k
  }
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::FormatArgAttr>() const
Line
Count
Source
523
26
  specific_attr_iterator<T> specific_attr_begin() const {
524
26
    return specific_attr_iterator<T>(attr_begin());
525
26
  }
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
523
3.13M
  specific_attr_iterator<T> specific_attr_begin() const {
524
3.13M
    return specific_attr_iterator<T>(attr_begin());
525
3.13M
  }
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::AlignedAttr>() const
Line
Count
Source
523
731k
  specific_attr_iterator<T> specific_attr_begin() const {
524
731k
    return specific_attr_iterator<T>(attr_begin());
525
731k
  }
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableParamAttr>() const
Line
Count
Source
523
776
  specific_attr_iterator<T> specific_attr_begin() const {
524
776
    return specific_attr_iterator<T>(attr_begin());
525
776
  }
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::InheritableAttr>() const
Line
Count
Source
523
288k
  specific_attr_iterator<T> specific_attr_begin() const {
524
288k
    return specific_attr_iterator<T>(attr_begin());
525
288k
  }
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
523
101
  specific_attr_iterator<T> specific_attr_begin() const {
524
101
    return specific_attr_iterator<T>(attr_begin());
525
101
  }
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::DiagnoseIfAttr>() const
Line
Count
Source
523
44.6M
  specific_attr_iterator<T> specific_attr_begin() const {
524
44.6M
    return specific_attr_iterator<T>(attr_begin());
525
44.6M
  }
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::PtGuardedByAttr>() const
Line
Count
Source
523
426
  specific_attr_iterator<T> specific_attr_begin() const {
524
426
    return specific_attr_iterator<T>(attr_begin());
525
426
  }
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_begin<clang::GuardedByAttr>() const
Line
Count
Source
523
2.20k
  specific_attr_iterator<T> specific_attr_begin() const {
524
2.20k
    return specific_attr_iterator<T>(attr_begin());
525
2.20k
  }
526
527
  template <typename T>
528
56.5M
  specific_attr_iterator<T> specific_attr_end() const {
529
56.5M
    return specific_attr_iterator<T>(attr_end());
530
56.5M
  }
clang::specific_attr_iterator<clang::NonNullAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NonNullAttr>() const
Line
Count
Source
528
3.32M
  specific_attr_iterator<T> specific_attr_end() const {
529
3.32M
    return specific_attr_iterator<T>(attr_end());
530
3.32M
  }
clang::specific_attr_iterator<clang::OMPDeclareSimdDeclAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
528
78
  specific_attr_iterator<T> specific_attr_end() const {
529
78
    return specific_attr_iterator<T>(attr_end());
530
78
  }
clang::specific_attr_iterator<clang::NoSanitizeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::NoSanitizeAttr>() const
Line
Count
Source
528
330k
  specific_attr_iterator<T> specific_attr_end() const {
529
330k
    return specific_attr_iterator<T>(attr_end());
530
330k
  }
clang::specific_attr_iterator<clang::AnnotateAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AnnotateAttr>() const
Line
Count
Source
528
10.6k
  specific_attr_iterator<T> specific_attr_end() const {
529
10.6k
    return specific_attr_iterator<T>(attr_end());
530
10.6k
  }
clang::specific_attr_iterator<clang::FormatAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatAttr>() const
Line
Count
Source
528
3.24M
  specific_attr_iterator<T> specific_attr_end() const {
529
3.24M
    return specific_attr_iterator<T>(attr_end());
530
3.24M
  }
clang::specific_attr_iterator<clang::OwnershipAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::OwnershipAttr>() const
Line
Count
Source
528
139
  specific_attr_iterator<T> specific_attr_end() const {
529
139
    return specific_attr_iterator<T>(attr_end());
530
139
  }
clang::specific_attr_iterator<clang::EnableIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::EnableIfAttr>() const
Line
Count
Source
528
791k
  specific_attr_iterator<T> specific_attr_end() const {
529
791k
    return specific_attr_iterator<T>(attr_end());
530
791k
  }
clang::specific_attr_iterator<clang::FormatArgAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::FormatArgAttr>() const
Line
Count
Source
528
26
  specific_attr_iterator<T> specific_attr_end() const {
529
26
    return specific_attr_iterator<T>(attr_end());
530
26
  }
clang::specific_attr_iterator<clang::ArgumentWithTypeTagAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::ArgumentWithTypeTagAttr>() const
Line
Count
Source
528
3.13M
  specific_attr_iterator<T> specific_attr_end() const {
529
3.13M
    return specific_attr_iterator<T>(attr_end());
530
3.13M
  }
clang::specific_attr_iterator<clang::AlignedAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::AlignedAttr>() const
Line
Count
Source
528
731k
  specific_attr_iterator<T> specific_attr_end() const {
529
731k
    return specific_attr_iterator<T>(attr_end());
530
731k
  }
clang::specific_attr_iterator<clang::InheritableParamAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableParamAttr>() const
Line
Count
Source
528
776
  specific_attr_iterator<T> specific_attr_end() const {
529
776
    return specific_attr_iterator<T>(attr_end());
530
776
  }
clang::specific_attr_iterator<clang::InheritableAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::InheritableAttr>() const
Line
Count
Source
528
288k
  specific_attr_iterator<T> specific_attr_end() const {
529
288k
    return specific_attr_iterator<T>(attr_end());
530
288k
  }
clang::specific_attr_iterator<clang::TypeTagForDatatypeAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
528
101
  specific_attr_iterator<T> specific_attr_end() const {
529
101
    return specific_attr_iterator<T>(attr_end());
530
101
  }
clang::specific_attr_iterator<clang::DiagnoseIfAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::DiagnoseIfAttr>() const
Line
Count
Source
528
44.6M
  specific_attr_iterator<T> specific_attr_end() const {
529
44.6M
    return specific_attr_iterator<T>(attr_end());
530
44.6M
  }
clang::specific_attr_iterator<clang::PtGuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::PtGuardedByAttr>() const
Line
Count
Source
528
426
  specific_attr_iterator<T> specific_attr_end() const {
529
426
    return specific_attr_iterator<T>(attr_end());
530
426
  }
clang::specific_attr_iterator<clang::GuardedByAttr, llvm::SmallVector<clang::Attr*, 4u> > clang::Decl::specific_attr_end<clang::GuardedByAttr>() const
Line
Count
Source
528
2.20k
  specific_attr_iterator<T> specific_attr_end() const {
529
2.20k
    return specific_attr_iterator<T>(attr_end());
530
2.20k
  }
531
532
226M
  template<typename T> T *getAttr() const {
533
226M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())69.3M
:
nullptr156M
;
534
226M
  }
clang::DLLImportAttr* clang::Decl::getAttr<clang::DLLImportAttr>() const
Line
Count
Source
532
12.6M
  template<typename T> T *getAttr() const {
533
12.6M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.45M
:
nullptr9.18M
;
534
12.6M
  }
clang::DLLExportAttr* clang::Decl::getAttr<clang::DLLExportAttr>() const
Line
Count
Source
532
12.6M
  template<typename T> T *getAttr() const {
533
12.6M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.45M
:
nullptr9.19M
;
534
12.6M
  }
clang::ReturnsNonNullAttr* clang::Decl::getAttr<clang::ReturnsNonNullAttr>() const
Line
Count
Source
532
2.03k
  template<typename T> T *getAttr() const {
533
2.03k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())584
:
nullptr1.44k
;
534
2.03k
  }
clang::PassObjectSizeAttr* clang::Decl::getAttr<clang::PassObjectSizeAttr>() const
Line
Count
Source
532
8.38M
  template<typename T> T *getAttr() const {
533
8.38M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.26k
:
nullptr8.38M
;
534
8.38M
  }
clang::XRayInstrumentAttr* clang::Decl::getAttr<clang::XRayInstrumentAttr>() const
Line
Count
Source
532
71
  template<typename T> T *getAttr() const {
533
71
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())56
:
nullptr15
;
534
71
  }
clang::PcsAttr* clang::Decl::getAttr<clang::PcsAttr>() const
Line
Count
Source
532
3.77k
  template<typename T> T *getAttr() const {
533
3.77k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())198
:
nullptr3.57k
;
534
3.77k
  }
clang::NonNullAttr* clang::Decl::getAttr<clang::NonNullAttr>() const
Line
Count
Source
532
134k
  template<typename T> T *getAttr() const {
533
134k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())244
:
nullptr134k
;
534
134k
  }
clang::AllocSizeAttr* clang::Decl::getAttr<clang::AllocSizeAttr>() const
Line
Count
Source
532
1.21M
  template<typename T> T *getAttr() const {
533
1.21M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())379k
:
nullptr831k
;
534
1.21M
  }
clang::AlignValueAttr* clang::Decl::getAttr<clang::AlignValueAttr>() const
Line
Count
Source
532
2.16M
  template<typename T> T *getAttr() const {
533
2.16M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4.49k
:
nullptr2.15M
;
534
2.16M
  }
clang::AssumeAlignedAttr* clang::Decl::getAttr<clang::AssumeAlignedAttr>() const
Line
Count
Source
532
769k
  template<typename T> T *getAttr() const {
533
769k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())245k
:
nullptr524k
;
534
769k
  }
clang::AllocAlignAttr* clang::Decl::getAttr<clang::AllocAlignAttr>() const
Line
Count
Source
532
769k
  template<typename T> T *getAttr() const {
533
769k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())245k
:
nullptr524k
;
534
769k
  }
clang::PragmaClangBSSSectionAttr* clang::Decl::getAttr<clang::PragmaClangBSSSectionAttr>() const
Line
Count
Source
532
50.8k
  template<typename T> T *getAttr() const {
533
50.8k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())9.50k
:
nullptr41.3k
;
534
50.8k
  }
clang::PragmaClangDataSectionAttr* clang::Decl::getAttr<clang::PragmaClangDataSectionAttr>() const
Line
Count
Source
532
50.8k
  template<typename T> T *getAttr() const {
533
50.8k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())9.50k
:
nullptr41.3k
;
534
50.8k
  }
clang::PragmaClangRodataSectionAttr* clang::Decl::getAttr<clang::PragmaClangRodataSectionAttr>() const
Line
Count
Source
532
50.8k
  template<typename T> T *getAttr() const {
533
50.8k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())9.50k
:
nullptr41.3k
;
534
50.8k
  }
clang::SectionAttr* clang::Decl::getAttr<clang::SectionAttr>() const
Line
Count
Source
532
988k
  template<typename T> T *getAttr() const {
533
988k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())247k
:
nullptr740k
;
534
988k
  }
clang::CleanupAttr* clang::Decl::getAttr<clang::CleanupAttr>() const
Line
Count
Source
532
419k
  template<typename T> T *getAttr() const {
533
419k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())16.0k
:
nullptr403k
;
534
419k
  }
clang::OMPThreadPrivateDeclAttr* clang::Decl::getAttr<clang::OMPThreadPrivateDeclAttr>() const
Line
Count
Source
532
48
  template<typename T> T *getAttr() const {
533
48
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
48
  }
clang::InitSegAttr* clang::Decl::getAttr<clang::InitSegAttr>() const
Line
Count
Source
532
4.27k
  template<typename T> T *getAttr() const {
533
4.27k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())778
:
nullptr3.50k
;
534
4.27k
  }
clang::InitPriorityAttr* clang::Decl::getAttr<clang::InitPriorityAttr>() const
Line
Count
Source
532
4.21k
  template<typename T> T *getAttr() const {
533
4.21k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())762
:
nullptr3.45k
;
534
4.21k
  }
clang::AsmLabelAttr* clang::Decl::getAttr<clang::AsmLabelAttr>() const
Line
Count
Source
532
1.24M
  template<typename T> T *getAttr() const {
533
1.24M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())544k
:
nullptr703k
;
534
1.24M
  }
clang::OMPDeclareTargetDeclAttr* clang::Decl::getAttr<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
532
9.99k
  template<typename T> T *getAttr() const {
533
9.99k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
9.99k
  }
clang::OMPCaptureKindAttr* clang::Decl::getAttr<clang::OMPCaptureKindAttr>() const
Line
Count
Source
532
170
  template<typename T> T *getAttr() const {
533
170
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
170
  }
clang::OpenCLAccessAttr* clang::Decl::getAttr<clang::OpenCLAccessAttr>() const
Line
Count
Source
532
81
  template<typename T> T *getAttr() const {
533
81
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())71
:
nullptr10
;
534
81
  }
clang::VecTypeHintAttr* clang::Decl::getAttr<clang::VecTypeHintAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr269k
;
534
3.00M
  }
clang::WorkGroupSizeHintAttr* clang::Decl::getAttr<clang::WorkGroupSizeHintAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr269k
;
534
3.00M
  }
clang::ReqdWorkGroupSizeAttr* clang::Decl::getAttr<clang::ReqdWorkGroupSizeAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr270k
;
534
3.00M
  }
clang::OpenCLIntelReqdSubGroupSizeAttr* clang::Decl::getAttr<clang::OpenCLIntelReqdSubGroupSizeAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr269k
;
534
3.00M
  }
clang::XRayLogArgsAttr* clang::Decl::getAttr<clang::XRayLogArgsAttr>() const
Line
Count
Source
532
35
  template<typename T> T *getAttr() const {
533
35
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
35
  }
clang::MinVectorWidthAttr* clang::Decl::getAttr<clang::MinVectorWidthAttr>() const
Line
Count
Source
532
836k
  template<typename T> T *getAttr() const {
533
836k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())95.5k
:
nullptr741k
;
534
836k
  }
clang::TargetAttr* clang::Decl::getAttr<clang::TargetAttr>() const
Line
Count
Source
532
7.98M
  template<typename T> T *getAttr() const {
533
7.98M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.34M
:
nullptr4.63M
;
534
7.98M
  }
clang::TLSModelAttr* clang::Decl::getAttr<clang::TLSModelAttr>() const
Line
Count
Source
532
279
  template<typename T> T *getAttr() const {
533
279
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())88
:
nullptr191
;
534
279
  }
clang::CPUSpecificAttr* clang::Decl::getAttr<clang::CPUSpecificAttr>() const
Line
Count
Source
532
7.94M
  template<typename T> T *getAttr() const {
533
7.94M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.30M
:
nullptr4.63M
;
534
7.94M
  }
clang::PragmaClangTextSectionAttr* clang::Decl::getAttr<clang::PragmaClangTextSectionAttr>() const
Line
Count
Source
532
324k
  template<typename T> T *getAttr() const {
533
324k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())95.8k
:
nullptr228k
;
534
324k
  }
clang::CodeSegAttr* clang::Decl::getAttr<clang::CodeSegAttr>() const
Line
Count
Source
532
3.90M
  template<typename T> T *getAttr() const {
533
3.90M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.17M
:
nullptr2.73M
;
534
3.90M
  }
clang::AliasAttr* clang::Decl::getAttr<clang::AliasAttr>() const
Line
Count
Source
532
4.46M
  template<typename T> T *getAttr() const {
533
4.46M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.80M
:
nullptr2.66M
;
534
4.46M
  }
clang::CPUDispatchAttr* clang::Decl::getAttr<clang::CPUDispatchAttr>() const
Line
Count
Source
532
7.23M
  template<typename T> T *getAttr() const {
533
7.23M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.10M
:
nullptr4.13M
;
534
7.23M
  }
clang::ConstructorAttr* clang::Decl::getAttr<clang::ConstructorAttr>() const
Line
Count
Source
532
244k
  template<typename T> T *getAttr() const {
533
244k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())81.5k
:
nullptr163k
;
534
244k
  }
clang::DestructorAttr* clang::Decl::getAttr<clang::DestructorAttr>() const
Line
Count
Source
532
244k
  template<typename T> T *getAttr() const {
533
244k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())81.5k
:
nullptr163k
;
534
244k
  }
clang::IFuncAttr* clang::Decl::getAttr<clang::IFuncAttr>() const
Line
Count
Source
532
2.88M
  template<typename T> T *getAttr() const {
533
2.88M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.79M
:
nullptr1.09M
;
534
2.88M
  }
clang::MipsInterruptAttr* clang::Decl::getAttr<clang::MipsInterruptAttr>() const
Line
Count
Source
532
343
  template<typename T> T *getAttr() const {
533
343
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())32
:
nullptr311
;
534
343
  }
clang::AVRInterruptAttr* clang::Decl::getAttr<clang::AVRInterruptAttr>() const
Line
Count
Source
532
2
  template<typename T> T *getAttr() const {
533
2
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
2
  }
clang::AVRSignalAttr* clang::Decl::getAttr<clang::AVRSignalAttr>() const
Line
Count
Source
532
2
  template<typename T> T *getAttr() const {
533
2
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
2
  }
clang::ARMInterruptAttr* clang::Decl::getAttr<clang::ARMInterruptAttr>() const
Line
Count
Source
532
27.5k
  template<typename T> T *getAttr() const {
533
27.5k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.71k
:
nullptr23.8k
;
534
27.5k
  }
clang::CUDALaunchBoundsAttr* clang::Decl::getAttr<clang::CUDALaunchBoundsAttr>() const
Line
Count
Source
532
194
  template<typename T> T *getAttr() const {
533
194
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
194
  }
Unexecuted instantiation: clang::MSP430InterruptAttr* clang::Decl::getAttr<clang::MSP430InterruptAttr>() const
clang::AMDGPUFlatWorkGroupSizeAttr* clang::Decl::getAttr<clang::AMDGPUFlatWorkGroupSizeAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr270k
;
534
3.00M
  }
clang::AMDGPUWavesPerEUAttr* clang::Decl::getAttr<clang::AMDGPUWavesPerEUAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr270k
;
534
3.00M
  }
clang::AMDGPUNumSGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumSGPRAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr270k
;
534
3.00M
  }
clang::AMDGPUNumVGPRAttr* clang::Decl::getAttr<clang::AMDGPUNumVGPRAttr>() const
Line
Count
Source
532
3.00M
  template<typename T> T *getAttr() const {
533
3.00M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.73M
:
nullptr270k
;
534
3.00M
  }
clang::BlocksAttr* clang::Decl::getAttr<clang::BlocksAttr>() const
Line
Count
Source
532
4
  template<typename T> T *getAttr() const {
533
4
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
4
  }
clang::FormatArgAttr* clang::Decl::getAttr<clang::FormatArgAttr>() const
Line
Count
Source
532
6
  template<typename T> T *getAttr() const {
533
6
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())5
:
nullptr1
;
534
6
  }
clang::TypeTagForDatatypeAttr* clang::Decl::getAttr<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
532
274
  template<typename T> T *getAttr() const {
533
274
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())261
:
nullptr13
;
534
274
  }
clang::SentinelAttr* clang::Decl::getAttr<clang::SentinelAttr>() const
Line
Count
Source
532
3.48M
  template<typename T> T *getAttr() const {
533
3.48M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.00M
:
nullptr1.48M
;
534
3.48M
  }
clang::CUDAGlobalAttr* clang::Decl::getAttr<clang::CUDAGlobalAttr>() const
Line
Count
Source
532
1.61k
  template<typename T> T *getAttr() const {
533
1.61k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())357
:
nullptr1.25k
;
534
1.61k
  }
clang::CUDAHostAttr* clang::Decl::getAttr<clang::CUDAHostAttr>() const
Line
Count
Source
532
162
  template<typename T> T *getAttr() const {
533
162
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())28
:
nullptr134
;
534
162
  }
clang::CUDADeviceAttr* clang::Decl::getAttr<clang::CUDADeviceAttr>() const
Line
Count
Source
532
164
  template<typename T> T *getAttr() const {
533
164
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())30
:
nullptr134
;
534
164
  }
clang::WeakAttr* clang::Decl::getAttr<clang::WeakAttr>() const
Line
Count
Source
532
7.55M
  template<typename T> T *getAttr() const {
533
7.55M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.62M
:
nullptr4.92M
;
534
7.55M
  }
clang::WeakRefAttr* clang::Decl::getAttr<clang::WeakRefAttr>() const
Line
Count
Source
532
7.55M
  template<typename T> T *getAttr() const {
533
7.55M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.62M
:
nullptr4.92M
;
534
7.55M
  }
clang::SelectAnyAttr* clang::Decl::getAttr<clang::SelectAnyAttr>() const
Line
Count
Source
532
18.8M
  template<typename T> T *getAttr() const {
533
18.8M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.79M
:
nullptr16.0M
;
534
18.8M
  }
clang::NotTailCalledAttr* clang::Decl::getAttr<clang::NotTailCalledAttr>() const
Line
Count
Source
532
9.23M
  template<typename T> T *getAttr() const {
533
9.23M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.34M
:
nullptr5.88M
;
534
9.23M
  }
clang::UsedAttr* clang::Decl::getAttr<clang::UsedAttr>() const
Line
Count
Source
532
2.91M
  template<typename T> T *getAttr() const {
533
2.91M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())327k
:
nullptr2.58M
;
534
2.91M
  }
clang::AbiTagAttr* clang::Decl::getAttr<clang::AbiTagAttr>() const
Line
Count
Source
532
4.15M
  template<typename T> T *getAttr() const {
533
4.15M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.15M
:
nullptr2.99M
;
534
4.15M
  }
clang::CarriesDependencyAttr* clang::Decl::getAttr<clang::CarriesDependencyAttr>() const
Line
Count
Source
532
1.14M
  template<typename T> T *getAttr() const {
533
1.14M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())60.8k
:
nullptr1.08M
;
534
1.14M
  }
clang::OverloadableAttr* clang::Decl::getAttr<clang::OverloadableAttr>() const
Line
Count
Source
532
246k
  template<typename T> T *getAttr() const {
533
246k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())246k
:
nullptr16
;
534
246k
  }
clang::AnyX86NoCallerSavedRegistersAttr* clang::Decl::getAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const
Line
Count
Source
532
1
  template<typename T> T *getAttr() const {
533
1
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
1
  }
clang::CXX11NoReturnAttr* clang::Decl::getAttr<clang::CXX11NoReturnAttr>() const
Line
Count
Source
532
273k
  template<typename T> T *getAttr() const {
533
273k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())60.1k
:
nullptr212k
;
534
273k
  }
clang::AvailabilityAttr* clang::Decl::getAttr<clang::AvailabilityAttr>() const
Line
Count
Source
532
4.85M
  template<typename T> T *getAttr() const {
533
4.85M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.37M
:
nullptr2.48M
;
534
4.85M
  }
clang::RequireConstantInitAttr* clang::Decl::getAttr<clang::RequireConstantInitAttr>() const
Line
Count
Source
532
43
  template<typename T> T *getAttr() const {
533
43
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
43
  }
clang::NakedAttr* clang::Decl::getAttr<clang::NakedAttr>() const
Line
Count
Source
532
64
  template<typename T> T *getAttr() const {
533
64
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())10
:
nullptr54
;
534
64
  }
clang::MSInheritanceAttr* clang::Decl::getAttr<clang::MSInheritanceAttr>() const
Line
Count
Source
532
253k
  template<typename T> T *getAttr() const {
533
253k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())253k
:
nullptr58
;
534
253k
  }
clang::Mips16Attr* clang::Decl::getAttr<clang::Mips16Attr>() const
Line
Count
Source
532
28
  template<typename T> T *getAttr() const {
533
28
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr24
;
534
28
  }
clang::MicroMipsAttr* clang::Decl::getAttr<clang::MicroMipsAttr>() const
Line
Count
Source
532
11
  template<typename T> T *getAttr() const {
533
11
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3
:
nullptr8
;
534
11
  }
clang::MipsShortCallAttr* clang::Decl::getAttr<clang::MipsShortCallAttr>() const
Line
Count
Source
532
16
  template<typename T> T *getAttr() const {
533
16
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr12
;
534
16
  }
clang::MipsLongCallAttr* clang::Decl::getAttr<clang::MipsLongCallAttr>() const
Line
Count
Source
532
16
  template<typename T> T *getAttr() const {
533
16
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr12
;
534
16
  }
clang::CUDASharedAttr* clang::Decl::getAttr<clang::CUDASharedAttr>() const
Line
Count
Source
532
117
  template<typename T> T *getAttr() const {
533
117
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())6
:
nullptr111
;
534
117
  }
clang::HotAttr* clang::Decl::getAttr<clang::HotAttr>() const
Line
Count
Source
532
26
  template<typename T> T *getAttr() const {
533
26
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
:
nullptr25
;
534
26
  }
clang::ColdAttr* clang::Decl::getAttr<clang::ColdAttr>() const
Line
Count
Source
532
3
  template<typename T> T *getAttr() const {
533
3
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
:
nullptr2
;
534
3
  }
clang::DisableTailCallsAttr* clang::Decl::getAttr<clang::DisableTailCallsAttr>() const
Line
Count
Source
532
31
  template<typename T> T *getAttr() const {
533
31
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr29
;
534
31
  }
clang::CUDAConstantAttr* clang::Decl::getAttr<clang::CUDAConstantAttr>() const
Line
Count
Source
532
205
  template<typename T> T *getAttr() const {
533
205
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())4
:
nullptr201
;
534
205
  }
clang::VecReturnAttr* clang::Decl::getAttr<clang::VecReturnAttr>() const
Line
Count
Source
532
11
  template<typename T> T *getAttr() const {
533
11
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1
:
nullptr10
;
534
11
  }
Unexecuted instantiation: clang::CFUnknownTransferAttr* clang::Decl::getAttr<clang::CFUnknownTransferAttr>() const
clang::CFAuditedTransferAttr* clang::Decl::getAttr<clang::CFAuditedTransferAttr>() const
Line
Count
Source
532
1
  template<typename T> T *getAttr() const {
533
1
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())0
: nullptr;
534
1
  }
clang::DeprecatedAttr* clang::Decl::getAttr<clang::DeprecatedAttr>() const
Line
Count
Source
532
4.55k
  template<typename T> T *getAttr() const {
533
4.55k
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
4.55k
  }
clang::UnavailableAttr* clang::Decl::getAttr<clang::UnavailableAttr>() const
Line
Count
Source
532
334
  template<typename T> T *getAttr() const {
533
334
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
334
  }
clang::VisibilityAttr* clang::Decl::getAttr<clang::VisibilityAttr>() const
Line
Count
Source
532
6.14M
  template<typename T> T *getAttr() const {
533
6.14M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())1.68M
:
nullptr4.45M
;
534
6.14M
  }
clang::TypeVisibilityAttr* clang::Decl::getAttr<clang::TypeVisibilityAttr>() const
Line
Count
Source
532
2.30M
  template<typename T> T *getAttr() const {
533
2.30M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())372k
:
nullptr1.93M
;
534
2.30M
  }
clang::OptimizeNoneAttr* clang::Decl::getAttr<clang::OptimizeNoneAttr>() const
Line
Count
Source
532
1.78M
  template<typename T> T *getAttr() const {
533
1.78M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())820k
:
nullptr964k
;
534
1.78M
  }
clang::InternalLinkageAttr* clang::Decl::getAttr<clang::InternalLinkageAttr>() const
Line
Count
Source
532
9
  template<typename T> T *getAttr() const {
533
9
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr7
;
534
9
  }
clang::CommonAttr* clang::Decl::getAttr<clang::CommonAttr>() const
Line
Count
Source
532
41
  template<typename T> T *getAttr() const {
533
41
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())11
:
nullptr30
;
534
41
  }
clang::AlwaysInlineAttr* clang::Decl::getAttr<clang::AlwaysInlineAttr>() const
Line
Count
Source
532
307
  template<typename T> T *getAttr() const {
533
307
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())157
:
nullptr150
;
534
307
  }
clang::MinSizeAttr* clang::Decl::getAttr<clang::MinSizeAttr>() const
Line
Count
Source
532
80
  template<typename T> T *getAttr() const {
533
80
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())14
:
nullptr66
;
534
80
  }
clang::ParameterABIAttr* clang::Decl::getAttr<clang::ParameterABIAttr>() const
Line
Count
Source
532
9.07M
  template<typename T> T *getAttr() const {
533
9.07M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())8.38k
:
nullptr9.06M
;
534
9.07M
  }
clang::UuidAttr* clang::Decl::getAttr<clang::UuidAttr>() const
Line
Count
Source
532
305
  template<typename T> T *getAttr() const {
533
305
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())168
:
nullptr137
;
534
305
  }
clang::TrivialABIAttr* clang::Decl::getAttr<clang::TrivialABIAttr>() const
Line
Count
Source
532
16
  template<typename T> T *getAttr() const {
533
16
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
16
  }
clang::FinalAttr* clang::Decl::getAttr<clang::FinalAttr>() const
Line
Count
Source
532
456k
  template<typename T> T *getAttr() const {
533
456k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())28.6k
:
nullptr427k
;
534
456k
  }
clang::OverrideAttr* clang::Decl::getAttr<clang::OverrideAttr>() const
Line
Count
Source
532
18
  template<typename T> T *getAttr() const {
533
18
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
18
  }
clang::UnusedAttr* clang::Decl::getAttr<clang::UnusedAttr>() const
Line
Count
Source
532
41.5M
  template<typename T> T *getAttr() const {
533
41.5M
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2.68M
:
nullptr38.8M
;
534
41.5M
  }
clang::ObjCBridgeRelatedAttr* clang::Decl::getAttr<clang::ObjCBridgeRelatedAttr>() const
Line
Count
Source
532
757
  template<typename T> T *getAttr() const {
533
757
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())461
:
nullptr296
;
534
757
  }
clang::ObjCBridgeAttr* clang::Decl::getAttr<clang::ObjCBridgeAttr>() const
Line
Count
Source
532
703k
  template<typename T> T *getAttr() const {
533
703k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())26.9k
:
nullptr676k
;
534
703k
  }
clang::ObjCBridgeMutableAttr* clang::Decl::getAttr<clang::ObjCBridgeMutableAttr>() const
Line
Count
Source
532
684k
  template<typename T> T *getAttr() const {
533
684k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())7.81k
:
nullptr676k
;
534
684k
  }
clang::WarnUnusedResultAttr* clang::Decl::getAttr<clang::WarnUnusedResultAttr>() const
Line
Count
Source
532
750k
  template<typename T> T *getAttr() const {
533
750k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())341k
:
nullptr409k
;
534
750k
  }
clang::WarnUnusedAttr* clang::Decl::getAttr<clang::WarnUnusedAttr>() const
Line
Count
Source
532
5
  template<typename T> T *getAttr() const {
533
5
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())2
:
nullptr3
;
534
5
  }
clang::TestTypestateAttr* clang::Decl::getAttr<clang::TestTypestateAttr>() const
Line
Count
Source
532
43
  template<typename T> T *getAttr() const {
533
43
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
43
  }
clang::ConsumableAttr* clang::Decl::getAttr<clang::ConsumableAttr>() const
Line
Count
Source
532
42
  template<typename T> T *getAttr() const {
533
42
    return hasAttrs() ? getSpecificAttr<T>(getAttrs()) : 
nullptr0
;
534
42
  }
clang::CallableWhenAttr* clang::Decl::getAttr<clang::CallableWhenAttr>() const
Line
Count
Source
532
285
  template<typename T> T *getAttr() const {
533
285
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())271
:
nullptr14
;
534
285
  }
clang::ParamTypestateAttr* clang::Decl::getAttr<clang::ParamTypestateAttr>() const
Line
Count
Source
532
67
  template<typename T> T *getAttr() const {
533
67
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())16
:
nullptr51
;
534
67
  }
clang::ReturnTypestateAttr* clang::Decl::getAttr<clang::ReturnTypestateAttr>() const
Line
Count
Source
532
250
  template<typename T> T *getAttr() const {
533
250
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())34
:
nullptr216
;
534
250
  }
clang::SetTypestateAttr* clang::Decl::getAttr<clang::SetTypestateAttr>() const
Line
Count
Source
532
213
  template<typename T> T *getAttr() const {
533
213
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())200
:
nullptr13
;
534
213
  }
clang::CapabilityAttr* clang::Decl::getAttr<clang::CapabilityAttr>() const
Line
Count
Source
532
3.69k
  template<typename T> T *getAttr() const {
533
3.69k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.57k
:
nullptr120
;
534
3.69k
  }
clang::LockReturnedAttr* clang::Decl::getAttr<clang::LockReturnedAttr>() const
Line
Count
Source
532
360
  template<typename T> T *getAttr() const {
533
360
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())172
:
nullptr188
;
534
360
  }
clang::EnumExtensibilityAttr* clang::Decl::getAttr<clang::EnumExtensibilityAttr>() const
Line
Count
Source
532
66.9k
  template<typename T> T *getAttr() const {
533
66.9k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.75k
:
nullptr63.2k
;
534
66.9k
  }
clang::ExternalSourceSymbolAttr* clang::Decl::getAttr<clang::ExternalSourceSymbolAttr>() const
Line
Count
Source
532
57.3k
  template<typename T> T *getAttr() const {
533
57.3k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())571
:
nullptr56.8k
;
534
57.3k
  }
clang::ObjCMethodFamilyAttr* clang::Decl::getAttr<clang::ObjCMethodFamilyAttr>() const
Line
Count
Source
532
28.8k
  template<typename T> T *getAttr() const {
533
28.8k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())3.44k
:
nullptr25.4k
;
534
28.8k
  }
clang::ObjCRuntimeNameAttr* clang::Decl::getAttr<clang::ObjCRuntimeNameAttr>() const
Line
Count
Source
532
10.5k
  template<typename T> T *getAttr() const {
533
10.5k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())974
:
nullptr9.59k
;
534
10.5k
  }
clang::MSVtorDispAttr* clang::Decl::getAttr<clang::MSVtorDispAttr>() const
Line
Count
Source
532
1.24k
  template<typename T> T *getAttr() const {
533
1.24k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())139
:
nullptr1.10k
;
534
1.24k
  }
clang::MaxFieldAlignmentAttr* clang::Decl::getAttr<clang::MaxFieldAlignmentAttr>() const
Line
Count
Source
532
175k
  template<typename T> T *getAttr() const {
533
175k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())18.7k
:
nullptr156k
;
534
175k
  }
clang::LayoutVersionAttr* clang::Decl::getAttr<clang::LayoutVersionAttr>() const
Line
Count
Source
532
2.77k
  template<typename T> T *getAttr() const {
533
2.77k
    return hasAttrs() ? 
getSpecificAttr<T>(getAttrs())779
:
nullptr1.99k
;
534
2.77k
  }
535
536
446M
  template<typename T> bool hasAttr() const {
537
446M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())140M
;
538
446M
  }
bool clang::Decl::hasAttr<clang::DLLExportAttr>() const
Line
Count
Source
536
9.80M
  template<typename T> bool hasAttr() const {
537
9.80M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.81M
;
538
9.80M
  }
bool clang::Decl::hasAttr<clang::CUDADeviceAttr>() const
Line
Count
Source
536
2.76k
  template<typename T> bool hasAttr() const {
537
2.76k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.23k
;
538
2.76k
  }
bool clang::Decl::hasAttr<clang::CUDASharedAttr>() const
Line
Count
Source
536
9.34k
  template<typename T> bool hasAttr() const {
537
9.34k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())787
;
538
9.34k
  }
bool clang::Decl::hasAttr<clang::CUDAGlobalAttr>() const
Line
Count
Source
536
3.95M
  template<typename T> bool hasAttr() const {
537
3.95M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.09M
;
538
3.95M
  }
bool clang::Decl::hasAttr<clang::NSConsumedAttr>() const
Line
Count
Source
536
26.0k
  template<typename T> bool hasAttr() const {
537
26.0k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.11k
;
538
26.0k
  }
bool clang::Decl::hasAttr<clang::PassObjectSizeAttr>() const
Line
Count
Source
536
11.6M
  template<typename T> bool hasAttr() const {
537
11.6M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())9.88k
;
538
11.6M
  }
bool clang::Decl::hasAttr<clang::AsmLabelAttr>() const
Line
Count
Source
536
2.88M
  template<typename T> bool hasAttr() const {
537
2.88M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.54M
;
538
2.88M
  }
bool clang::Decl::hasAttr<clang::ConstAttr>() const
Line
Count
Source
536
3.20M
  template<typename T> bool hasAttr() const {
537
3.20M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.28M
;
538
3.20M
  }
bool clang::Decl::hasAttr<clang::AlwaysInlineAttr>() const
Line
Count
Source
536
2.85M
  template<typename T> bool hasAttr() const {
537
2.85M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.17M
;
538
2.85M
  }
bool clang::Decl::hasAttr<clang::FinalAttr>() const
Line
Count
Source
536
5.61M
  template<typename T> bool hasAttr() const {
537
5.61M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.16M
;
538
5.61M
  }
bool clang::Decl::hasAttr<clang::StdCallAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())200
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::FastCallAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::RegCallAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::ThisCallAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::VectorCallAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::PascalAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::IntelOclBiccAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::MSABIAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())198
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::SysVABIAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())196
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::PreserveMostAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())196
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::PreserveAllAttr>() const
Line
Count
Source
536
3.77k
  template<typename T> bool hasAttr() const {
537
3.77k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())196
;
538
3.77k
  }
bool clang::Decl::hasAttr<clang::NoEscapeAttr>() const
Line
Count
Source
536
9.09M
  template<typename T> bool hasAttr() const {
537
9.09M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8.98k
;
538
9.09M
  }
bool clang::Decl::hasAttr<clang::NSReturnsRetainedAttr>() const
Line
Count
Source
536
35.2k
  template<typename T> bool hasAttr() const {
537
35.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())7.65k
;
538
35.2k
  }
bool clang::Decl::hasAttr<clang::ReturnsTwiceAttr>() const
Line
Count
Source
536
1.65M
  template<typename T> bool hasAttr() const {
537
1.65M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())548k
;
538
1.65M
  }
bool clang::Decl::hasAttr<clang::NoThrowAttr>() const
Line
Count
Source
536
2.87M
  template<typename T> bool hasAttr() const {
537
2.87M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())918k
;
538
2.87M
  }
bool clang::Decl::hasAttr<clang::NoReturnAttr>() const
Line
Count
Source
536
6.11M
  template<typename T> bool hasAttr() const {
537
6.11M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.60M
;
538
6.11M
  }
bool clang::Decl::hasAttr<clang::ColdAttr>() const
Line
Count
Source
536
1.53M
  template<typename T> bool hasAttr() const {
537
1.53M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())474k
;
538
1.53M
  }
bool clang::Decl::hasAttr<clang::NoDuplicateAttr>() const
Line
Count
Source
536
1.46M
  template<typename T> bool hasAttr() const {
537
1.46M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())471k
;
538
1.46M
  }
bool clang::Decl::hasAttr<clang::ConvergentAttr>() const
Line
Count
Source
536
1.21M
  template<typename T> bool hasAttr() const {
537
1.21M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())378k
;
538
1.21M
  }
bool clang::Decl::hasAttr<clang::PureAttr>() const
Line
Count
Source
536
2.01M
  template<typename T> bool hasAttr() const {
537
2.01M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())743k
;
538
2.01M
  }
bool clang::Decl::hasAttr<clang::NoAliasAttr>() const
Line
Count
Source
536
1.20M
  template<typename T> bool hasAttr() const {
537
1.20M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())375k
;
538
1.20M
  }
bool clang::Decl::hasAttr<clang::RestrictAttr>() const
Line
Count
Source
536
1.21M
  template<typename T> bool hasAttr() const {
537
1.21M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())378k
;
538
1.21M
  }
bool clang::Decl::hasAttr<clang::ReturnsNonNullAttr>() const
Line
Count
Source
536
1.21M
  template<typename T> bool hasAttr() const {
537
1.21M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())378k
;
538
1.21M
  }
bool clang::Decl::hasAttr<clang::AnyX86NoCallerSavedRegistersAttr>() const
Line
Count
Source
536
1.21M
  template<typename T> bool hasAttr() const {
537
1.21M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())378k
;
538
1.21M
  }
bool clang::Decl::hasAttr<clang::AnyX86NoCfCheckAttr>() const
Line
Count
Source
536
1.21M
  template<typename T> bool hasAttr() const {
537
1.21M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())378k
;
538
1.21M
  }
bool clang::Decl::hasAttr<clang::OptimizeNoneAttr>() const
Line
Count
Source
536
1.79M
  template<typename T> bool hasAttr() const {
537
1.79M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())567k
;
538
1.79M
  }
bool clang::Decl::hasAttr<clang::NoSplitStackAttr>() const
Line
Count
Source
536
8
  template<typename T> bool hasAttr() const {
537
8
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4
;
538
8
  }
bool clang::Decl::hasAttr<clang::OpenCLKernelAttr>() const
Line
Count
Source
536
9.13M
  template<typename T> bool hasAttr() const {
537
9.13M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.49M
;
538
9.13M
  }
bool clang::Decl::hasAttr<clang::DisableTailCallsAttr>() const
Line
Count
Source
536
402k
  template<typename T> bool hasAttr() const {
537
402k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())110k
;
538
402k
  }
bool clang::Decl::hasAttr<clang::AnyX86InterruptAttr>() const
Line
Count
Source
536
3.19M
  template<typename T> bool hasAttr() const {
537
3.19M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.90M
;
538
3.19M
  }
bool clang::Decl::hasAttr<clang::NakedAttr>() const
Line
Count
Source
536
6.93M
  template<typename T> bool hasAttr() const {
537
6.93M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.92M
;
538
6.93M
  }
bool clang::Decl::hasAttr<clang::FlattenAttr>() const
Line
Count
Source
536
810k
  template<typename T> bool hasAttr() const {
537
810k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())117k
;
538
810k
  }
bool clang::Decl::hasAttr<clang::NoInlineAttr>() const
Line
Count
Source
536
256k
  template<typename T> bool hasAttr() const {
537
256k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())93.1k
;
538
256k
  }
bool clang::Decl::hasAttr<clang::NotTailCalledAttr>() const
Line
Count
Source
536
772k
  template<typename T> bool hasAttr() const {
537
772k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())255k
;
538
772k
  }
bool clang::Decl::hasAttr<clang::AlignedAttr>() const
Line
Count
Source
536
470k
  template<typename T> bool hasAttr() const {
537
470k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())108k
;
538
470k
  }
bool clang::Decl::hasAttr<clang::DLLImportAttr>() const
Line
Count
Source
536
13.6M
  template<typename T> bool hasAttr() const {
537
13.6M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.82M
;
538
13.6M
  }
bool clang::Decl::hasAttr<clang::NoDebugAttr>() const
Line
Count
Source
536
321k
  template<typename T> bool hasAttr() const {
537
321k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())96.4k
;
538
321k
  }
bool clang::Decl::hasAttr<clang::ArtificialAttr>() const
Line
Count
Source
536
108k
  template<typename T> bool hasAttr() const {
537
108k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())31.2k
;
538
108k
  }
bool clang::Decl::hasAttr<clang::BlocksAttr>() const
Line
Count
Source
536
20.1M
  template<typename T> bool hasAttr() const {
537
20.1M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())206k
;
538
20.1M
  }
bool clang::Decl::hasAttr<clang::AnnotateAttr>() const
Line
Count
Source
536
1.89M
  template<typename T> bool hasAttr() const {
537
1.89M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())109k
;
538
1.89M
  }
bool clang::Decl::hasAttr<clang::UsedAttr>() const
Line
Count
Source
536
25.4M
  template<typename T> bool hasAttr() const {
537
25.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.92M
;
538
25.4M
  }
bool clang::Decl::hasAttr<clang::ObjCPreciseLifetimeAttr>() const
Line
Count
Source
536
15.4M
  template<typename T> bool hasAttr() const {
537
15.4M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())547k
;
538
15.4M
  }
bool clang::Decl::hasAttr<clang::OMPThreadPrivateDeclAttr>() const
Line
Count
Source
536
1.04M
  template<typename T> bool hasAttr() const {
537
1.04M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())25.6k
;
538
1.04M
  }
bool clang::Decl::hasAttr<clang::CUDAConstantAttr>() const
Line
Count
Source
536
4.53k
  template<typename T> bool hasAttr() const {
537
4.53k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())692
;
538
4.53k
  }
bool clang::Decl::hasAttr<clang::SelectAnyAttr>() const
Line
Count
Source
536
275k
  template<typename T> bool hasAttr() const {
537
275k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())34.3k
;
538
275k
  }
bool clang::Decl::hasAttr<clang::WeakRefAttr>() const
Line
Count
Source
536
15.8M
  template<typename T> bool hasAttr() const {
537
15.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())7.18M
;
538
15.8M
  }
bool clang::Decl::hasAttr<clang::MayAliasAttr>() const
Line
Count
Source
536
4.03M
  template<typename T> bool hasAttr() const {
537
4.03M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())74.1k
;
538
4.03M
  }
bool clang::Decl::hasAttr<clang::TargetAttr>() const
Line
Count
Source
536
7.33M
  template<typename T> bool hasAttr() const {
537
7.33M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.19M
;
538
7.33M
  }
bool clang::Decl::hasAttr<clang::NSConsumesSelfAttr>() const
Line
Count
Source
536
8.52k
  template<typename T> bool hasAttr() const {
537
8.52k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.01k
;
538
8.52k
  }
bool clang::Decl::hasAttr<clang::ObjCReturnsInnerPointerAttr>() const
Line
Count
Source
536
22.2k
  template<typename T> bool hasAttr() const {
537
22.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.30k
;
538
22.2k
  }
bool clang::Decl::hasAttr<clang::ObjCRuntimeVisibleAttr>() const
Line
Count
Source
536
2.38k
  template<typename T> bool hasAttr() const {
537
2.38k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())177
;
538
2.38k
  }
bool clang::Decl::hasAttr<clang::ObjCExceptionAttr>() const
Line
Count
Source
536
945
  template<typename T> bool hasAttr() const {
537
945
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())180
;
538
945
  }
bool clang::Decl::hasAttr<clang::OMPCaptureNoInitAttr>() const
Line
Count
Source
536
3.66k
  template<typename T> bool hasAttr() const {
537
3.66k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())172
;
538
3.66k
  }
bool clang::Decl::hasAttr<clang::CUDAHostAttr>() const
Line
Count
Source
536
1.42k
  template<typename T> bool hasAttr() const {
537
1.42k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())999
;
538
1.42k
  }
bool clang::Decl::hasAttr<clang::LTOVisibilityPublicAttr>() const
Line
Count
Source
536
192
  template<typename T> bool hasAttr() const {
537
192
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())14
;
538
192
  }
bool clang::Decl::hasAttr<clang::UuidAttr>() const
Line
Count
Source
536
188
  template<typename T> bool hasAttr() const {
537
188
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10
;
538
188
  }
bool clang::Decl::hasAttr<clang::NoInstrumentFunctionAttr>() const
Line
Count
Source
536
132
  template<typename T> bool hasAttr() const {
537
132
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())27
;
538
132
  }
bool clang::Decl::hasAttr<clang::CPUSpecificAttr>() const
Line
Count
Source
536
6.71M
  template<typename T> bool hasAttr() const {
537
6.71M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.57M
;
538
6.71M
  }
bool clang::Decl::hasAttr<clang::NoCommonAttr>() const
Line
Count
Source
536
17.3k
  template<typename T> bool hasAttr() const {
537
17.3k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())849
;
538
17.3k
  }
bool clang::Decl::hasAttr<clang::CommonAttr>() const
Line
Count
Source
536
52
  template<typename T> bool hasAttr() const {
537
52
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())38
;
538
52
  }
bool clang::Decl::hasAttr<clang::SectionAttr>() const
Line
Count
Source
536
6.01M
  template<typename T> bool hasAttr() const {
537
6.01M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())247k
;
538
6.01M
  }
bool clang::Decl::hasAttr<clang::PragmaClangBSSSectionAttr>() const
Line
Count
Source
536
13.2k
  template<typename T> bool hasAttr() const {
537
13.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())428
;
538
13.2k
  }
bool clang::Decl::hasAttr<clang::PragmaClangDataSectionAttr>() const
Line
Count
Source
536
13.2k
  template<typename T> bool hasAttr() const {
537
13.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())423
;
538
13.2k
  }
bool clang::Decl::hasAttr<clang::PragmaClangRodataSectionAttr>() const
Line
Count
Source
536
13.2k
  template<typename T> bool hasAttr() const {
537
13.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())423
;
538
13.2k
  }
bool clang::Decl::hasAttr<clang::WeakImportAttr>() const
Line
Count
Source
536
86.3k
  template<typename T> bool hasAttr() const {
537
86.3k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.51k
;
538
86.3k
  }
bool clang::Decl::hasAttr<clang::IFuncAttr>() const
Line
Count
Source
536
23.5M
  template<typename T> bool hasAttr() const {
537
23.5M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.37M
;
538
23.5M
  }
bool clang::Decl::hasAttr<clang::NoStackProtectorAttr>() const
Line
Count
Source
536
326k
  template<typename T> bool hasAttr() const {
537
326k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())95.8k
;
538
326k
  }
bool clang::Decl::hasAttr<clang::MinSizeAttr>() const
Line
Count
Source
536
652k
  template<typename T> bool hasAttr() const {
537
652k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())191k
;
538
652k
  }
bool clang::Decl::hasAttr<clang::WeakAttr>() const
Line
Count
Source
536
1.50M
  template<typename T> bool hasAttr() const {
537
1.50M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())273k
;
538
1.50M
  }
bool clang::Decl::hasAttr<clang::OMPDeclareSimdDeclAttr>() const
Line
Count
Source
536
20.8k
  template<typename T> bool hasAttr() const {
537
20.8k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())126
;
538
20.8k
  }
bool clang::Decl::hasAttr<clang::AliasAttr>() const
Line
Count
Source
536
29.0M
  template<typename T> bool hasAttr() const {
537
29.0M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())8.59M
;
538
29.0M
  }
bool clang::Decl::hasAttr<clang::CPUDispatchAttr>() const
Line
Count
Source
536
11.3M
  template<typename T> bool hasAttr() const {
537
11.3M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.50M
;
538
11.3M
  }
bool clang::Decl::hasAttr<clang::MSInheritanceAttr>() const
Line
Count
Source
536
5.08k
  template<typename T> bool hasAttr() const {
537
5.08k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.70k
;
538
5.08k
  }
bool clang::Decl::hasAttr<clang::MSNoVTableAttr>() const
Line
Count
Source
536
790
  template<typename T> bool hasAttr() const {
537
790
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())164
;
538
790
  }
bool clang::Decl::hasAttr<clang::TransparentUnionAttr>() const
Line
Count
Source
536
233
  template<typename T> bool hasAttr() const {
537
233
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())144
;
538
233
  }
bool clang::Decl::hasAttr<clang::PackedAttr>() const
Line
Count
Source
536
913k
  template<typename T> bool hasAttr() const {
537
913k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())27.2k
;
538
913k
  }
bool clang::Decl::hasAttr<clang::MipsLongCallAttr>() const
Line
Count
Source
536
717
  template<typename T> bool hasAttr() const {
537
717
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())73
;
538
717
  }
bool clang::Decl::hasAttr<clang::MipsShortCallAttr>() const
Line
Count
Source
536
711
  template<typename T> bool hasAttr() const {
537
711
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())67
;
538
711
  }
bool clang::Decl::hasAttr<clang::Mips16Attr>() const
Line
Count
Source
536
333
  template<typename T> bool hasAttr() const {
537
333
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())30
;
538
333
  }
bool clang::Decl::hasAttr<clang::NoMips16Attr>() const
Line
Count
Source
536
332
  template<typename T> bool hasAttr() const {
537
332
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())29
;
538
332
  }
bool clang::Decl::hasAttr<clang::MicroMipsAttr>() const
Line
Count
Source
536
333
  template<typename T> bool hasAttr() const {
537
333
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())30
;
538
333
  }
bool clang::Decl::hasAttr<clang::NoMicroMipsAttr>() const
Line
Count
Source
536
332
  template<typename T> bool hasAttr() const {
537
332
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())29
;
538
332
  }
bool clang::Decl::hasAttr<clang::X86ForceAlignArgPointerAttr>() const
Line
Count
Source
536
124k
  template<typename T> bool hasAttr() const {
537
124k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())31.9k
;
538
124k
  }
bool clang::Decl::hasAttr<clang::CFAuditedTransferAttr>() const
Line
Count
Source
536
29.2k
  template<typename T> bool hasAttr() const {
537
29.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())6.09k
;
538
29.2k
  }
bool clang::Decl::hasAttr<clang::CFReturnsRetainedAttr>() const
Line
Count
Source
536
2.54k
  template<typename T> bool hasAttr() const {
537
2.54k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())167
;
538
2.54k
  }
bool clang::Decl::hasAttr<clang::CFReturnsNotRetainedAttr>() const
Line
Count
Source
536
2.53k
  template<typename T> bool hasAttr() const {
537
2.53k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())121
;
538
2.53k
  }
bool clang::Decl::hasAttr<clang::NSReturnsNotRetainedAttr>() const
Line
Count
Source
536
54.6k
  template<typename T> bool hasAttr() const {
537
54.6k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10.2k
;
538
54.6k
  }
bool clang::Decl::hasAttr<clang::NSReturnsAutoreleasedAttr>() const
Line
Count
Source
536
1.01k
  template<typename T> bool hasAttr() const {
537
1.01k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())44
;
538
1.01k
  }
bool clang::Decl::hasAttr<clang::CFConsumedAttr>() const
Line
Count
Source
536
1.57k
  template<typename T> bool hasAttr() const {
537
1.57k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())69
;
538
1.57k
  }
bool clang::Decl::hasAttr<clang::IBOutletAttr>() const
Line
Count
Source
536
703
  template<typename T> bool hasAttr() const {
537
703
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())32
;
538
703
  }
bool clang::Decl::hasAttr<clang::UnusedAttr>() const
Line
Count
Source
536
19.9M
  template<typename T> bool hasAttr() const {
537
19.9M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())3.51M
;
538
19.9M
  }
bool clang::Decl::hasAttr<clang::OverrideAttr>() const
Line
Count
Source
536
6.56M
  template<typename T> bool hasAttr() const {
537
6.56M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.71M
;
538
6.56M
  }
bool clang::Decl::hasAttr<clang::AnalyzerNoReturnAttr>() const
Line
Count
Source
536
507k
  template<typename T> bool hasAttr() const {
537
507k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())171k
;
538
507k
  }
bool clang::Decl::hasAttr<clang::NonNullAttr>() const
Line
Count
Source
536
4.81M
  template<typename T> bool hasAttr() const {
537
4.81M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())14.0k
;
538
4.81M
  }
bool clang::Decl::hasAttr<clang::IBOutletCollectionAttr>() const
Line
Count
Source
536
1.07k
  template<typename T> bool hasAttr() const {
537
1.07k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())81
;
538
1.07k
  }
bool clang::Decl::hasAttr<clang::CleanupAttr>() const
Line
Count
Source
536
2.61M
  template<typename T> bool hasAttr() const {
537
2.61M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())41.6k
;
538
2.61M
  }
bool clang::Decl::hasAttr<clang::OverloadableAttr>() const
Line
Count
Source
536
21.8M
  template<typename T> bool hasAttr() const {
537
21.8M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())14.7M
;
538
21.8M
  }
bool clang::Decl::hasAttr<clang::OMPDeclareTargetDeclAttr>() const
Line
Count
Source
536
483k
  template<typename T> bool hasAttr() const {
537
483k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())126k
;
538
483k
  }
bool clang::Decl::hasAttr<clang::UnavailableAttr>() const
Line
Count
Source
536
737k
  template<typename T> bool hasAttr() const {
537
737k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.07k
;
538
737k
  }
bool clang::Decl::hasAttr<clang::CFUnknownTransferAttr>() const
Line
Count
Source
536
26.5k
  template<typename T> bool hasAttr() const {
537
26.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())5.80k
;
538
26.5k
  }
bool clang::Decl::hasAttr<clang::CUDAInvalidTargetAttr>() const
Line
Count
Source
536
28.2k
  template<typename T> bool hasAttr() const {
537
28.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())25.0k
;
538
28.2k
  }
bool clang::Decl::hasAttr<clang::WarnUnusedAttr>() const
Line
Count
Source
536
21.5k
  template<typename T> bool hasAttr() const {
537
21.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())223
;
538
21.5k
  }
bool clang::Decl::hasAttr<clang::CodeSegAttr>() const
Line
Count
Source
536
5.28M
  template<typename T> bool hasAttr() const {
537
5.28M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())90.0k
;
538
5.28M
  }
bool clang::Decl::hasAttr<clang::CarriesDependencyAttr>() const
Line
Count
Source
536
5
  template<typename T> bool hasAttr() const {
537
5
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2
;
538
5
  }
bool clang::Decl::hasAttr<clang::GNUInlineAttr>() const
Line
Count
Source
536
4.80M
  template<typename T> bool hasAttr() const {
537
4.80M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.99M
;
538
4.80M
  }
bool clang::Decl::hasAttr<clang::InternalLinkageAttr>() const
Line
Count
Source
536
63.1M
  template<typename T> bool hasAttr() const {
537
63.1M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())27.2M
;
538
63.1M
  }
bool clang::Decl::hasAttr<clang::CXX11NoReturnAttr>() const
Line
Count
Source
536
4.89M
  template<typename T> bool hasAttr() const {
537
4.89M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.22M
;
538
4.89M
  }
bool clang::Decl::hasAttr<clang::ConstructorAttr>() const
Line
Count
Source
536
3.54M
  template<typename T> bool hasAttr() const {
537
3.54M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.33M
;
538
3.54M
  }
bool clang::Decl::hasAttr<clang::DestructorAttr>() const
Line
Count
Source
536
3.54M
  template<typename T> bool hasAttr() const {
537
3.54M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.33M
;
538
3.54M
  }
bool clang::Decl::hasAttr<clang::RequireConstantInitAttr>() const
Line
Count
Source
536
210k
  template<typename T> bool hasAttr() const {
537
210k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())10.4k
;
538
210k
  }
bool clang::Decl::hasAttr<clang::TypeTagForDatatypeAttr>() const
Line
Count
Source
536
2.26M
  template<typename T> bool hasAttr() const {
537
2.26M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())41.6k
;
538
2.26M
  }
bool clang::Decl::hasAttr<clang::FormatAttr>() const
Line
Count
Source
536
57.5k
  template<typename T> bool hasAttr() const {
537
57.5k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())33.9k
;
538
57.5k
  }
bool clang::Decl::hasAttr<clang::FormatArgAttr>() const
Line
Count
Source
536
34
  template<typename T> bool hasAttr() const {
537
34
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())33
;
538
34
  }
bool clang::Decl::hasAttr<clang::OpenCLAccessAttr>() const
Line
Count
Source
536
6.28k
  template<typename T> bool hasAttr() const {
537
6.28k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4
;
538
6.28k
  }
bool clang::Decl::hasAttr<clang::CapabilityAttr>() const
Line
Count
Source
536
2.58k
  template<typename T> bool hasAttr() const {
537
2.58k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.44k
;
538
2.58k
  }
bool clang::Decl::hasAttr<clang::ConsumableAttr>() const
Line
Count
Source
536
247
  template<typename T> bool hasAttr() const {
537
247
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())239
;
538
247
  }
bool clang::Decl::hasAttr<clang::AvailabilityAttr>() const
Line
Count
Source
536
66
  template<typename T> bool hasAttr() const {
537
66
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11
;
538
66
  }
bool clang::Decl::hasAttr<clang::TrivialABIAttr>() const
Line
Count
Source
536
3.53M
  template<typename T> bool hasAttr() const {
537
3.53M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())504k
;
538
3.53M
  }
bool clang::Decl::hasAttr<clang::VisibilityAttr>() const
Line
Count
Source
536
204k
  template<typename T> bool hasAttr() const {
537
204k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())85.3k
;
538
204k
  }
bool clang::Decl::hasAttr<clang::ObjCExplicitProtocolImplAttr>() const
Line
Count
Source
536
1.29k
  template<typename T> bool hasAttr() const {
537
1.29k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())36
;
538
1.29k
  }
bool clang::Decl::hasAttr<clang::ObjCRequiresSuperAttr>() const
Line
Count
Source
536
4.68k
  template<typename T> bool hasAttr() const {
537
4.68k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())549
;
538
4.68k
  }
bool clang::Decl::hasAttr<clang::DeprecatedAttr>() const
Line
Count
Source
536
53
  template<typename T> bool hasAttr() const {
537
53
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())11
;
538
53
  }
bool clang::Decl::hasAttr<clang::ObjCRootClassAttr>() const
Line
Count
Source
536
3.99k
  template<typename T> bool hasAttr() const {
537
3.99k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())128
;
538
3.99k
  }
bool clang::Decl::hasAttr<clang::ObjCSubclassingRestrictedAttr>() const
Line
Count
Source
536
14.0k
  template<typename T> bool hasAttr() const {
537
14.0k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.14k
;
538
14.0k
  }
bool clang::Decl::hasAttr<clang::ARMInterruptAttr>() const
Line
Count
Source
536
2.62M
  template<typename T> bool hasAttr() const {
537
2.62M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1.40M
;
538
2.62M
  }
bool clang::Decl::hasAttr<clang::ObjCNSObjectAttr>() const
Line
Count
Source
536
738k
  template<typename T> bool hasAttr() const {
537
738k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())39.9k
;
538
738k
  }
bool clang::Decl::hasAttr<clang::EnableIfAttr>() const
Line
Count
Source
536
1.47M
  template<typename T> bool hasAttr() const {
537
1.47M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())859k
;
538
1.47M
  }
bool clang::Decl::hasAttr<clang::FlagEnumAttr>() const
Line
Count
Source
536
64.1k
  template<typename T> bool hasAttr() const {
537
64.1k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())987
;
538
64.1k
  }
bool clang::Decl::hasAttr<clang::ConsumableSetOnReadAttr>() const
Line
Count
Source
536
18
  template<typename T> bool hasAttr() const {
537
18
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
538
18
  }
bool clang::Decl::hasAttr<clang::TestTypestateAttr>() const
Line
Count
Source
536
187
  template<typename T> bool hasAttr() const {
537
187
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())174
;
538
187
  }
bool clang::Decl::hasAttr<clang::ConsumableAutoCastAttr>() const
Line
Count
Source
536
4
  template<typename T> bool hasAttr() const {
537
4
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
538
4
  }
bool clang::Decl::hasAttr<clang::NoThreadSafetyAnalysisAttr>() const
Line
Count
Source
536
6.61k
  template<typename T> bool hasAttr() const {
537
6.61k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())4.04k
;
538
6.61k
  }
bool clang::Decl::hasAttr<clang::ScopedLockableAttr>() const
Line
Count
Source
536
147
  template<typename T> bool hasAttr() const {
537
147
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())131
;
538
147
  }
bool clang::Decl::hasAttr<clang::PtGuardedVarAttr>() const
Line
Count
Source
536
426
  template<typename T> bool hasAttr() const {
537
426
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
538
426
  }
bool clang::Decl::hasAttr<clang::GuardedVarAttr>() const
Line
Count
Source
536
2.20k
  template<typename T> bool hasAttr() const {
537
2.20k
    return hasAttrs() && hasSpecificAttr<T>(getAttrs());
538
2.20k
  }
bool clang::Decl::hasAttr<clang::TypeVisibilityAttr>() const
Line
Count
Source
536
129k
  template<typename T> bool hasAttr() const {
537
129k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())129k
;
538
129k
  }
bool clang::Decl::hasAttr<clang::ThreadAttr>() const
Line
Count
Source
536
3.61M
  template<typename T> bool hasAttr() const {
537
3.61M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())90.3k
;
538
3.61M
  }
bool clang::Decl::hasAttr<clang::C11NoReturnAttr>() const
Line
Count
Source
536
4.89M
  template<typename T> bool hasAttr() const {
537
4.89M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())2.22M
;
538
4.89M
  }
Unexecuted instantiation: bool clang::Decl::hasAttr<clang::CapturedRecordAttr>() const
bool clang::Decl::hasAttr<clang::MSStructAttr>() const
Line
Count
Source
536
1.80M
  template<typename T> bool hasAttr() const {
537
1.80M
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())256k
;
538
1.80M
  }
bool clang::Decl::hasAttr<clang::ArcWeakrefUnavailableAttr>() const
Line
Count
Source
536
558
  template<typename T> bool hasAttr() const {
537
558
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())81
;
538
558
  }
bool clang::Decl::hasAttr<clang::ObjCRequiresPropertyDefsAttr>() const
Line
Count
Source
536
15.2k
  template<typename T> bool hasAttr() const {
537
15.2k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())695
;
538
15.2k
  }
bool clang::Decl::hasAttr<clang::ObjCDesignatedInitializerAttr>() const
Line
Count
Source
536
88
  template<typename T> bool hasAttr() const {
537
88
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())76
;
538
88
  }
bool clang::Decl::hasAttr<clang::WarnUnusedResultAttr>() const
Line
Count
Source
536
10.8k
  template<typename T> bool hasAttr() const {
537
10.8k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())538
;
538
10.8k
  }
bool clang::Decl::hasAttr<clang::EmptyBasesAttr>() const
Line
Count
Source
536
2.78k
  template<typename T> bool hasAttr() const {
537
2.78k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())795
;
538
2.78k
  }
bool clang::Decl::hasAttr<clang::AlignMac68kAttr>() const
Line
Count
Source
536
171k
  template<typename T> bool hasAttr() const {
537
171k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())17.8k
;
538
171k
  }
bool clang::Decl::hasAttr<clang::ObjCBoxableAttr>() const
Line
Count
Source
536
141
  template<typename T> bool hasAttr() const {
537
141
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())135
;
538
141
  }
bool clang::Decl::hasAttr<clang::ObjCIndependentClassAttr>() const
Line
Count
Source
536
2.31k
  template<typename T> bool hasAttr() const {
537
2.31k
    return hasAttrs() && 
hasSpecificAttr<T>(getAttrs())1
;
538
2.31k
  }
539
540
  /// getMaxAlignment - return the maximum alignment specified by attributes
541
  /// on this decl, 0 if there are none.
542
  unsigned getMaxAlignment() const;
543
544
  /// setInvalidDecl - Indicates the Decl had a semantic error. This
545
  /// allows for graceful error recovery.
546
  void setInvalidDecl(bool Invalid = true);
547
294M
  bool isInvalidDecl() const { return (bool) InvalidDecl; }
548
549
  /// isImplicit - Indicates whether the declaration was implicitly
550
  /// generated by the implementation. If false, this declaration
551
  /// was written explicitly in the source code.
552
31.9M
  bool isImplicit() const { return Implicit; }
553
8.16M
  void setImplicit(bool I = true) { Implicit = I; }
554
555
  /// Whether *any* (re-)declaration of the entity was used, meaning that
556
  /// a definition is required.
557
  ///
558
  /// \param CheckUsedAttr When true, also consider the "used" attribute
559
  /// (in addition to the "used" bit set by \c setUsed()) when determining
560
  /// whether the function is used.
561
  bool isUsed(bool CheckUsedAttr = true) const;
562
563
  /// Set whether the declaration is used, in the sense of odr-use.
564
  ///
565
  /// This should only be used immediately after creating a declaration.
566
  /// It intentionally doesn't notify any listeners.
567
5.42M
  void setIsUsed() { getCanonicalDecl()->Used = true; }
568
569
  /// Mark the declaration used, in the sense of odr-use.
570
  ///
571
  /// This notifies any mutation listeners in addition to setting a bit
572
  /// indicating the declaration is used.
573
  void markUsed(ASTContext &C);
574
575
  /// Whether any declaration of this entity was referenced.
576
  bool isReferenced() const;
577
578
  /// Whether this declaration was referenced. This should not be relied
579
  /// upon for anything other than debugging.
580
5.79k
  bool isThisDeclarationReferenced() const { return Referenced; }
581
582
39.6M
  void setReferenced(bool R = true) { Referenced = R; }
583
584
  /// Whether this declaration is a top-level declaration (function,
585
  /// global variable, etc.) that is lexically inside an objc container
586
  /// definition.
587
615k
  bool isTopLevelDeclInObjCContainer() const {
588
615k
    return TopLevelDeclInObjCContainer;
589
615k
  }
590
591
243k
  void setTopLevelDeclInObjCContainer(bool V = true) {
592
243k
    TopLevelDeclInObjCContainer = V;
593
243k
  }
594
595
  /// Looks on this and related declarations for an applicable
596
  /// external source symbol attribute.
597
  ExternalSourceSymbolAttr *getExternalSourceSymbolAttr() const;
598
599
  /// Whether this declaration was marked as being private to the
600
  /// module in which it was defined.
601
725k
  bool isModulePrivate() const {
602
725k
    return getModuleOwnershipKind() == ModuleOwnershipKind::ModulePrivate;
603
725k
  }
604
605
  /// Whether this declaration is exported (by virtue of being lexically
606
  /// within an ExportDecl or by being a NamespaceDecl).
607
  bool isExported() const;
608
609
  /// Return true if this declaration has an attribute which acts as
610
  /// definition of the entity, such as 'alias' or 'ifunc'.
611
  bool hasDefiningAttr() const;
612
613
  /// Return this declaration's defining attribute if it has one.
614
  const Attr *getDefiningAttr() const;
615
616
protected:
617
  /// Specify that this declaration was marked as being private
618
  /// to the module in which it was defined.
619
39
  void setModulePrivate() {
620
39
    // The module-private specifier has no effect on unowned declarations.
621
39
    // FIXME: We should track this in some way for source fidelity.
622
39
    if (getModuleOwnershipKind() == ModuleOwnershipKind::Unowned)
623
19
      return;
624
20
    setModuleOwnershipKind(ModuleOwnershipKind::ModulePrivate);
625
20
  }
626
627
  /// Set the owning module ID.
628
35.1k
  void setOwningModuleID(unsigned ID) {
629
35.1k
    assert(isFromASTFile() && "Only works on a deserialized declaration");
630
35.1k
    *((unsigned*)this - 2) = ID;
631
35.1k
  }
632
  
633
public:
634
  /// Determine the availability of the given declaration.
635
  ///
636
  /// This routine will determine the most restrictive availability of
637
  /// the given declaration (e.g., preferring 'unavailable' to
638
  /// 'deprecated').
639
  ///
640
  /// \param Message If non-NULL and the result is not \c
641
  /// AR_Available, will be set to a (possibly empty) message
642
  /// describing why the declaration has not been introduced, is
643
  /// deprecated, or is unavailable.
644
  ///
645
  /// \param EnclosingVersion The version to compare with. If empty, assume the
646
  /// deployment target version.
647
  ///
648
  /// \param RealizedPlatform If non-NULL and the availability result is found
649
  /// in an available attribute it will set to the platform which is written in
650
  /// the available attribute.
651
  AvailabilityResult
652
  getAvailability(std::string *Message = nullptr,
653
                  VersionTuple EnclosingVersion = VersionTuple(),
654
                  StringRef *RealizedPlatform = nullptr) const;
655
656
  /// Retrieve the version of the target platform in which this
657
  /// declaration was introduced.
658
  ///
659
  /// \returns An empty version tuple if this declaration has no 'introduced'
660
  /// availability attributes, or the version tuple that's specified in the
661
  /// attribute otherwise.
662
  VersionTuple getVersionIntroduced() const;
663
664
  /// Determine whether this declaration is marked 'deprecated'.
665
  ///
666
  /// \param Message If non-NULL and the declaration is deprecated,
667
  /// this will be set to the message describing why the declaration
668
  /// was deprecated (which may be empty).
669
52.5k
  bool isDeprecated(std::string *Message = nullptr) const {
670
52.5k
    return getAvailability(Message) == AR_Deprecated;
671
52.5k
  }
672
673
  /// Determine whether this declaration is marked 'unavailable'.
674
  ///
675
  /// \param Message If non-NULL and the declaration is unavailable,
676
  /// this will be set to the message describing why the declaration
677
  /// was made unavailable (which may be empty).
678
1.92M
  bool isUnavailable(std::string *Message = nullptr) const {
679
1.92M
    return getAvailability(Message) == AR_Unavailable;
680
1.92M
  }
681
682
  /// Determine whether this is a weak-imported symbol.
683
  ///
684
  /// Weak-imported symbols are typically marked with the
685
  /// 'weak_import' attribute, but may also be marked with an
686
  /// 'availability' attribute where we're targing a platform prior to
687
  /// the introduction of this feature.
688
  bool isWeakImported() const;
689
690
  /// Determines whether this symbol can be weak-imported,
691
  /// e.g., whether it would be well-formed to add the weak_import
692
  /// attribute.
693
  ///
694
  /// \param IsDefinition Set to \c true to indicate that this
695
  /// declaration cannot be weak-imported because it has a definition.
696
  bool canBeWeakImported(bool &IsDefinition) const;
697
698
  /// Determine whether this declaration came from an AST file (such as
699
  /// a precompiled header or module) rather than having been parsed.
700
104M
  bool isFromASTFile() const { return FromASTFile; }
701
702
  /// Retrieve the global declaration ID associated with this
703
  /// declaration, which specifies where this Decl was loaded from.
704
39.3k
  unsigned getGlobalID() const {
705
39.3k
    if (isFromASTFile())
706
39.3k
      return *((const unsigned*)this - 1);
707
0
    return 0;
708
0
  }
709
710
  /// Retrieve the global ID of the module that owns this particular
711
  /// declaration.
712
36.5k
  unsigned getOwningModuleID() const {
713
36.5k
    if (isFromASTFile())
714
36.5k
      return *((const unsigned*)this - 2);
715
0
    return 0;
716
0
  }
717
718
private:
719
  Module *getOwningModuleSlow() const;
720
721
protected:
722
  bool hasLocalOwningModuleStorage() const;
723
724
public:
725
  /// Get the imported owning module, if this decl is from an imported
726
  /// (non-local) module.
727
190k
  Module *getImportedOwningModule() const {
728
190k
    if (!isFromASTFile() || 
!hasOwningModule()189k
)
729
164k
      return nullptr;
730
25.1k
731
25.1k
    return getOwningModuleSlow();
732
25.1k
  }
733
734
  /// Get the local owning module, if known. Returns nullptr if owner is
735
  /// not yet known or declaration is not from a module.
736
21.3M
  Module *getLocalOwningModule() const {
737
21.3M
    if (isFromASTFile() || !hasOwningModule())
738
20.7M
      return nullptr;
739
670k
740
670k
    assert(hasLocalOwningModuleStorage() &&
741
670k
           "owned local decl but no local module storage");
742
670k
    return reinterpret_cast<Module *const *>(this)[-1];
743
670k
  }
744
6.05k
  void setLocalOwningModule(Module *M) {
745
6.05k
    assert(!isFromASTFile() && hasOwningModule() &&
746
6.05k
           hasLocalOwningModuleStorage() &&
747
6.05k
           "should not have a cached owning module");
748
6.05k
    reinterpret_cast<Module **>(this)[-1] = M;
749
6.05k
  }
750
751
  /// Is this declaration owned by some module?
752
22.0M
  bool hasOwningModule() const {
753
22.0M
    return getModuleOwnershipKind() != ModuleOwnershipKind::Unowned;
754
22.0M
  }
755
756
  /// Get the module that owns this declaration (for visibility purposes).
757
21.4M
  Module *getOwningModule() const {
758
21.4M
    return isFromASTFile() ? 
getImportedOwningModule()60.0k
:
getLocalOwningModule()21.3M
;
759
21.4M
  }
760
761
  /// Get the module that owns this declaration for linkage purposes.
762
  /// There only ever is such a module under the C++ Modules TS.
763
  ///
764
  /// \param IgnoreLinkage Ignore the linkage of the entity; assume that
765
  /// all declarations in a global module fragment are unowned.
766
  Module *getOwningModuleForLinkage(bool IgnoreLinkage = false) const;
767
768
  /// Determine whether this declaration might be hidden from name
769
  /// lookup. Note that the declaration might be visible even if this returns
770
  /// \c false, if the owning module is visible within the query context.
771
  // FIXME: Rename this to make it clearer what it does.
772
108M
  bool isHidden() const {
773
108M
    return (int)getModuleOwnershipKind() > (int)ModuleOwnershipKind::Visible;
774
108M
  }
775
776
  /// Set that this declaration is globally visible, even if it came from a
777
  /// module that is not visible.
778
1.12M
  void setVisibleDespiteOwningModule() {
779
1.12M
    if (isHidden())
780
31.4k
      setModuleOwnershipKind(ModuleOwnershipKind::Visible);
781
1.12M
  }
782
783
  /// Get the kind of module ownership for this declaration.
784
170M
  ModuleOwnershipKind getModuleOwnershipKind() const {
785
170M
    return NextInContextAndBits.getInt();
786
170M
  }
787
788
  /// Set whether this declaration is hidden from name lookup.
789
519k
  void setModuleOwnershipKind(ModuleOwnershipKind MOK) {
790
519k
    assert(!(getModuleOwnershipKind() == ModuleOwnershipKind::Unowned &&
791
519k
             MOK != ModuleOwnershipKind::Unowned && !isFromASTFile() &&
792
519k
             !hasLocalOwningModuleStorage()) &&
793
519k
           "no storage available for owning module for this declaration");
794
519k
    NextInContextAndBits.setInt(MOK);
795
519k
  }
796
797
109M
  unsigned getIdentifierNamespace() const {
798
109M
    return IdentifierNamespace;
799
109M
  }
800
801
80.8M
  bool isInIdentifierNamespace(unsigned NS) const {
802
80.8M
    return getIdentifierNamespace() & NS;
803
80.8M
  }
804
805
  static unsigned getIdentifierNamespaceForKind(Kind DK);
806
807
3.47M
  bool hasTagIdentifierNamespace() const {
808
3.47M
    return isTagIdentifierNamespace(getIdentifierNamespace());
809
3.47M
  }
810
811
3.47M
  static bool isTagIdentifierNamespace(unsigned NS) {
812
3.47M
    // TagDecls have Tag and Type set and may also have TagFriend.
813
3.47M
    return (NS & ~IDNS_TagFriend) == (IDNS_Tag | IDNS_Type);
814
3.47M
  }
815
816
  /// getLexicalDeclContext - The declaration context where this Decl was
817
  /// lexically declared (LexicalDC). May be different from
818
  /// getDeclContext() (SemanticDC).
819
  /// e.g.:
820
  ///
821
  ///   namespace A {
822
  ///      void f(); // SemanticDC == LexicalDC == 'namespace A'
823
  ///   }
824
  ///   void A::f(); // SemanticDC == namespace 'A'
825
  ///                // LexicalDC == global namespace
826
200M
  DeclContext *getLexicalDeclContext() {
827
200M
    if (isInSemaDC())
828
189M
      return getSemanticDC();
829
11.1M
    return getMultipleDC()->LexicalDC;
830
11.1M
  }
831
132M
  const DeclContext *getLexicalDeclContext() const {
832
132M
    return const_cast<Decl*>(this)->getLexicalDeclContext();
833
132M
  }
834
835
  /// Determine whether this declaration is declared out of line (outside its
836
  /// semantic context).
837
  virtual bool isOutOfLine() const;
838
839
  /// setDeclContext - Set both the semantic and lexical DeclContext
840
  /// to DC.
841
  void setDeclContext(DeclContext *DC);
842
843
  void setLexicalDeclContext(DeclContext *DC);
844
845
  /// Determine whether this declaration is a templated entity (whether it is
846
  // within the scope of a template parameter).
847
  bool isTemplated() const;
848
849
  /// isDefinedOutsideFunctionOrMethod - This predicate returns true if this
850
  /// scoped decl is defined outside the current function or method.  This is
851
  /// roughly global variables and functions, but also handles enums (which
852
  /// could be defined inside or outside a function etc).
853
2.13M
  bool isDefinedOutsideFunctionOrMethod() const {
854
2.13M
    return getParentFunctionOrMethod() == nullptr;
855
2.13M
  }
856
857
  /// Returns true if this declaration lexically is inside a function.
858
  /// It recognizes non-defining declarations as well as members of local
859
  /// classes:
860
  /// \code
861
  ///     void foo() { void bar(); }
862
  ///     void foo2() { class ABC { void bar(); }; }
863
  /// \endcode
864
  bool isLexicallyWithinFunctionOrMethod() const;
865
866
  /// If this decl is defined inside a function/method/block it returns
867
  /// the corresponding DeclContext, otherwise it returns null.
868
  const DeclContext *getParentFunctionOrMethod() const;
869
7.95k
  DeclContext *getParentFunctionOrMethod() {
870
7.95k
    return const_cast<DeclContext*>(
871
7.95k
                    const_cast<const Decl*>(this)->getParentFunctionOrMethod());
872
7.95k
  }
873
874
  /// Retrieves the "canonical" declaration of the given declaration.
875
1.86M
  virtual Decl *getCanonicalDecl() { return this; }
876
103M
  const Decl *getCanonicalDecl() const {
877
103M
    return const_cast<Decl*>(this)->getCanonicalDecl();
878
103M
  }
879
880
  /// Whether this particular Decl is a canonical one.
881
3.09M
  bool isCanonicalDecl() const { return getCanonicalDecl() == this; }
882
  
883
protected:
884
  /// Returns the next redeclaration or itself if this is the only decl.
885
  ///
886
  /// Decl subclasses that can be redeclared should override this method so that
887
  /// Decl::redecl_iterator can iterate over them.
888
2.48M
  virtual Decl *getNextRedeclarationImpl() { return this; }
889
890
  /// Implementation of getPreviousDecl(), to be overridden by any
891
  /// subclass that has a redeclaration chain.
892
124
  virtual Decl *getPreviousDeclImpl() { return nullptr; }
893
894
  /// Implementation of getMostRecentDecl(), to be overridden by any
895
  /// subclass that has a redeclaration chain.
896
5.07M
  virtual Decl *getMostRecentDeclImpl() { return this; }
897
898
public:
899
  /// Iterates through all the redeclarations of the same decl.
900
  class redecl_iterator {
901
    /// Current - The current declaration.
902
    Decl *Current = nullptr;
903
    Decl *Starter;
904
905
  public:
906
    using value_type = Decl *;
907
    using reference = const value_type &;
908
    using pointer = const value_type *;
909
    using iterator_category = std::forward_iterator_tag;
910
    using difference_type = std::ptrdiff_t;
911
912
15.4M
    redecl_iterator() = default;
913
15.4M
    explicit redecl_iterator(Decl *C) : Current(C), Starter(C) {}
914
915
16.9M
    reference operator*() const { return Current; }
916
    value_type operator->() const { return Current; }
917
918
16.8M
    redecl_iterator& operator++() {
919
16.8M
      assert(Current && "Advancing while iterator has reached end");
920
16.8M
      // Get either previous decl or latest decl.
921
16.8M
      Decl *Next = Current->getNextRedeclarationImpl();
922
16.8M
      assert(Next && "Should return next redeclaration or itself, never null!");
923
16.8M
      Current = (Next != Starter) ? 
Next1.45M
:
nullptr15.4M
;
924
16.8M
      return *this;
925
16.8M
    }
926
927
0
    redecl_iterator operator++(int) {
928
0
      redecl_iterator tmp(*this);
929
0
      ++(*this);
930
0
      return tmp;
931
0
    }
932
933
0
    friend bool operator==(redecl_iterator x, redecl_iterator y) {
934
0
      return x.Current == y.Current;
935
0
    }
936
937
32.3M
    friend bool operator!=(redecl_iterator x, redecl_iterator y) {
938
32.3M
      return x.Current != y.Current;
939
32.3M
    }
940
  };
941
942
  using redecl_range = llvm::iterator_range<redecl_iterator>;
943
944
  /// Returns an iterator range for all the redeclarations of the same
945
  /// decl. It will iterate at least once (when this decl is the only one).
946
15.4M
  redecl_range redecls() const {
947
15.4M
    return redecl_range(redecls_begin(), redecls_end());
948
15.4M
  }
949
950
15.4M
  redecl_iterator redecls_begin() const {
951
15.4M
    return redecl_iterator(const_cast<Decl *>(this));
952
15.4M
  }
953
954
15.4M
  redecl_iterator redecls_end() const { return redecl_iterator(); }
955
956
  /// Retrieve the previous declaration that declares the same entity
957
  /// as this declaration, or NULL if there is no previous declaration.
958
3.71M
  Decl *getPreviousDecl() { return getPreviousDeclImpl(); }
959
  
960
  /// Retrieve the most recent declaration that declares the same entity
961
  /// as this declaration, or NULL if there is no previous declaration.
962
31.4k
  const Decl *getPreviousDecl() const { 
963
31.4k
    return const_cast<Decl *>(this)->getPreviousDeclImpl();
964
31.4k
  }
965
966
  /// True if this is the first declaration in its redeclaration chain.
967
13
  bool isFirstDecl() const {
968
13
    return getPreviousDecl() == nullptr;
969
13
  }
970
971
  /// Retrieve the most recent declaration that declares the same entity
972
  /// as this declaration (which may be this declaration).
973
23.4M
  Decl *getMostRecentDecl() { return getMostRecentDeclImpl(); }
974
975
  /// Retrieve the most recent declaration that declares the same entity
976
  /// as this declaration (which may be this declaration).
977
51.4M
  const Decl *getMostRecentDecl() const { 
978
51.4M
    return const_cast<Decl *>(this)->getMostRecentDeclImpl();
979
51.4M
  }
980
981
  /// getBody - If this Decl represents a declaration for a body of code,
982
  ///  such as a function or method definition, this method returns the
983
  ///  top-level Stmt* of that body.  Otherwise this method returns null.
984
73.6k
  virtual Stmt* getBody() const { return nullptr; }
985
986
  /// Returns true if this \c Decl represents a declaration for a body of
987
  /// code, such as a function or method definition.
988
  /// Note that \c hasBody can also return true if any redeclaration of this
989
  /// \c Decl represents a declaration for a body of code.
990
14.3k
  virtual bool hasBody() const { return getBody() != nullptr; }
991
992
  /// getBodyRBrace - Gets the right brace of the body, if a body exists.
993
  /// This works whether the body is a CompoundStmt or a CXXTryStmt.
994
  SourceLocation getBodyRBrace() const;
995
996
  // global temp stats (until we have a per-module visitor)
997
  static void add(Kind k);
998
  static void EnableStatistics();
999
  static void PrintStats();
1000
1001
  /// isTemplateParameter - Determines whether this declaration is a
1002
  /// template parameter.
1003
  bool isTemplateParameter() const;
1004
1005
  /// isTemplateParameter - Determines whether this declaration is a
1006
  /// template parameter pack.
1007
  bool isTemplateParameterPack() const;
1008
1009
  /// Whether this declaration is a parameter pack.
1010
  bool isParameterPack() const;
1011
1012
  /// returns true if this declaration is a template
1013
  bool isTemplateDecl() const;
1014
1015
  /// Whether this declaration is a function or function template.
1016
60.4k
  bool isFunctionOrFunctionTemplate() const {
1017
60.4k
    return (DeclKind >= Decl::firstFunction &&
1018
60.4k
            
DeclKind <= Decl::lastFunction50.8k
) ||
1019
60.4k
           
DeclKind == FunctionTemplate48.1k
;
1020
60.4k
  }
1021
1022
  /// If this is a declaration that describes some template, this
1023
  /// method returns that template declaration.
1024
  TemplateDecl *getDescribedTemplate() const;
1025
1026
  /// Returns the function itself, or the templated function if this is a
1027
  /// function template.
1028
  FunctionDecl *getAsFunction() LLVM_READONLY;
1029
1030
11.3M
  const FunctionDecl *getAsFunction() const {
1031
11.3M
    return const_cast<Decl *>(this)->getAsFunction();
1032
11.3M
  }
1033
1034
  /// Changes the namespace of this declaration to reflect that it's
1035
  /// a function-local extern declaration.
1036
  ///
1037
  /// These declarations appear in the lexical context of the extern
1038
  /// declaration, but in the semantic context of the enclosing namespace
1039
  /// scope.
1040
2.85k
  void setLocalExternDecl() {
1041
2.85k
    Decl *Prev = getPreviousDecl();
1042
2.85k
    IdentifierNamespace &= ~IDNS_Ordinary;
1043
2.85k
1044
2.85k
    // It's OK for the declaration to still have the "invisible friend" flag or
1045
2.85k
    // the "conflicts with tag declarations in this scope" flag for the outer
1046
2.85k
    // scope.
1047
2.85k
    assert((IdentifierNamespace & ~(IDNS_OrdinaryFriend | IDNS_Tag)) == 0 &&
1048
2.85k
           "namespace is not ordinary");
1049
2.85k
1050
2.85k
    IdentifierNamespace |= IDNS_LocalExtern;
1051
2.85k
    if (Prev && 
Prev->getIdentifierNamespace() & IDNS_Ordinary6
)
1052
0
      IdentifierNamespace |= IDNS_Ordinary;
1053
2.85k
  }
1054
1055
  /// Determine whether this is a block-scope declaration with linkage.
1056
  /// This will either be a local variable declaration declared 'extern', or a
1057
  /// local function declaration.
1058
4.50M
  bool isLocalExternDecl() {
1059
4.50M
    return IdentifierNamespace & IDNS_LocalExtern;
1060
4.50M
  }
1061
1062
  /// Changes the namespace of this declaration to reflect that it's
1063
  /// the object of a friend declaration.
1064
  ///
1065
  /// These declarations appear in the lexical context of the friending
1066
  /// class, but in the semantic context of the actual entity.  This property
1067
  /// applies only to a specific decl object;  other redeclarations of the
1068
  /// same entity may not (and probably don't) share this property.
1069
107k
  void setObjectOfFriendDecl(bool PerformFriendInjection = false) {
1070
107k
    unsigned OldNS = IdentifierNamespace;
1071
107k
    assert((OldNS & (IDNS_Tag | IDNS_Ordinary |
1072
107k
                     IDNS_TagFriend | IDNS_OrdinaryFriend |
1073
107k
                     IDNS_LocalExtern)) &&
1074
107k
           "namespace includes neither ordinary nor tag");
1075
107k
    assert(!(OldNS & ~(IDNS_Tag | IDNS_Ordinary | IDNS_Type |
1076
107k
                       IDNS_TagFriend | IDNS_OrdinaryFriend |
1077
107k
                       IDNS_LocalExtern)) &&
1078
107k
           "namespace includes other than ordinary or tag");
1079
107k
1080
107k
    Decl *Prev = getPreviousDecl();
1081
107k
    IdentifierNamespace &= ~(IDNS_Ordinary | IDNS_Tag | IDNS_Type);
1082
107k
1083
107k
    if (OldNS & (IDNS_Tag | IDNS_TagFriend)) {
1084
17.5k
      IdentifierNamespace |= IDNS_TagFriend;
1085
17.5k
      if (PerformFriendInjection ||
1086
17.5k
          
(17.5k
Prev17.5k
&&
Prev->getIdentifierNamespace() & IDNS_Tag4.98k
))
1087
4.50k
        IdentifierNamespace |= IDNS_Tag | IDNS_Type;
1088
17.5k
    }
1089
107k
1090
107k
    if (OldNS & (IDNS_Ordinary | IDNS_OrdinaryFriend | IDNS_LocalExtern)) {
1091
102k
      IdentifierNamespace |= IDNS_OrdinaryFriend;
1092
102k
      if (PerformFriendInjection ||
1093
102k
          (Prev && 
Prev->getIdentifierNamespace() & IDNS_Ordinary21.9k
))
1094
21.4k
        IdentifierNamespace |= IDNS_Ordinary;
1095
102k
    }
1096
107k
  }
1097
1098
  enum FriendObjectKind {
1099
    FOK_None,      ///< Not a friend object.
1100
    FOK_Declared,  ///< A friend of a previously-declared entity.
1101
    FOK_Undeclared ///< A friend of a previously-undeclared entity.
1102
  };
1103
1104
  /// Determines whether this declaration is the object of a
1105
  /// friend declaration and, if so, what kind.
1106
  ///
1107
  /// There is currently no direct way to find the associated FriendDecl.
1108
46.7M
  FriendObjectKind getFriendObjectKind() const {
1109
46.7M
    unsigned mask =
1110
46.7M
        (IdentifierNamespace & (IDNS_TagFriend | IDNS_OrdinaryFriend));
1111
46.7M
    if (!mask) 
return FOK_None46.6M
;
1112
119k
    return (IdentifierNamespace & (IDNS_Tag | IDNS_Ordinary) ? 
FOK_Declared27.2k
1113
119k
                                                             : 
FOK_Undeclared92.2k
);
1114
119k
  }
1115
1116
  /// Specifies that this declaration is a C++ overloaded non-member.
1117
94.5k
  void setNonMemberOperator() {
1118
94.5k
    assert(getKind() == Function || getKind() == FunctionTemplate);
1119
94.5k
    assert((IdentifierNamespace & IDNS_Ordinary) &&
1120
94.5k
           "visible non-member operators should be in ordinary namespace");
1121
94.5k
    IdentifierNamespace |= IDNS_NonMemberOperator;
1122
94.5k
  }
1123
1124
1.33M
  static bool classofKind(Kind K) { return true; }
1125
  static DeclContext *castToDeclContext(const Decl *);
1126
  static Decl *castFromDeclContext(const DeclContext *);
1127
1128
  void print(raw_ostream &Out, unsigned Indentation = 0,
1129
             bool PrintInstantiation = false) const;
1130
  void print(raw_ostream &Out, const PrintingPolicy &Policy,
1131
             unsigned Indentation = 0, bool PrintInstantiation = false) const;
1132
  static void printGroup(Decl** Begin, unsigned NumDecls,
1133
                         raw_ostream &Out, const PrintingPolicy &Policy,
1134
                         unsigned Indentation = 0);
1135
1136
  // Debuggers don't usually respect default arguments.
1137
  void dump() const;
1138
1139
  // Same as dump(), but forces color printing.
1140
  void dumpColor() const;
1141
1142
  void dump(raw_ostream &Out, bool Deserialize = false) const;
1143
1144
  /// Looks through the Decl's underlying type to extract a FunctionType
1145
  /// when possible. Will return null if the type underlying the Decl does not
1146
  /// have a FunctionType.
1147
  const FunctionType *getFunctionType(bool BlocksToo = true) const;
1148
1149
private:
1150
  void setAttrsImpl(const AttrVec& Attrs, ASTContext &Ctx);
1151
  void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
1152
                           ASTContext &Ctx);
1153
1154
protected:
1155
  ASTMutationListener *getASTMutationListener() const;
1156
};
1157
1158
/// Determine whether two declarations declare the same entity.
1159
2.28M
inline bool declaresSameEntity(const Decl *D1, const Decl *D2) {
1160
2.28M
  if (!D1 || 
!D22.28M
)
1161
38
    return false;
1162
2.28M
  
1163
2.28M
  if (D1 == D2)
1164
2.03M
    return true;
1165
251k
  
1166
251k
  return D1->getCanonicalDecl() == D2->getCanonicalDecl();
1167
251k
}
1168
  
1169
/// PrettyStackTraceDecl - If a crash occurs, indicate that it happened when
1170
/// doing something to a specific decl.
1171
class PrettyStackTraceDecl : public llvm::PrettyStackTraceEntry {
1172
  const Decl *TheDecl;
1173
  SourceLocation Loc;
1174
  SourceManager &SM;
1175
  const char *Message;
1176
1177
public:
1178
  PrettyStackTraceDecl(const Decl *theDecl, SourceLocation L,
1179
                       SourceManager &sm, const char *Msg)
1180
7.10M
      : TheDecl(theDecl), Loc(L), SM(sm), Message(Msg) {}
1181
1182
  void print(raw_ostream &OS) const override;
1183
};
1184
1185
/// The results of name lookup within a DeclContext. This is either a
1186
/// single result (with no stable storage) or a collection of results (with
1187
/// stable storage provided by the lookup table).
1188
class DeclContextLookupResult {
1189
  using ResultTy = ArrayRef<NamedDecl *>;
1190
1191
  ResultTy Result;
1192
1193
  // If there is only one lookup result, it would be invalidated by
1194
  // reallocations of the name table, so store it separately.
1195
  NamedDecl *Single = nullptr;
1196
1197
  static NamedDecl *const SingleElementDummyList;
1198
1199
public:
1200
107M
  DeclContextLookupResult() = default;
1201
  DeclContextLookupResult(ArrayRef<NamedDecl *> Result)
1202
4.67M
      : Result(Result) {}
1203
  DeclContextLookupResult(NamedDecl *Single)
1204
39.5M
      : Result(SingleElementDummyList), Single(Single) {}
1205
1206
  class iterator;
1207
1208
  using IteratorBase =
1209
      llvm::iterator_adaptor_base<iterator, ResultTy::iterator,
1210
                                  std::random_access_iterator_tag,
1211
                                  NamedDecl *const>;
1212
1213
  class iterator : public IteratorBase {
1214
    value_type SingleElement;
1215
1216
  public:
1217
    iterator() = default;
1218
    explicit iterator(pointer Pos, value_type Single = nullptr)
1219
262M
        : IteratorBase(Pos), SingleElement(Single) {}
1220
1221
69.1M
    reference operator*() const {
1222
69.1M
      return SingleElement ? 
SingleElement40.5M
:
IteratorBase::operator*()28.6M
;
1223
69.1M
    }
1224
  };
1225
1226
  using const_iterator = iterator;
1227
  using pointer = iterator::pointer;
1228
  using reference = iterator::reference;
1229
1230
131M
  iterator begin() const { return iterator(Result.begin(), Single); }
1231
131M
  iterator end() const { return iterator(Result.end(), Single); }
1232
1233
9.06M
  bool empty() const { return Result.empty(); }
1234
0
  pointer data() const { return Single ? &Single : Result.data(); }
1235
41.9k
  size_t size() const { return Single ? 
1764
:
Result.size()41.1k
; }
1236
1.79M
  reference front() const { return Single ? 
Single1.68M
:
Result.front()117k
; }
1237
0
  reference back() const { return Single ? Single : Result.back(); }
1238
1.09k
  reference operator[](size_t N) const { return Single ? 
Single924
:
Result[N]171
; }
1239
1240
  // FIXME: Remove this from the interface
1241
248k
  DeclContextLookupResult slice(size_t N) const {
1242
248k
    DeclContextLookupResult Sliced = Result.slice(N);
1243
248k
    Sliced.Single = Single;
1244
248k
    return Sliced;
1245
248k
  }
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
///   NamespaceDecl
1254
///   FunctionDecl
1255
///   TagDecl
1256
///   ObjCMethodDecl
1257
///   ObjCContainerDecl
1258
///   LinkageSpecDecl
1259
///   ExportDecl
1260
///   BlockDecl
1261
///   OMPDeclareReductionDecl
1262
class DeclContext {
1263
  /// DeclKind - This indicates which class this is.
1264
  unsigned DeclKind : 8;
1265
1266
  /// Whether this declaration context also has some external
1267
  /// storage that contains additional declarations that are lexically
1268
  /// part of this context.
1269
  mutable bool ExternalLexicalStorage : 1;
1270
1271
  /// Whether this declaration context also has some external
1272
  /// storage that contains additional declarations that are visible
1273
  /// in this context.
1274
  mutable bool ExternalVisibleStorage : 1;
1275
1276
  /// Whether this declaration context has had external visible
1277
  /// storage added since the last lookup. In this case, \c LookupPtr's
1278
  /// invariant may not hold and needs to be fixed before we perform
1279
  /// another lookup.
1280
  mutable bool NeedToReconcileExternalVisibleStorage : 1;
1281
1282
  /// If \c true, this context may have local lexical declarations
1283
  /// that are missing from the lookup table.
1284
  mutable bool HasLazyLocalLexicalLookups : 1;
1285
1286
  /// If \c true, the external source may have lexical declarations
1287
  /// that are missing from the lookup table.
1288
  mutable bool HasLazyExternalLexicalLookups : 1;
1289
1290
  /// If \c true, lookups should only return identifier from
1291
  /// DeclContext scope (for example TranslationUnit). Used in
1292
  /// LookupQualifiedName()
1293
  mutable bool UseQualifiedLookup : 1;
1294
1295
  /// Pointer to the data structure used to lookup declarations
1296
  /// within this context (or a DependentStoredDeclsMap if this is a
1297
  /// dependent context). We maintain the invariant that, if the map
1298
  /// contains an entry for a DeclarationName (and we haven't lazily
1299
  /// omitted anything), then it contains all relevant entries for that
1300
  /// name (modulo the hasExternalDecls() flag).
1301
  mutable StoredDeclsMap *LookupPtr = nullptr;
1302
1303
protected:
1304
  friend class ASTDeclReader;
1305
  friend class ASTWriter;
1306
  friend class ExternalASTSource;
1307
1308
  /// FirstDecl - The first declaration stored within this declaration
1309
  /// context.
1310
  mutable Decl *FirstDecl = nullptr;
1311
1312
  /// LastDecl - The last declaration stored within this declaration
1313
  /// context. FIXME: We could probably cache this value somewhere
1314
  /// outside of the DeclContext, to reduce the size of DeclContext by
1315
  /// another pointer.
1316
  mutable Decl *LastDecl = nullptr;
1317
1318
  /// Build up a chain of declarations.
1319
  ///
1320
  /// \returns the first/last pair of declarations.
1321
  static std::pair<Decl *, Decl *>
1322
  BuildDeclChain(ArrayRef<Decl*> Decls, bool FieldsAlreadyLoaded);
1323
1324
  DeclContext(Decl::Kind K)
1325
      : DeclKind(K), ExternalLexicalStorage(false),
1326
        ExternalVisibleStorage(false),
1327
        NeedToReconcileExternalVisibleStorage(false),
1328
        HasLazyLocalLexicalLookups(false), HasLazyExternalLexicalLookups(false),
1329
12.4M
        UseQualifiedLookup(false) {}
1330
1331
public:
1332
  ~DeclContext();
1333
1334
2.52G
  Decl::Kind getDeclKind() const {
1335
2.52G
    return static_cast<Decl::Kind>(DeclKind);
1336
2.52G
  }
1337
1338
  const char *getDeclKindName() const;
1339
1340
  /// getParent - Returns the containing DeclContext.
1341
1.11G
  DeclContext *getParent() {
1342
1.11G
    return cast<Decl>(this)->getDeclContext();
1343
1.11G
  }
1344
227M
  const DeclContext *getParent() const {
1345
227M
    return const_cast<DeclContext*>(this)->getParent();
1346
227M
  }
1347
1348
  /// getLexicalParent - Returns the containing lexical DeclContext. May be
1349
  /// different from getParent, e.g.:
1350
  ///
1351
  ///   namespace A {
1352
  ///      struct S;
1353
  ///   }
1354
  ///   struct A::S {}; // getParent() == namespace 'A'
1355
  ///                   // getLexicalParent() == translation unit
1356
  ///
1357
41.9M
  DeclContext *getLexicalParent() {
1358
41.9M
    return cast<Decl>(this)->getLexicalDeclContext();
1359
41.9M
  }
1360
32.5M
  const DeclContext *getLexicalParent() const {
1361
32.5M
    return const_cast<DeclContext*>(this)->getLexicalParent();
1362
32.5M
  }
1363
1364
  DeclContext *getLookupParent();
1365
1366
85
  const DeclContext *getLookupParent() const {
1367
85
    return const_cast<DeclContext*>(this)->getLookupParent();
1368
85
  }
1369
1370
156M
  ASTContext &getParentASTContext() const {
1371
156M
    return cast<Decl>(this)->getASTContext();
1372
156M
  }
1373
1374
1.17k
  bool isClosure() const {
1375
1.17k
    return DeclKind == Decl::Block;
1376
1.17k
  }
1377
1378
3.92M
  bool isObjCContainer() const {
1379
3.92M
    switch (DeclKind) {
1380
3.92M
        case Decl::ObjCCategory:
1381
59.4k
        case Decl::ObjCCategoryImpl:
1382
59.4k
        case Decl::ObjCImplementation:
1383
59.4k
        case Decl::ObjCInterface:
1384
59.4k
        case Decl::ObjCProtocol:
1385
59.4k
            return true;
1386
3.86M
    }
1387
3.86M
    return false;
1388
3.86M
  }
1389
1390
147M
  bool isFunctionOrMethod() const {
1391
147M
    switch (DeclKind) {
1392
147M
    case Decl::Block:
1393
3.39M
    case Decl::Captured:
1394
3.39M
    case Decl::ObjCMethod:
1395
3.39M
      return true;
1396
143M
    default:
1397
143M
      return DeclKind >= Decl::firstFunction && 
DeclKind <= Decl::lastFunction60.9M
;
1398
147M
    }
1399
147M
  }
1400
1401
  /// Test whether the context supports looking up names.
1402
27.0M
  bool isLookupContext() const {
1403
27.0M
    return !isFunctionOrMethod() && 
DeclKind != Decl::LinkageSpec19.5M
&&
1404
27.0M
           
DeclKind != Decl::Export18.6M
;
1405
27.0M
  }
1406
1407
487M
  bool isFileContext() const {
1408
487M
    return DeclKind == Decl::TranslationUnit || 
DeclKind == Decl::Namespace398M
;
1409
487M
  }
1410
1411
1.43G
  bool isTranslationUnit() const {
1412
1.43G
    return DeclKind == Decl::TranslationUnit;
1413
1.43G
  }
1414
1415
266M
  bool isRecord() const {
1416
266M
    return DeclKind >= Decl::firstRecord && 
DeclKind <= Decl::lastRecord228M
;
1417
266M
  }
1418
1419
30.0M
  bool isNamespace() const {
1420
30.0M
    return DeclKind == Decl::Namespace;
1421
30.0M
  }
1422
1423
  bool isStdNamespace() const;
1424
1425
  bool isInlineNamespace() const;
1426
1427
  /// Determines whether this context is dependent on a
1428
  /// template parameter.
1429
  bool isDependentContext() const;
1430
1431
  /// isTransparentContext - Determines whether this context is a
1432
  /// "transparent" context, meaning that the members declared in this
1433
  /// context are semantically declared in the nearest enclosing
1434
  /// non-transparent (opaque) context but are lexically declared in
1435
  /// this context. For example, consider the enumerators of an
1436
  /// enumeration type:
1437
  /// @code
1438
  /// enum E {
1439
  ///   Val1
1440
  /// };
1441
  /// @endcode
1442
  /// Here, E is a transparent context, so its enumerator (Val1) will
1443
  /// appear (semantically) that it is in the same context of E.
1444
  /// Examples of transparent contexts include: enumerations (except for
1445
  /// C++0x scoped enums), and C++ linkage specifications.
1446
  bool isTransparentContext() const;
1447
1448
  /// Determines whether this context or some of its ancestors is a
1449
  /// linkage specification context that specifies C linkage.
1450
  bool isExternCContext() const;
1451
1452
  /// Retrieve the nearest enclosing C linkage specification context.
1453
  const LinkageSpecDecl *getExternCContext() const;
1454
1455
  /// Determines whether this context or some of its ancestors is a
1456
  /// linkage specification context that specifies C++ linkage.
1457
  bool isExternCXXContext() const;
1458
1459
  /// Determine whether this declaration context is equivalent
1460
  /// to the declaration context DC.
1461
187M
  bool Equals(const DeclContext *DC) const {
1462
187M
    return DC && 
this->getPrimaryContext() == DC->getPrimaryContext()178M
;
1463
187M
  }
1464
1465
  /// Determine whether this declaration context encloses the
1466
  /// declaration context DC.
1467
  bool Encloses(const DeclContext *DC) const;
1468
1469
  /// Find the nearest non-closure ancestor of this context,
1470
  /// i.e. the innermost semantic parent of this context which is not
1471
  /// a closure.  A context may be its own non-closure ancestor.
1472
  Decl *getNonClosureAncestor();
1473
0
  const Decl *getNonClosureAncestor() const {
1474
0
    return const_cast<DeclContext*>(this)->getNonClosureAncestor();
1475
0
  }
1476
1477
  /// getPrimaryContext - There may be many different
1478
  /// declarations of the same entity (including forward declarations
1479
  /// of classes, multiple definitions of namespaces, etc.), each with
1480
  /// a different set of declarations. This routine returns the
1481
  /// "primary" DeclContext structure, which will contain the
1482
  /// information needed to perform name lookup into this context.
1483
  DeclContext *getPrimaryContext();
1484
625M
  const DeclContext *getPrimaryContext() const {
1485
625M
    return const_cast<DeclContext*>(this)->getPrimaryContext();
1486
625M
  }
1487
1488
  /// getRedeclContext - Retrieve the context in which an entity conflicts with
1489
  /// other entities of the same name, or where it is a redeclaration if the
1490
  /// two entities are compatible. This skips through transparent contexts.
1491
  DeclContext *getRedeclContext();
1492
159M
  const DeclContext *getRedeclContext() const {
1493
159M
    return const_cast<DeclContext *>(this)->getRedeclContext();
1494
159M
  }
1495
1496
  /// Retrieve the nearest enclosing namespace context.
1497
  DeclContext *getEnclosingNamespaceContext();
1498
37.9k
  const DeclContext *getEnclosingNamespaceContext() const {
1499
37.9k
    return const_cast<DeclContext *>(this)->getEnclosingNamespaceContext();
1500
37.9k
  }
1501
1502
  /// Retrieve the outermost lexically enclosing record context.
1503
  RecordDecl *getOuterLexicalRecordContext();
1504
0
  const RecordDecl *getOuterLexicalRecordContext() const {
1505
0
    return const_cast<DeclContext *>(this)->getOuterLexicalRecordContext();
1506
0
  }
1507
1508
  /// Test if this context is part of the enclosing namespace set of
1509
  /// the context NS, as defined in C++0x [namespace.def]p9. If either context
1510
  /// isn't a namespace, this is equivalent to Equals().
1511
  ///
1512
  /// The enclosing namespace set of a namespace is the namespace and, if it is
1513
  /// inline, its enclosing namespace, recursively.
1514
  bool InEnclosingNamespaceSetOf(const DeclContext *NS) const;
1515
1516
  /// Collects all of the declaration contexts that are semantically
1517
  /// connected to this declaration context.
1518
  ///
1519
  /// For declaration contexts that have multiple semantically connected but
1520
  /// syntactically distinct contexts, such as C++ namespaces, this routine 
1521
  /// retrieves the complete set of such declaration contexts in source order.
1522
  /// For example, given:
1523
  ///
1524
  /// \code
1525
  /// namespace N {
1526
  ///   int x;
1527
  /// }
1528
  /// namespace N {
1529
  ///   int y;
1530
  /// }
1531
  /// \endcode
1532
  ///
1533
  /// The \c Contexts parameter will contain both definitions of N.
1534
  ///
1535
  /// \param Contexts Will be cleared and set to the set of declaration
1536
  /// contexts that are semanticaly connected to this declaration context,
1537
  /// in source order, including this context (which may be the only result,
1538
  /// for non-namespace contexts).
1539
  void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts);
1540
1541
  /// decl_iterator - Iterates through the declarations stored
1542
  /// within this context.
1543
  class decl_iterator {
1544
    /// Current - The current declaration.
1545
    Decl *Current = nullptr;
1546
1547
  public:
1548
    using value_type = Decl *;
1549
    using reference = const value_type &;
1550
    using pointer = const value_type *;
1551
    using iterator_category = std::forward_iterator_tag;
1552
    using difference_type = std::ptrdiff_t;
1553
1554
18.2M
    decl_iterator() = default;
1555
18.2M
    explicit decl_iterator(Decl *C) : Current(C) {}
1556
1557
178M
    reference operator*() const { return Current; }
1558
1559
    // This doesn't meet the iterator requirements, but it's convenient
1560
22.2k
    value_type operator->() const { return Current; }
1561
1562
86.1M
    decl_iterator& operator++() {
1563
86.1M
      Current = Current->getNextDeclInContext();
1564
86.1M
      return *this;
1565
86.1M
    }
1566
1567
41
    decl_iterator operator++(int) {
1568
41
      decl_iterator tmp(*this);
1569
41
      ++(*this);
1570
41
      return tmp;
1571
41
    }
1572
1573
923k
    friend bool operator==(decl_iterator x, decl_iterator y) {
1574
923k
      return x.Current == y.Current;
1575
923k
    }
1576
1577
57.6M
    friend bool operator!=(decl_iterator x, decl_iterator y) {
1578
57.6M
      return x.Current != y.Current;
1579
57.6M
    }
1580
  };
1581
1582
  using decl_range = llvm::iterator_range<decl_iterator>;
1583
1584
  /// decls_begin/decls_end - Iterate over the declarations stored in
1585
  /// this context.
1586
8.00M
  decl_range decls() const { return decl_range(decls_begin(), decls_end()); }
1587
  decl_iterator decls_begin() const;
1588
12.6M
  decl_iterator decls_end() const { return decl_iterator(); }
1589
  bool decls_empty() const;
1590
1591
  /// noload_decls_begin/end - Iterate over the declarations stored in this
1592
  /// context that are currently loaded; don't attempt to retrieve anything
1593
  /// from an external source.
1594
1.69M
  decl_range noload_decls() const {
1595
1.69M
    return decl_range(noload_decls_begin(), noload_decls_end());
1596
1.69M
  }
1597
1.69M
  decl_iterator noload_decls_begin() const { return decl_iterator(FirstDecl); }
1598
1.69M
  decl_iterator noload_decls_end() const { return decl_iterator(); }
1599
1600
  /// specific_decl_iterator - Iterates over a subrange of
1601
  /// declarations stored in a DeclContext, providing only those that
1602
  /// are of type SpecificDecl (or a class derived from it). This
1603
  /// iterator is used, for example, to provide iteration over just
1604
  /// the fields within a RecordDecl (with SpecificDecl = FieldDecl).
1605
  template<typename SpecificDecl>
1606
  class specific_decl_iterator {
1607
    /// Current - The current, underlying declaration iterator, which
1608
    /// will either be NULL or will point to a declaration of
1609
    /// type SpecificDecl.
1610
    DeclContext::decl_iterator Current;
1611
1612
    /// SkipToNextDecl - Advances the current position up to the next
1613
    /// declaration of type SpecificDecl that also meets the criteria
1614
    /// required by Acceptable.
1615
30.5M
    void SkipToNextDecl() {
1616
75.5M
      while (*Current && 
!isa<SpecificDecl>(*Current)59.0M
)
1617
45.0M
        ++Current;
1618
30.5M
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::SkipToNextDecl()
Line
Count
Source
1615
14.0M
    void SkipToNextDecl() {
1616
44.6M
      while (*Current && 
!isa<SpecificDecl>(*Current)37.2M
)
1617
30.6M
        ++Current;
1618
14.0M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::SkipToNextDecl()
Line
Count
Source
1615
14.7M
    void SkipToNextDecl() {
1616
28.6M
      while (*Current && 
!isa<SpecificDecl>(*Current)20.5M
)
1617
13.9M
        ++Current;
1618
14.7M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::SkipToNextDecl()
Line
Count
Source
1615
120k
    void SkipToNextDecl() {
1616
271k
      while (*Current && 
!isa<SpecificDecl>(*Current)183k
)
1617
150k
        ++Current;
1618
120k
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::SkipToNextDecl()
Line
Count
Source
1615
141k
    void SkipToNextDecl() {
1616
141k
      while (*Current && 
!isa<SpecificDecl>(*Current)101k
)
1617
11
        ++Current;
1618
141k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::SkipToNextDecl()
Line
Count
Source
1615
90.4k
    void SkipToNextDecl() {
1616
160k
      while (*Current && 
!isa<SpecificDecl>(*Current)111k
)
1617
69.8k
        ++Current;
1618
90.4k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::SkipToNextDecl()
Line
Count
Source
1615
10.9k
    void SkipToNextDecl() {
1616
12.7k
      while (*Current && 
!isa<SpecificDecl>(*Current)7.01k
)
1617
1.80k
        ++Current;
1618
10.9k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::SkipToNextDecl()
Line
Count
Source
1615
11.4k
    void SkipToNextDecl() {
1616
48.5k
      while (*Current && 
!isa<SpecificDecl>(*Current)43.3k
)
1617
37.0k
        ++Current;
1618
11.4k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::SkipToNextDecl()
Line
Count
Source
1615
148k
    void SkipToNextDecl() {
1616
360k
      while (*Current && 
!isa<SpecificDecl>(*Current)247k
)
1617
212k
        ++Current;
1618
148k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::SkipToNextDecl()
Line
Count
Source
1615
282
    void SkipToNextDecl() {
1616
2.82k
      while (*Current && 
!isa<SpecificDecl>(*Current)2.64k
)
1617
2.54k
        ++Current;
1618
282
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::SkipToNextDecl()
Line
Count
Source
1615
5
    void SkipToNextDecl() {
1616
6
      while (*Current && 
!isa<SpecificDecl>(*Current)4
)
1617
1
        ++Current;
1618
5
    }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::SkipToNextDecl()
Line
Count
Source
1615
4
    void SkipToNextDecl() {
1616
6
      while (*Current && 
!isa<SpecificDecl>(*Current)4
)
1617
2
        ++Current;
1618
4
    }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::SkipToNextDecl()
Line
Count
Source
1615
1.19M
    void SkipToNextDecl() {
1616
1.20M
      while (*Current && 
!isa<SpecificDecl>(*Current)529k
)
1617
4.64k
        ++Current;
1618
1.19M
    }
1619
1620
  public:
1621
    using value_type = SpecificDecl *;
1622
    // TODO: Add reference and pointer types (with some appropriate proxy type)
1623
    // if we ever have a need for them.
1624
    using reference = void;
1625
    using pointer = void;
1626
    using difference_type =
1627
        std::iterator_traits<DeclContext::decl_iterator>::difference_type;
1628
    using iterator_category = std::forward_iterator_tag;
1629
1630
48.9k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator()
Line
Count
Source
1630
47.8k
    specific_decl_iterator() = default;
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator()
Line
Count
Source
1630
1.17k
    specific_decl_iterator() = default;
1631
1632
    /// specific_decl_iterator - Construct a new iterator over a
1633
    /// subset of the declarations the range [C,
1634
    /// end-of-declarations). If A is non-NULL, it is a pointer to a
1635
    /// member function of SpecificDecl that should return true for
1636
    /// all of the SpecificDecl instances that will be in the subset
1637
    /// of iterators. For example, if you want Objective-C instance
1638
    /// methods, SpecificDecl will be ObjCMethodDecl and A will be
1639
    /// &ObjCMethodDecl::isInstanceMethod.
1640
16.8M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
16.8M
      SkipToNextDecl();
1642
16.8M
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
7.68M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
7.68M
      SkipToNextDecl();
1642
7.68M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
8.18M
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
8.18M
      SkipToNextDecl();
1642
8.18M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
87.5k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
87.5k
      SkipToNextDecl();
1642
87.5k
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
66.3k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
66.3k
      SkipToNextDecl();
1642
66.3k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
53.1k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
53.1k
      SkipToNextDecl();
1642
53.1k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
5.76k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
5.76k
      SkipToNextDecl();
1642
5.76k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
6.19k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
6.19k
      SkipToNextDecl();
1642
6.19k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
123k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
123k
      SkipToNextDecl();
1642
123k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
178
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
178
      SkipToNextDecl();
1642
178
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
2
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
2
      SkipToNextDecl();
1642
2
    }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
4
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
4
      SkipToNextDecl();
1642
4
    }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::specific_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1640
673k
    explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1641
673k
      SkipToNextDecl();
1642
673k
    }
1643
1644
15.7M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator*() const
Line
Count
Source
1644
8.41M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator*() const
Line
Count
Source
1644
6.61M
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator*() const
Line
Count
Source
1644
32.8k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator*() const
Line
Count
Source
1644
75.3k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator*() const
Line
Count
Source
1644
41.1k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator*() const
Line
Count
Source
1644
5.18k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator*() const
Line
Count
Source
1644
6.33k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator*() const
Line
Count
Source
1644
33.8k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator*() const
Line
Count
Source
1644
104
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator*() const
Line
Count
Source
1644
6
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator*() const
Line
Count
Source
1644
2
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator*() const
Line
Count
Source
1644
525k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
1645
1646
    // This doesn't meet the iterator requirements, but it's convenient
1647
1.80M
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator->() const
Line
Count
Source
1647
1.80M
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator->() const
Line
Count
Source
1647
278
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator->() const
Line
Count
Source
1647
87
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator->() const
Line
Count
Source
1647
104
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator->() const
Line
Count
Source
1647
3
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator->() const
Line
Count
Source
1647
2
    value_type operator->() const { return **this; }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator->() const
Line
Count
Source
1647
5.09k
    value_type operator->() const { return **this; }
1648
1649
13.6M
    specific_decl_iterator& operator++() {
1650
13.6M
      ++Current;
1651
13.6M
      SkipToNextDecl();
1652
13.6M
      return *this;
1653
13.6M
    }
clang::DeclContext::specific_decl_iterator<clang::FieldDecl>::operator++()
Line
Count
Source
1649
6.40M
    specific_decl_iterator& operator++() {
1650
6.40M
      ++Current;
1651
6.40M
      SkipToNextDecl();
1652
6.40M
      return *this;
1653
6.40M
    }
clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl>::operator++()
Line
Count
Source
1649
6.52M
    specific_decl_iterator& operator++() {
1650
6.52M
      ++Current;
1651
6.52M
      SkipToNextDecl();
1652
6.52M
      return *this;
1653
6.52M
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl>::operator++()
Line
Count
Source
1649
32.8k
    specific_decl_iterator& operator++() {
1650
32.8k
      ++Current;
1651
32.8k
      SkipToNextDecl();
1652
32.8k
      return *this;
1653
32.8k
    }
clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl>::operator++()
Line
Count
Source
1649
75.0k
    specific_decl_iterator& operator++() {
1650
75.0k
      ++Current;
1651
75.0k
      SkipToNextDecl();
1652
75.0k
      return *this;
1653
75.0k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl>::operator++()
Line
Count
Source
1649
37.2k
    specific_decl_iterator& operator++() {
1650
37.2k
      ++Current;
1651
37.2k
      SkipToNextDecl();
1652
37.2k
      return *this;
1653
37.2k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl>::operator++()
Line
Count
Source
1649
5.18k
    specific_decl_iterator& operator++() {
1650
5.18k
      ++Current;
1651
5.18k
      SkipToNextDecl();
1652
5.18k
      return *this;
1653
5.18k
    }
clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl>::operator++()
Line
Count
Source
1649
5.29k
    specific_decl_iterator& operator++() {
1650
5.29k
      ++Current;
1651
5.29k
      SkipToNextDecl();
1652
5.29k
      return *this;
1653
5.29k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl>::operator++()
Line
Count
Source
1649
24.4k
    specific_decl_iterator& operator++() {
1650
24.4k
      ++Current;
1651
24.4k
      SkipToNextDecl();
1652
24.4k
      return *this;
1653
24.4k
    }
clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl>::operator++()
Line
Count
Source
1649
104
    specific_decl_iterator& operator++() {
1650
104
      ++Current;
1651
104
      SkipToNextDecl();
1652
104
      return *this;
1653
104
    }
clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl>::operator++()
Line
Count
Source
1649
3
    specific_decl_iterator& operator++() {
1650
3
      ++Current;
1651
3
      SkipToNextDecl();
1652
3
      return *this;
1653
3
    }
Unexecuted instantiation: clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl>::operator++()
clang::DeclContext::specific_decl_iterator<clang::VarDecl>::operator++()
Line
Count
Source
1649
525k
    specific_decl_iterator& operator++() {
1650
525k
      ++Current;
1651
525k
      SkipToNextDecl();
1652
525k
      return *this;
1653
525k
    }
1654
1655
    specific_decl_iterator operator++(int) {
1656
      specific_decl_iterator tmp(*this);
1657
      ++(*this);
1658
      return tmp;
1659
    }
1660
1661
    friend bool operator==(const specific_decl_iterator& x,
1662
923k
                           const specific_decl_iterator& y) {
1663
923k
      return x.Current == y.Current;
1664
923k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&)
Line
Count
Source
1662
847k
                           const specific_decl_iterator& y) {
1663
847k
      return x.Current == y.Current;
1664
847k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&)
Line
Count
Source
1662
49.0k
                           const specific_decl_iterator& y) {
1663
49.0k
      return x.Current == y.Current;
1664
49.0k
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&)
Line
Count
Source
1662
32
                           const specific_decl_iterator& y) {
1663
32
      return x.Current == y.Current;
1664
32
    }
clang::operator==(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&)
Line
Count
Source
1662
26.9k
                           const specific_decl_iterator& y) {
1663
26.9k
      return x.Current == y.Current;
1664
26.9k
    }
1665
1666
    friend bool operator!=(const specific_decl_iterator& x,
1667
20.4M
                           const specific_decl_iterator& y) {
1668
20.4M
      return x.Current != y.Current;
1669
20.4M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCIvarDecl> const&)
Line
Count
Source
1667
43.8k
                           const specific_decl_iterator& y) {
1668
43.8k
      return x.Current != y.Current;
1669
43.8k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FieldDecl> const&)
Line
Count
Source
1667
8.64M
                           const specific_decl_iterator& y) {
1668
8.64M
      return x.Current != y.Current;
1669
8.64M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXMethodDecl> const&)
Line
Count
Source
1667
10.6M
                           const specific_decl_iterator& y) {
1668
10.6M
      return x.Current != y.Current;
1669
10.6M
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyDecl> const&)
Line
Count
Source
1667
76.6k
                           const specific_decl_iterator& y) {
1668
76.6k
      return x.Current != y.Current;
1669
76.6k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&, clang::DeclContext::specific_decl_iterator<clang::EnumConstantDecl> const&)
Line
Count
Source
1667
81.3k
                           const specific_decl_iterator& y) {
1668
81.3k
      return x.Current != y.Current;
1669
81.3k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCPropertyImplDecl> const&)
Line
Count
Source
1667
63.8k
                           const specific_decl_iterator& y) {
1668
63.8k
      return x.Current != y.Current;
1669
63.8k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCMethodDecl> const&)
Line
Count
Source
1667
8.03k
                           const specific_decl_iterator& y) {
1668
8.03k
      return x.Current != y.Current;
1669
8.03k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&, clang::DeclContext::specific_decl_iterator<clang::CXXConstructorDecl> const&)
Line
Count
Source
1667
8.39k
                           const specific_decl_iterator& y) {
1668
8.39k
      return x.Current != y.Current;
1669
8.39k
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&, clang::DeclContext::specific_decl_iterator<clang::ObjCImplementationDecl> const&)
Line
Count
Source
1667
193
                           const specific_decl_iterator& y) {
1668
193
      return x.Current != y.Current;
1669
193
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&, clang::DeclContext::specific_decl_iterator<clang::NamespaceDecl> const&)
Line
Count
Source
1667
4
                           const specific_decl_iterator& y) {
1668
4
      return x.Current != y.Current;
1669
4
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&, clang::DeclContext::specific_decl_iterator<clang::FunctionTemplateDecl> const&)
Line
Count
Source
1667
2
                           const specific_decl_iterator& y) {
1668
2
      return x.Current != y.Current;
1669
2
    }
clang::operator!=(clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&, clang::DeclContext::specific_decl_iterator<clang::VarDecl> const&)
Line
Count
Source
1667
861k
                           const specific_decl_iterator& y) {
1668
861k
      return x.Current != y.Current;
1669
861k
    }
1670
  };
1671
1672
  /// Iterates over a filtered subrange of declarations stored
1673
  /// in a DeclContext.
1674
  ///
1675
  /// This iterator visits only those declarations that are of type
1676
  /// SpecificDecl (or a class derived from it) and that meet some
1677
  /// additional run-time criteria. This iterator is used, for
1678
  /// example, to provide access to the instance methods within an
1679
  /// Objective-C interface (with SpecificDecl = ObjCMethodDecl and
1680
  /// Acceptable = ObjCMethodDecl::isInstanceMethod).
1681
  template<typename SpecificDecl, bool (SpecificDecl::*Acceptable)() const>
1682
  class filtered_decl_iterator {
1683
    /// Current - The current, underlying declaration iterator, which
1684
    /// will either be NULL or will point to a declaration of
1685
    /// type SpecificDecl.
1686
    DeclContext::decl_iterator Current;
1687
1688
    /// SkipToNextDecl - Advances the current position up to the next
1689
    /// declaration of type SpecificDecl that also meets the criteria
1690
    /// required by Acceptable.
1691
110k
    void SkipToNextDecl() {
1692
175k
      while (*Current &&
1693
175k
             
(102k
!isa<SpecificDecl>(*Current)102k
||
1694
102k
              
(68.4k
Acceptable68.4k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()68.4k
)))
1695
64.2k
        ++Current;
1696
110k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::SkipToNextDecl()
Line
Count
Source
1691
68.3k
    void SkipToNextDecl() {
1692
90.2k
      while (*Current &&
1693
90.2k
             
(51.9k
!isa<SpecificDecl>(*Current)51.9k
||
1694
51.9k
              
(35.8k
Acceptable35.8k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()35.8k
)))
1695
21.8k
        ++Current;
1696
68.3k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::SkipToNextDecl()
Line
Count
Source
1691
35.8k
    void SkipToNextDecl() {
1692
73.2k
      while (*Current &&
1693
73.2k
             
(42.0k
!isa<SpecificDecl>(*Current)42.0k
||
1694
42.0k
              
(29.5k
Acceptable29.5k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()29.5k
)))
1695
37.3k
        ++Current;
1696
35.8k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::SkipToNextDecl()
Line
Count
Source
1691
6.32k
    void SkipToNextDecl() {
1692
11.1k
      while (*Current &&
1693
11.1k
             
(7.61k
!isa<SpecificDecl>(*Current)7.61k
||
1694
7.61k
              
(2.82k
Acceptable2.82k
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()2.82k
)))
1695
4.79k
        ++Current;
1696
6.32k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::SkipToNextDecl()
Line
Count
Source
1691
426
    void SkipToNextDecl() {
1692
598
      while (*Current &&
1693
598
             
(414
!isa<SpecificDecl>(*Current)414
||
1694
414
              
(342
Acceptable342
&&
!(cast<SpecificDecl>(*Current)->*Acceptable)()342
)))
1695
172
        ++Current;
1696
426
    }
1697
1698
  public:
1699
    using value_type = SpecificDecl *;
1700
    // TODO: Add reference and pointer types (with some appropriate proxy type)
1701
    // if we ever have a need for them.
1702
    using reference = void;
1703
    using pointer = void;
1704
    using difference_type =
1705
        std::iterator_traits<DeclContext::decl_iterator>::difference_type;
1706
    using iterator_category = std::forward_iterator_tag;
1707
1708
    filtered_decl_iterator() = default;
1709
1710
    /// filtered_decl_iterator - Construct a new iterator over a
1711
    /// subset of the declarations the range [C,
1712
    /// end-of-declarations). If A is non-NULL, it is a pointer to a
1713
    /// member function of SpecificDecl that should return true for
1714
    /// all of the SpecificDecl instances that will be in the subset
1715
    /// of iterators. For example, if you want Objective-C instance
1716
    /// methods, SpecificDecl will be ObjCMethodDecl and A will be
1717
    /// &ObjCMethodDecl::isInstanceMethod.
1718
74.7k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1719
74.7k
      SkipToNextDecl();
1720
74.7k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1718
38.4k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1719
38.4k
      SkipToNextDecl();
1720
38.4k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1718
31.2k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1719
31.2k
      SkipToNextDecl();
1720
31.2k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1718
4.64k
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1719
4.64k
      SkipToNextDecl();
1720
4.64k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::filtered_decl_iterator(clang::DeclContext::decl_iterator)
Line
Count
Source
1718
354
    explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
1719
354
      SkipToNextDecl();
1720
354
    }
1721
1722
37.7k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator*() const
Line
Count
Source
1722
30.0k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator*() const
Line
Count
Source
1722
4.60k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator*() const
Line
Count
Source
1722
2.81k
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator*() const
Line
Count
Source
1722
242
    value_type operator*() const { return cast<SpecificDecl>(*Current); }
1723
    value_type operator->() const { return cast<SpecificDecl>(*Current); }
1724
1725
36.2k
    filtered_decl_iterator& operator++() {
1726
36.2k
      ++Current;
1727
36.2k
      SkipToNextDecl();
1728
36.2k
      return *this;
1729
36.2k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isInstanceMethod() const)>::operator++()
Line
Count
Source
1725
29.8k
    filtered_decl_iterator& operator++() {
1726
29.8k
      ++Current;
1727
29.8k
      SkipToNextDecl();
1728
29.8k
      return *this;
1729
29.8k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCMethodDecl, &(clang::ObjCMethodDecl::isClassMethod() const)>::operator++()
Line
Count
Source
1725
4.61k
    filtered_decl_iterator& operator++() {
1726
4.61k
      ++Current;
1727
4.61k
      SkipToNextDecl();
1728
4.61k
      return *this;
1729
4.61k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isInstanceProperty() const)>::operator++()
Line
Count
Source
1725
1.68k
    filtered_decl_iterator& operator++() {
1726
1.68k
      ++Current;
1727
1.68k
      SkipToNextDecl();
1728
1.68k
      return *this;
1729
1.68k
    }
clang::DeclContext::filtered_decl_iterator<clang::ObjCPropertyDecl, &(clang::ObjCPropertyDecl::isClassProperty() const)>::operator++()
Line
Count
Source
1725
72
    filtered_decl_iterator& operator++() {
1726
72
      ++Current;
1727
72
      SkipToNextDecl();
1728
72
      return *this;
1729
72
    }
1730
1731
    filtered_decl_iterator operator++(int) {
1732
      filtered_decl_iterator tmp(*this);
1733
      ++(*this);
1734
      return tmp;
1735
    }
1736
1737
    friend bool operator==(const filtered_decl_iterator& x,
1738
78
                           const filtered_decl_iterator& y) {
1739
78
      return x.Current == y.Current;
1740
78
    }
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
1738
74
                           const filtered_decl_iterator& y) {
1739
74
      return x.Current == y.Current;
1740
74
    }
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
1738
4
                           const filtered_decl_iterator& y) {
1739
4
      return x.Current == y.Current;
1740
4
    }
1741
1742
    friend bool operator!=(const filtered_decl_iterator& x,
1743
73.9k
                           const filtered_decl_iterator& y) {
1744
73.9k
      return x.Current != y.Current;
1745
73.9k
    }
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
1743
49.2k
                           const filtered_decl_iterator& y) {
1744
49.2k
      return x.Current != y.Current;
1745
49.2k
    }
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
1743
20.2k
                           const filtered_decl_iterator& y) {
1744
20.2k
      return x.Current != y.Current;
1745
20.2k
    }
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
1743
4.10k
                           const filtered_decl_iterator& y) {
1744
4.10k
      return x.Current != y.Current;
1745
4.10k
    }
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
1743
249
                           const filtered_decl_iterator& y) {
1744
249
      return x.Current != y.Current;
1745
249
    }
1746
  };
1747
1748
  /// Add the declaration D into this context.
1749
  ///
1750
  /// This routine should be invoked when the declaration D has first
1751
  /// been declared, to place D into the context where it was
1752
  /// (lexically) defined. Every declaration must be added to one
1753
  /// (and only one!) context, where it can be visited via
1754
  /// [decls_begin(), decls_end()). Once a declaration has been added
1755
  /// to its lexical context, the corresponding DeclContext owns the
1756
  /// declaration.
1757
  ///
1758
  /// If D is also a NamedDecl, it will be made visible within its
1759
  /// semantic context via makeDeclVisibleInContext.
1760
  void addDecl(Decl *D);
1761
1762
  /// Add the declaration D into this context, but suppress
1763
  /// searches for external declarations with the same name.
1764
  ///
1765
  /// Although analogous in function to addDecl, this removes an
1766
  /// important check.  This is only useful if the Decl is being
1767
  /// added in response to an external search; in all other cases,
1768
  /// addDecl() is the right function to use.
1769
  /// See the ASTImporter for use cases.
1770
  void addDeclInternal(Decl *D);
1771
1772
  /// Add the declaration D to this context without modifying
1773
  /// any lookup tables.
1774
  ///
1775
  /// This is useful for some operations in dependent contexts where
1776
  /// the semantic context might not be dependent;  this basically
1777
  /// only happens with friends.
1778
  void addHiddenDecl(Decl *D);
1779
1780
  /// Removes a declaration from this context.
1781
  void removeDecl(Decl *D);
1782
1783
  /// Checks whether a declaration is in this context.
1784
  bool containsDecl(Decl *D) const;
1785
1786
  /// Checks whether a declaration is in this context.
1787
  /// This also loads the Decls from the external source before the check.
1788
  bool containsDeclAndLoad(Decl *D) const;
1789
1790
  using lookup_result = DeclContextLookupResult;
1791
  using lookup_iterator = lookup_result::iterator;
1792
1793
  /// lookup - Find the declarations (if any) with the given Name in
1794
  /// this context. Returns a range of iterators that contains all of
1795
  /// the declarations with this name, with object, function, member,
1796
  /// and enumerator names preceding any tag name. Note that this
1797
  /// routine will not look into parent contexts.
1798
  lookup_result lookup(DeclarationName Name) const;
1799
1800
  /// Find the declarations with the given name that are visible
1801
  /// within this context; don't attempt to retrieve anything from an
1802
  /// external source.
1803
  lookup_result noload_lookup(DeclarationName Name);
1804
1805
  /// A simplistic name lookup mechanism that performs name lookup
1806
  /// into this declaration context without consulting the external source.
1807
  ///
1808
  /// This function should almost never be used, because it subverts the
1809
  /// usual relationship between a DeclContext and the external source.
1810
  /// See the ASTImporter for the (few, but important) use cases.
1811
  ///
1812
  /// FIXME: This is very inefficient; replace uses of it with uses of
1813
  /// noload_lookup.
1814
  void localUncachedLookup(DeclarationName Name,
1815
                           SmallVectorImpl<NamedDecl *> &Results);
1816
1817
  /// Makes a declaration visible within this context.
1818
  ///
1819
  /// This routine makes the declaration D visible to name lookup
1820
  /// within this context and, if this is a transparent context,
1821
  /// within its parent contexts up to the first enclosing
1822
  /// non-transparent context. Making a declaration visible within a
1823
  /// context does not transfer ownership of a declaration, and a
1824
  /// declaration can be visible in many contexts that aren't its
1825
  /// lexical context.
1826
  ///
1827
  /// If D is a redeclaration of an existing declaration that is
1828
  /// visible from this context, as determined by
1829
  /// NamedDecl::declarationReplaces, the previous declaration will be
1830
  /// replaced with D.
1831
  void makeDeclVisibleInContext(NamedDecl *D);
1832
1833
  /// all_lookups_iterator - An iterator that provides a view over the results
1834
  /// of looking up every possible name.
1835
  class all_lookups_iterator;
1836
1837
  using lookups_range = llvm::iterator_range<all_lookups_iterator>;
1838
1839
  lookups_range lookups() const;
1840
  // Like lookups(), but avoids loading external declarations.
1841
  // If PreserveInternalState, avoids building lookup data structures too.
1842
  lookups_range noload_lookups(bool PreserveInternalState) const;
1843
1844
  /// Iterators over all possible lookups within this context.
1845
  all_lookups_iterator lookups_begin() const;
1846
  all_lookups_iterator lookups_end() const;
1847
1848
  /// Iterators over all possible lookups within this context that are
1849
  /// currently loaded; don't attempt to retrieve anything from an external
1850
  /// source.
1851
  all_lookups_iterator noload_lookups_begin() const;
1852
  all_lookups_iterator noload_lookups_end() const;
1853
1854
  struct udir_iterator;
1855
1856
  using udir_iterator_base =
1857
      llvm::iterator_adaptor_base<udir_iterator, lookup_iterator,
1858
                                  std::random_access_iterator_tag,
1859
                                  UsingDirectiveDecl *>;
1860
1861
  struct udir_iterator : udir_iterator_base {
1862
127M
    udir_iterator(lookup_iterator I) : udir_iterator_base(I) {}
1863
1864
    UsingDirectiveDecl *operator*() const;
1865
  };
1866
1867
  using udir_range = llvm::iterator_range<udir_iterator>;
1868
1869
  udir_range using_directives() const;
1870
1871
  // These are all defined in DependentDiagnostic.h.
1872
  class ddiag_iterator;
1873
1874
  using ddiag_range = llvm::iterator_range<DeclContext::ddiag_iterator>;
1875
1876
  inline ddiag_range ddiags() const;
1877
1878
  // Low-level accessors
1879
1880
  /// Mark that there are external lexical declarations that we need
1881
  /// to include in our lookup table (and that are not available as external
1882
  /// visible lookups). These extra lookup results will be found by walking
1883
  /// the lexical declarations of this context. This should be used only if
1884
  /// setHasExternalLexicalStorage() has been called on any decl context for
1885
  /// which this is the primary context.
1886
1.88k
  void setMustBuildLookupTable() {
1887
1.88k
    assert(this == getPrimaryContext() &&
1888
1.88k
           "should only be called on primary context");
1889
1.88k
    HasLazyExternalLexicalLookups = true;
1890
1.88k
  }
1891
1892
  /// Retrieve the internal representation of the lookup structure.
1893
  /// This may omit some names if we are lazily building the structure.
1894
1.08M
  StoredDeclsMap *getLookupPtr() const { return LookupPtr; }
1895
1896
  /// Ensure the lookup structure is fully-built and return it.
1897
  StoredDeclsMap *buildLookup();
1898
1899
  /// Whether this DeclContext has external storage containing
1900
  /// additional declarations that are lexically in this context.
1901
19.5M
  bool hasExternalLexicalStorage() const { return ExternalLexicalStorage; }
1902
1903
  /// State whether this DeclContext has external storage for
1904
  /// declarations lexically in this context.
1905
51.0k
  void setHasExternalLexicalStorage(bool ES = true) {
1906
51.0k
    ExternalLexicalStorage = ES;
1907
51.0k
  }
1908
1909
  /// Whether this DeclContext has external storage containing
1910
  /// additional declarations that are visible in this context.
1911
147M
  bool hasExternalVisibleStorage() const { return ExternalVisibleStorage; }
1912
1913
  /// State whether this DeclContext has external storage for
1914
  /// declarations visible in this context.
1915
11.2k
  void setHasExternalVisibleStorage(bool ES = true) {
1916
11.2k
    ExternalVisibleStorage = ES;
1917
11.2k
    if (ES && 
LookupPtr11.2k
)
1918
905
      NeedToReconcileExternalVisibleStorage = true;
1919
11.2k
  }
1920
1921
  /// Determine whether the given declaration is stored in the list of
1922
  /// declarations lexically within this context.
1923
28.1k
  bool isDeclInLexicalTraversal(const Decl *D) const {
1924
28.1k
    return D && (D->NextInContextAndBits.getPointer() || 
D == FirstDecl27.6k
||
1925
28.1k
                 
D == LastDecl27.2k
);
1926
28.1k
  }
1927
1928
44.2M
  bool setUseQualifiedLookup(bool use = true) {
1929
44.2M
    bool old_value = UseQualifiedLookup;
1930
44.2M
    UseQualifiedLookup = use;
1931
44.2M
    return old_value;
1932
44.2M
  }
1933
1934
  bool shouldUseQualifiedLookup() const {
1935
    return UseQualifiedLookup;
1936
  }
1937
1938
  static bool classof(const Decl *D);
1939
0
  static bool classof(const DeclContext *D) { return true; }
1940
1941
  void dumpDeclContext() const;
1942
  void dumpLookups() const;
1943
  void dumpLookups(llvm::raw_ostream &OS, bool DumpDecls = false,
1944
                   bool Deserialize = false) const;
1945
1946
private:
1947
  friend class DependentDiagnostic;
1948
1949
  void reconcileExternalVisibleStorage() const;
1950
  bool LoadLexicalDeclsFromExternalStorage() const;
1951
1952
  /// Makes a declaration visible within this context, but
1953
  /// suppresses searches for external declarations with the same
1954
  /// name.
1955
  ///
1956
  /// Analogous to makeDeclVisibleInContext, but for the exclusive
1957
  /// use of addDeclInternal().
1958
  void makeDeclVisibleInContextInternal(NamedDecl *D);
1959
1960
  StoredDeclsMap *CreateStoredDeclsMap(ASTContext &C) const;
1961
1962
  void loadLazyLocalLexicalLookups();
1963
  void buildLookupImpl(DeclContext *DCtx, bool Internal);
1964
  void makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal,
1965
                                         bool Rediscoverable);
1966
  void makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal);
1967
};
1968
1969
21.7M
inline bool Decl::isTemplateParameter() const {
1970
21.7M
  return getKind() == TemplateTypeParm || 
getKind() == NonTypeTemplateParm21.7M
||
1971
21.7M
         
getKind() == TemplateTemplateParm21.7M
;
1972
21.7M
}
1973
1974
// Specialization selected when ToTy is not a known subclass of DeclContext.
1975
template <class ToTy,
1976
          bool IsKnownSubtype = ::std::is_base_of<DeclContext, ToTy>::value>
1977
struct cast_convert_decl_context {
1978
192M
  static const ToTy *doit(const DeclContext *Val) {
1979
192M
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
1980
192M
  }
clang::cast_convert_decl_context<clang::Decl, false>::doit(clang::DeclContext const*)
Line
Count
Source
1978
189M
  static const ToTy *doit(const DeclContext *Val) {
1979
189M
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
1980
189M
  }
clang::cast_convert_decl_context<clang::NamedDecl, false>::doit(clang::DeclContext const*)
Line
Count
Source
1978
2.74M
  static const ToTy *doit(const DeclContext *Val) {
1979
2.74M
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
1980
2.74M
  }
clang::cast_convert_decl_context<clang::TypeDecl, false>::doit(clang::DeclContext const*)
Line
Count
Source
1978
103
  static const ToTy *doit(const DeclContext *Val) {
1979
103
    return static_cast<const ToTy*>(Decl::castFromDeclContext(Val));
1980
103
  }
Unexecuted instantiation: clang::cast_convert_decl_context<clang::TypedefNameDecl, false>::doit(clang::DeclContext const*)
1981
1982
1.22G
  static ToTy *doit(DeclContext *Val) {
1983
1.22G
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
1984
1.22G
  }
clang::cast_convert_decl_context<clang::Decl, false>::doit(clang::DeclContext*)
Line
Count
Source
1982
1.22G
  static ToTy *doit(DeclContext *Val) {
1983
1.22G
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
1984
1.22G
  }
clang::cast_convert_decl_context<clang::NamedDecl, false>::doit(clang::DeclContext*)
Line
Count
Source
1982
2.11M
  static ToTy *doit(DeclContext *Val) {
1983
2.11M
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
1984
2.11M
  }
clang::cast_convert_decl_context<clang::TypeDecl, false>::doit(clang::DeclContext*)
Line
Count
Source
1982
3.23k
  static ToTy *doit(DeclContext *Val) {
1983
3.23k
    return static_cast<ToTy*>(Decl::castFromDeclContext(Val));
1984
3.23k
  }
1985
};
1986
1987
// Specialization selected when ToTy is a known subclass of DeclContext.
1988
template <class ToTy>
1989
struct cast_convert_decl_context<ToTy, true> {
1990
191M
  static const ToTy *doit(const DeclContext *Val) {
1991
191M
    return static_cast<const ToTy*>(Val);
1992
191M
  }
clang::cast_convert_decl_context<clang::CXXRecordDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
91.0M
  static const ToTy *doit(const DeclContext *Val) {
1991
91.0M
    return static_cast<const ToTy*>(Val);
1992
91.0M
  }
clang::cast_convert_decl_context<clang::RecordDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
7.74M
  static const ToTy *doit(const DeclContext *Val) {
1991
7.74M
    return static_cast<const ToTy*>(Val);
1992
7.74M
  }
clang::cast_convert_decl_context<clang::ObjCCategoryDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
2.87k
  static const ToTy *doit(const DeclContext *Val) {
1991
2.87k
    return static_cast<const ToTy*>(Val);
1992
2.87k
  }
clang::cast_convert_decl_context<clang::ObjCImplementationDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
65
  static const ToTy *doit(const DeclContext *Val) {
1991
65
    return static_cast<const ToTy*>(Val);
1992
65
  }
clang::cast_convert_decl_context<clang::ObjCInterfaceDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
47.3k
  static const ToTy *doit(const DeclContext *Val) {
1991
47.3k
    return static_cast<const ToTy*>(Val);
1992
47.3k
  }
clang::cast_convert_decl_context<clang::ObjCCategoryImplDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
71
  static const ToTy *doit(const DeclContext *Val) {
1991
71
    return static_cast<const ToTy*>(Val);
1992
71
  }
clang::cast_convert_decl_context<clang::NamespaceDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
12.5M
  static const ToTy *doit(const DeclContext *Val) {
1991
12.5M
    return static_cast<const ToTy*>(Val);
1992
12.5M
  }
clang::cast_convert_decl_context<clang::EnumDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
1.35M
  static const ToTy *doit(const DeclContext *Val) {
1991
1.35M
    return static_cast<const ToTy*>(Val);
1992
1.35M
  }
clang::cast_convert_decl_context<clang::CapturedDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
1.85k
  static const ToTy *doit(const DeclContext *Val) {
1991
1.85k
    return static_cast<const ToTy*>(Val);
1992
1.85k
  }
clang::cast_convert_decl_context<clang::FunctionDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
36.5M
  static const ToTy *doit(const DeclContext *Val) {
1991
36.5M
    return static_cast<const ToTy*>(Val);
1992
36.5M
  }
clang::cast_convert_decl_context<clang::BlockDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
113
  static const ToTy *doit(const DeclContext *Val) {
1991
113
    return static_cast<const ToTy*>(Val);
1992
113
  }
clang::cast_convert_decl_context<clang::ObjCMethodDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
387
  static const ToTy *doit(const DeclContext *Val) {
1991
387
    return static_cast<const ToTy*>(Val);
1992
387
  }
clang::cast_convert_decl_context<clang::ObjCImplDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
341
  static const ToTy *doit(const DeclContext *Val) {
1991
341
    return static_cast<const ToTy*>(Val);
1992
341
  }
clang::cast_convert_decl_context<clang::CXXMethodDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
10.6M
  static const ToTy *doit(const DeclContext *Val) {
1991
10.6M
    return static_cast<const ToTy*>(Val);
1992
10.6M
  }
Unexecuted instantiation: clang::cast_convert_decl_context<clang::CXXConstructorDecl, true>::doit(clang::DeclContext const*)
clang::cast_convert_decl_context<clang::CXXDestructorDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
3
  static const ToTy *doit(const DeclContext *Val) {
1991
3
    return static_cast<const ToTy*>(Val);
1992
3
  }
Unexecuted instantiation: clang::cast_convert_decl_context<clang::CXXConversionDecl, true>::doit(clang::DeclContext const*)
clang::cast_convert_decl_context<clang::ClassTemplateSpecializationDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
4.44k
  static const ToTy *doit(const DeclContext *Val) {
1991
4.44k
    return static_cast<const ToTy*>(Val);
1992
4.44k
  }
clang::cast_convert_decl_context<clang::ClassTemplatePartialSpecializationDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
1
  static const ToTy *doit(const DeclContext *Val) {
1991
1
    return static_cast<const ToTy*>(Val);
1992
1
  }
clang::cast_convert_decl_context<clang::LinkageSpecDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
10.6M
  static const ToTy *doit(const DeclContext *Val) {
1991
10.6M
    return static_cast<const ToTy*>(Val);
1992
10.6M
  }
clang::cast_convert_decl_context<clang::ObjCContainerDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
6.52k
  static const ToTy *doit(const DeclContext *Val) {
1991
6.52k
    return static_cast<const ToTy*>(Val);
1992
6.52k
  }
clang::cast_convert_decl_context<clang::ObjCProtocolDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
1.09k
  static const ToTy *doit(const DeclContext *Val) {
1991
1.09k
    return static_cast<const ToTy*>(Val);
1992
1.09k
  }
clang::cast_convert_decl_context<clang::TagDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
354
  static const ToTy *doit(const DeclContext *Val) {
1991
354
    return static_cast<const ToTy*>(Val);
1992
354
  }
clang::cast_convert_decl_context<clang::TranslationUnitDecl, true>::doit(clang::DeclContext const*)
Line
Count
Source
1990
20.4M
  static const ToTy *doit(const DeclContext *Val) {
1991
20.4M
    return static_cast<const ToTy*>(Val);
1992
20.4M
  }
1993
1994
892M
  static ToTy *doit(DeclContext *Val) {
1995
892M
    return static_cast<ToTy*>(Val);
1996
892M
  }
clang::cast_convert_decl_context<clang::CXXRecordDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
84.3M
  static ToTy *doit(DeclContext *Val) {
1995
84.3M
    return static_cast<ToTy*>(Val);
1996
84.3M
  }
clang::cast_convert_decl_context<clang::RecordDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
1.02M
  static ToTy *doit(DeclContext *Val) {
1995
1.02M
    return static_cast<ToTy*>(Val);
1996
1.02M
  }
clang::cast_convert_decl_context<clang::FunctionDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
20.1M
  static ToTy *doit(DeclContext *Val) {
1995
20.1M
    return static_cast<ToTy*>(Val);
1996
20.1M
  }
clang::cast_convert_decl_context<clang::TagDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
181M
  static ToTy *doit(DeclContext *Val) {
1995
181M
    return static_cast<ToTy*>(Val);
1996
181M
  }
clang::cast_convert_decl_context<clang::CXXMethodDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
28.2M
  static ToTy *doit(DeclContext *Val) {
1995
28.2M
    return static_cast<ToTy*>(Val);
1996
28.2M
  }
clang::cast_convert_decl_context<clang::ObjCContainerDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
309k
  static ToTy *doit(DeclContext *Val) {
1995
309k
    return static_cast<ToTy*>(Val);
1996
309k
  }
clang::cast_convert_decl_context<clang::ObjCCategoryImplDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
6
  static ToTy *doit(DeclContext *Val) {
1995
6
    return static_cast<ToTy*>(Val);
1996
6
  }
clang::cast_convert_decl_context<clang::ObjCImplDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
43.6k
  static ToTy *doit(DeclContext *Val) {
1995
43.6k
    return static_cast<ToTy*>(Val);
1996
43.6k
  }
clang::cast_convert_decl_context<clang::NamespaceDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
169k
  static ToTy *doit(DeclContext *Val) {
1995
169k
    return static_cast<ToTy*>(Val);
1996
169k
  }
clang::cast_convert_decl_context<clang::EnumDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
41.8k
  static ToTy *doit(DeclContext *Val) {
1995
41.8k
    return static_cast<ToTy*>(Val);
1996
41.8k
  }
clang::cast_convert_decl_context<clang::TranslationUnitDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
573M
  static ToTy *doit(DeclContext *Val) {
1995
573M
    return static_cast<ToTy*>(Val);
1996
573M
  }
clang::cast_convert_decl_context<clang::ObjCMethodDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
31.1k
  static ToTy *doit(DeclContext *Val) {
1995
31.1k
    return static_cast<ToTy*>(Val);
1996
31.1k
  }
clang::cast_convert_decl_context<clang::CXXConstructorDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
8.87k
  static ToTy *doit(DeclContext *Val) {
1995
8.87k
    return static_cast<ToTy*>(Val);
1996
8.87k
  }
clang::cast_convert_decl_context<clang::BlockDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
719
  static ToTy *doit(DeclContext *Val) {
1995
719
    return static_cast<ToTy*>(Val);
1996
719
  }
clang::cast_convert_decl_context<clang::ObjCInterfaceDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
366k
  static ToTy *doit(DeclContext *Val) {
1995
366k
    return static_cast<ToTy*>(Val);
1996
366k
  }
clang::cast_convert_decl_context<clang::ObjCCategoryDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
37.4k
  static ToTy *doit(DeclContext *Val) {
1995
37.4k
    return static_cast<ToTy*>(Val);
1996
37.4k
  }
clang::cast_convert_decl_context<clang::LinkageSpecDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
848k
  static ToTy *doit(DeclContext *Val) {
1995
848k
    return static_cast<ToTy*>(Val);
1996
848k
  }
clang::cast_convert_decl_context<clang::ObjCProtocolDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
142k
  static ToTy *doit(DeclContext *Val) {
1995
142k
    return static_cast<ToTy*>(Val);
1996
142k
  }
clang::cast_convert_decl_context<clang::OMPDeclareReductionDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
1.48k
  static ToTy *doit(DeclContext *Val) {
1995
1.48k
    return static_cast<ToTy*>(Val);
1996
1.48k
  }
clang::cast_convert_decl_context<clang::ClassTemplateSpecializationDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
1.79M
  static ToTy *doit(DeclContext *Val) {
1995
1.79M
    return static_cast<ToTy*>(Val);
1996
1.79M
  }
clang::cast_convert_decl_context<clang::CapturedDecl, true>::doit(clang::DeclContext*)
Line
Count
Source
1994
20.9k
  static ToTy *doit(DeclContext *Val) {
1995
20.9k
    return static_cast<ToTy*>(Val);
1996
20.9k
  }
1997
};
1998
1999
} // namespace clang
2000
2001
namespace llvm {
2002
2003
/// isa<T>(DeclContext*)
2004
template <typename To>
2005
struct isa_impl<To, ::clang::DeclContext> {
2006
1.00G
  static bool doit(const ::clang::DeclContext &Val) {
2007
1.00G
    return To::classofKind(Val.getDeclKind());
2008
1.00G
  }
llvm::isa_impl<clang::ObjCCategoryDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
199k
  static bool doit(const ::clang::DeclContext &Val) {
2007
199k
    return To::classofKind(Val.getDeclKind());
2008
199k
  }
llvm::isa_impl<clang::FunctionDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
157M
  static bool doit(const ::clang::DeclContext &Val) {
2007
157M
    return To::classofKind(Val.getDeclKind());
2008
157M
  }
llvm::isa_impl<clang::CXXRecordDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
205M
  static bool doit(const ::clang::DeclContext &Val) {
2007
205M
    return To::classofKind(Val.getDeclKind());
2008
205M
  }
llvm::isa_impl<clang::ObjCImplementationDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
16.7k
  static bool doit(const ::clang::DeclContext &Val) {
2007
16.7k
    return To::classofKind(Val.getDeclKind());
2008
16.7k
  }
llvm::isa_impl<clang::ObjCInterfaceDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
197k
  static bool doit(const ::clang::DeclContext &Val) {
2007
197k
    return To::classofKind(Val.getDeclKind());
2008
197k
  }
llvm::isa_impl<clang::ObjCCategoryImplDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
2.74k
  static bool doit(const ::clang::DeclContext &Val) {
2007
2.74k
    return To::classofKind(Val.getDeclKind());
2008
2.74k
  }
llvm::isa_impl<clang::ObjCProtocolDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
146k
  static bool doit(const ::clang::DeclContext &Val) {
2007
146k
    return To::classofKind(Val.getDeclKind());
2008
146k
  }
llvm::isa_impl<clang::NamespaceDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
13.6M
  static bool doit(const ::clang::DeclContext &Val) {
2007
13.6M
    return To::classofKind(Val.getDeclKind());
2008
13.6M
  }
llvm::isa_impl<clang::RecordDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
25.6M
  static bool doit(const ::clang::DeclContext &Val) {
2007
25.6M
    return To::classofKind(Val.getDeclKind());
2008
25.6M
  }
llvm::isa_impl<clang::ObjCMethodDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
42.5M
  static bool doit(const ::clang::DeclContext &Val) {
2007
42.5M
    return To::classofKind(Val.getDeclKind());
2008
42.5M
  }
llvm::isa_impl<clang::Decl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
1.33M
  static bool doit(const ::clang::DeclContext &Val) {
2007
1.33M
    return To::classofKind(Val.getDeclKind());
2008
1.33M
  }
llvm::isa_impl<clang::CapturedDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
78.7M
  static bool doit(const ::clang::DeclContext &Val) {
2007
78.7M
    return To::classofKind(Val.getDeclKind());
2008
78.7M
  }
llvm::isa_impl<clang::BlockDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
57.0M
  static bool doit(const ::clang::DeclContext &Val) {
2007
57.0M
    return To::classofKind(Val.getDeclKind());
2008
57.0M
  }
llvm::isa_impl<clang::TranslationUnitDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
55.0M
  static bool doit(const ::clang::DeclContext &Val) {
2007
55.0M
    return To::classofKind(Val.getDeclKind());
2008
55.0M
  }
llvm::isa_impl<clang::TagDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
5.27M
  static bool doit(const ::clang::DeclContext &Val) {
2007
5.27M
    return To::classofKind(Val.getDeclKind());
2008
5.27M
  }
llvm::isa_impl<clang::LinkageSpecDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
28.9M
  static bool doit(const ::clang::DeclContext &Val) {
2007
28.9M
    return To::classofKind(Val.getDeclKind());
2008
28.9M
  }
llvm::isa_impl<clang::ObjCContainerDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
9.69M
  static bool doit(const ::clang::DeclContext &Val) {
2007
9.69M
    return To::classofKind(Val.getDeclKind());
2008
9.69M
  }
llvm::isa_impl<clang::ObjCImplDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
65.3k
  static bool doit(const ::clang::DeclContext &Val) {
2007
65.3k
    return To::classofKind(Val.getDeclKind());
2008
65.3k
  }
llvm::isa_impl<clang::NamedDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
2.36M
  static bool doit(const ::clang::DeclContext &Val) {
2007
2.36M
    return To::classofKind(Val.getDeclKind());
2008
2.36M
  }
llvm::isa_impl<clang::EnumDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
83.3M
  static bool doit(const ::clang::DeclContext &Val) {
2007
83.3M
    return To::classofKind(Val.getDeclKind());
2008
83.3M
  }
llvm::isa_impl<clang::CXXMethodDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
84.1M
  static bool doit(const ::clang::DeclContext &Val) {
2007
84.1M
    return To::classofKind(Val.getDeclKind());
2008
84.1M
  }
llvm::isa_impl<clang::OMPDeclareReductionDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
58.9M
  static bool doit(const ::clang::DeclContext &Val) {
2007
58.9M
    return To::classofKind(Val.getDeclKind());
2008
58.9M
  }
llvm::isa_impl<clang::ExportDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
7.34k
  static bool doit(const ::clang::DeclContext &Val) {
2007
7.34k
    return To::classofKind(Val.getDeclKind());
2008
7.34k
  }
llvm::isa_impl<clang::CXXConstructorDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
454k
  static bool doit(const ::clang::DeclContext &Val) {
2007
454k
    return To::classofKind(Val.getDeclKind());
2008
454k
  }
llvm::isa_impl<clang::ClassTemplateSpecializationDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
2.51M
  static bool doit(const ::clang::DeclContext &Val) {
2007
2.51M
    return To::classofKind(Val.getDeclKind());
2008
2.51M
  }
llvm::isa_impl<clang::TypeDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
285k
  static bool doit(const ::clang::DeclContext &Val) {
2007
285k
    return To::classofKind(Val.getDeclKind());
2008
285k
  }
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
2006
94.6M
  static bool doit(const ::clang::DeclContext &Val) {
2007
94.6M
    return To::classofKind(Val.getDeclKind());
2008
94.6M
  }
llvm::isa_impl<clang::CXXDestructorDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
425k
  static bool doit(const ::clang::DeclContext &Val) {
2007
425k
    return To::classofKind(Val.getDeclKind());
2008
425k
  }
llvm::isa_impl<clang::TypedefNameDecl, clang::DeclContext, void>::doit(clang::DeclContext const&)
Line
Count
Source
2006
47
  static bool doit(const ::clang::DeclContext &Val) {
2007
47
    return To::classofKind(Val.getDeclKind());
2008
47
  }
2009
};
2010
2011
/// cast<T>(DeclContext*)
2012
template<class ToTy>
2013
struct cast_convert_val<ToTy,
2014
                        const ::clang::DeclContext,const ::clang::DeclContext> {
2015
  static const ToTy &doit(const ::clang::DeclContext &Val) {
2016
    return *::clang::cast_convert_decl_context<ToTy>::doit(&Val);
2017
  }
2018
};
2019
2020
template<class ToTy>
2021
struct cast_convert_val<ToTy, ::clang::DeclContext, ::clang::DeclContext> {
2022
  static ToTy &doit(::clang::DeclContext &Val) {
2023
    return *::clang::cast_convert_decl_context<ToTy>::doit(&Val);
2024
  }
2025
};
2026
2027
template<class ToTy>
2028
struct cast_convert_val<ToTy,
2029
                     const ::clang::DeclContext*, const ::clang::DeclContext*> {
2030
383M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
383M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
383M
  }
llvm::cast_convert_val<clang::CXXRecordDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
91.0M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
91.0M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
91.0M
  }
llvm::cast_convert_val<clang::RecordDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
7.74M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
7.74M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
7.74M
  }
llvm::cast_convert_val<clang::Decl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
189M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
189M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
189M
  }
llvm::cast_convert_val<clang::ObjCCategoryDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
2.87k
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
2.87k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
2.87k
  }
llvm::cast_convert_val<clang::ObjCImplementationDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
65
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
65
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
65
  }
llvm::cast_convert_val<clang::ObjCInterfaceDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
47.3k
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
47.3k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
47.3k
  }
llvm::cast_convert_val<clang::ObjCCategoryImplDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
71
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
71
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
71
  }
llvm::cast_convert_val<clang::NamespaceDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
12.5M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
12.5M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
12.5M
  }
llvm::cast_convert_val<clang::EnumDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
1.35M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
1.35M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
1.35M
  }
llvm::cast_convert_val<clang::CapturedDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
1.85k
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
1.85k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
1.85k
  }
llvm::cast_convert_val<clang::FunctionDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
36.5M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
36.5M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
36.5M
  }
llvm::cast_convert_val<clang::BlockDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
113
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
113
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
113
  }
llvm::cast_convert_val<clang::ObjCMethodDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
387
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
387
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
387
  }
llvm::cast_convert_val<clang::ObjCImplDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
341
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
341
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
341
  }
llvm::cast_convert_val<clang::CXXMethodDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
10.6M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
10.6M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
10.6M
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::CXXConstructorDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
llvm::cast_convert_val<clang::CXXDestructorDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
3
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
3
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
3
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::CXXConversionDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
llvm::cast_convert_val<clang::ClassTemplateSpecializationDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
4.44k
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
4.44k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
4.44k
  }
llvm::cast_convert_val<clang::ClassTemplatePartialSpecializationDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
1
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
1
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
1
  }
llvm::cast_convert_val<clang::LinkageSpecDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
10.6M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
10.6M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
10.6M
  }
llvm::cast_convert_val<clang::ObjCContainerDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
6.52k
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
6.52k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
6.52k
  }
llvm::cast_convert_val<clang::NamedDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
2.74M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
2.74M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
2.74M
  }
llvm::cast_convert_val<clang::ObjCProtocolDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
1.09k
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
1.09k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
1.09k
  }
llvm::cast_convert_val<clang::TagDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
354
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
354
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
354
  }
llvm::cast_convert_val<clang::TypeDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
103
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
103
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
103
  }
llvm::cast_convert_val<clang::TranslationUnitDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
Line
Count
Source
2030
20.4M
  static const ToTy *doit(const ::clang::DeclContext *Val) {
2031
20.4M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2032
20.4M
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::TypedefNameDecl, clang::DeclContext const*, clang::DeclContext const*>::doit(clang::DeclContext const*)
2033
};
2034
2035
template<class ToTy>
2036
struct cast_convert_val<ToTy, ::clang::DeclContext*, ::clang::DeclContext*> {
2037
2.12G
  static ToTy *doit(::clang::DeclContext *Val) {
2038
2.12G
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
2.12G
  }
llvm::cast_convert_val<clang::Decl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
1.22G
  static ToTy *doit(::clang::DeclContext *Val) {
2038
1.22G
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
1.22G
  }
llvm::cast_convert_val<clang::RecordDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
1.02M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
1.02M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
1.02M
  }
llvm::cast_convert_val<clang::CXXRecordDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
84.3M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
84.3M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
84.3M
  }
llvm::cast_convert_val<clang::TagDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
181M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
181M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
181M
  }
llvm::cast_convert_val<clang::ObjCContainerDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
309k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
309k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
309k
  }
llvm::cast_convert_val<clang::ObjCCategoryImplDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
6
  static ToTy *doit(::clang::DeclContext *Val) {
2038
6
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
6
  }
llvm::cast_convert_val<clang::ObjCImplDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
43.6k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
43.6k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
43.6k
  }
llvm::cast_convert_val<clang::NamespaceDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
169k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
169k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
169k
  }
llvm::cast_convert_val<clang::EnumDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
41.8k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
41.8k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
41.8k
  }
llvm::cast_convert_val<clang::TranslationUnitDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
573M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
573M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
573M
  }
llvm::cast_convert_val<clang::FunctionDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
20.1M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
20.1M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
20.1M
  }
llvm::cast_convert_val<clang::CXXMethodDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
28.2M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
28.2M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
28.2M
  }
llvm::cast_convert_val<clang::ObjCMethodDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
31.1k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
31.1k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
31.1k
  }
llvm::cast_convert_val<clang::NamedDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
2.11M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
2.11M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
2.11M
  }
llvm::cast_convert_val<clang::CXXConstructorDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
8.87k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
8.87k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
8.87k
  }
llvm::cast_convert_val<clang::BlockDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
719
  static ToTy *doit(::clang::DeclContext *Val) {
2038
719
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
719
  }
llvm::cast_convert_val<clang::ObjCInterfaceDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
366k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
366k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
366k
  }
llvm::cast_convert_val<clang::ObjCCategoryDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
37.4k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
37.4k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
37.4k
  }
llvm::cast_convert_val<clang::LinkageSpecDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
848k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
848k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
848k
  }
llvm::cast_convert_val<clang::ObjCProtocolDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
142k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
142k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
142k
  }
llvm::cast_convert_val<clang::OMPDeclareReductionDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
1.48k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
1.48k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
1.48k
  }
llvm::cast_convert_val<clang::ClassTemplateSpecializationDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
1.79M
  static ToTy *doit(::clang::DeclContext *Val) {
2038
1.79M
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
1.79M
  }
llvm::cast_convert_val<clang::TypeDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
3.23k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
3.23k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
3.23k
  }
llvm::cast_convert_val<clang::CapturedDecl, clang::DeclContext*, clang::DeclContext*>::doit(clang::DeclContext*)
Line
Count
Source
2037
20.9k
  static ToTy *doit(::clang::DeclContext *Val) {
2038
20.9k
    return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
2039
20.9k
  }
2040
};
2041
2042
/// Implement cast_convert_val for Decl -> DeclContext conversions.
2043
template<class FromTy>
2044
struct cast_convert_val< ::clang::DeclContext, FromTy, FromTy> {
2045
  static ::clang::DeclContext &doit(const FromTy &Val) {
2046
    return *FromTy::castToDeclContext(&Val);
2047
  }
2048
};
2049
2050
template<class FromTy>
2051
struct cast_convert_val< ::clang::DeclContext, FromTy*, FromTy*> {
2052
14.0M
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
14.0M
    return FromTy::castToDeclContext(Val);
2054
14.0M
  }
llvm::cast_convert_val<clang::DeclContext, clang::Decl const*, clang::Decl const*>::doit(clang::Decl const*)
Line
Count
Source
2052
7.13M
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
7.13M
    return FromTy::castToDeclContext(Val);
2054
7.13M
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::AccessSpecDecl*, clang::AccessSpecDecl*>::doit(clang::AccessSpecDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::BlockDecl*, clang::BlockDecl*>::doit(clang::BlockDecl const*)
Line
Count
Source
2052
36
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
36
    return FromTy::castToDeclContext(Val);
2054
36
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CapturedDecl*, clang::CapturedDecl*>::doit(clang::CapturedDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ClassScopeFunctionSpecializationDecl*, clang::ClassScopeFunctionSpecializationDecl*>::doit(clang::ClassScopeFunctionSpecializationDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::EmptyDecl*, clang::EmptyDecl*>::doit(clang::EmptyDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ExportDecl*, clang::ExportDecl*>::doit(clang::ExportDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ExternCContextDecl*, clang::ExternCContextDecl*>::doit(clang::ExternCContextDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FileScopeAsmDecl*, clang::FileScopeAsmDecl*>::doit(clang::FileScopeAsmDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FriendDecl*, clang::FriendDecl*>::doit(clang::FriendDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FriendTemplateDecl*, clang::FriendTemplateDecl*>::doit(clang::FriendTemplateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ImportDecl*, clang::ImportDecl*>::doit(clang::ImportDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::LinkageSpecDecl*, clang::LinkageSpecDecl*>::doit(clang::LinkageSpecDecl const*)
Line
Count
Source
2052
243
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
243
    return FromTy::castToDeclContext(Val);
2054
243
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::LabelDecl*, clang::LabelDecl*>::doit(clang::LabelDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::NamespaceDecl*, clang::NamespaceDecl*>::doit(clang::NamespaceDecl const*)
Line
Count
Source
2052
4.17k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
4.17k
    return FromTy::castToDeclContext(Val);
2054
4.17k
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::NamespaceAliasDecl*, clang::NamespaceAliasDecl*>::doit(clang::NamespaceAliasDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCCompatibleAliasDecl*, clang::ObjCCompatibleAliasDecl*>::doit(clang::ObjCCompatibleAliasDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::ObjCCategoryDecl*, clang::ObjCCategoryDecl*>::doit(clang::ObjCCategoryDecl const*)
Line
Count
Source
2052
352
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
352
    return FromTy::castToDeclContext(Val);
2054
352
  }
llvm::cast_convert_val<clang::DeclContext, clang::ObjCCategoryImplDecl*, clang::ObjCCategoryImplDecl*>::doit(clang::ObjCCategoryImplDecl const*)
Line
Count
Source
2052
88
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
88
    return FromTy::castToDeclContext(Val);
2054
88
  }
llvm::cast_convert_val<clang::DeclContext, clang::ObjCImplementationDecl*, clang::ObjCImplementationDecl*>::doit(clang::ObjCImplementationDecl const*)
Line
Count
Source
2052
2.05k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
2.05k
    return FromTy::castToDeclContext(Val);
2054
2.05k
  }
llvm::cast_convert_val<clang::DeclContext, clang::ObjCInterfaceDecl*, clang::ObjCInterfaceDecl*>::doit(clang::ObjCInterfaceDecl const*)
Line
Count
Source
2052
7.03k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
7.03k
    return FromTy::castToDeclContext(Val);
2054
7.03k
  }
llvm::cast_convert_val<clang::DeclContext, clang::ObjCProtocolDecl*, clang::ObjCProtocolDecl*>::doit(clang::ObjCProtocolDecl const*)
Line
Count
Source
2052
1.59k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
1.59k
    return FromTy::castToDeclContext(Val);
2054
1.59k
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCMethodDecl*, clang::ObjCMethodDecl*>::doit(clang::ObjCMethodDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCPropertyDecl*, clang::ObjCPropertyDecl*>::doit(clang::ObjCPropertyDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::BuiltinTemplateDecl*, clang::BuiltinTemplateDecl*>::doit(clang::BuiltinTemplateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ClassTemplateDecl*, clang::ClassTemplateDecl*>::doit(clang::ClassTemplateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FunctionTemplateDecl*, clang::FunctionTemplateDecl*>::doit(clang::FunctionTemplateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TypeAliasTemplateDecl*, clang::TypeAliasTemplateDecl*>::doit(clang::TypeAliasTemplateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarTemplateDecl*, clang::VarTemplateDecl*>::doit(clang::VarTemplateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TemplateTemplateParmDecl*, clang::TemplateTemplateParmDecl*>::doit(clang::TemplateTemplateParmDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::EnumDecl*, clang::EnumDecl*>::doit(clang::EnumDecl const*)
Line
Count
Source
2052
1.89k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
1.89k
    return FromTy::castToDeclContext(Val);
2054
1.89k
  }
llvm::cast_convert_val<clang::DeclContext, clang::RecordDecl*, clang::RecordDecl*>::doit(clang::RecordDecl const*)
Line
Count
Source
2052
2.53k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
2.53k
    return FromTy::castToDeclContext(Val);
2054
2.53k
  }
llvm::cast_convert_val<clang::DeclContext, clang::CXXRecordDecl*, clang::CXXRecordDecl*>::doit(clang::CXXRecordDecl const*)
Line
Count
Source
2052
22.0k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
22.0k
    return FromTy::castToDeclContext(Val);
2054
22.0k
  }
llvm::cast_convert_val<clang::DeclContext, clang::ClassTemplateSpecializationDecl*, clang::ClassTemplateSpecializationDecl*>::doit(clang::ClassTemplateSpecializationDecl const*)
Line
Count
Source
2052
734
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
734
    return FromTy::castToDeclContext(Val);
2054
734
  }
llvm::cast_convert_val<clang::DeclContext, clang::ClassTemplatePartialSpecializationDecl*, clang::ClassTemplatePartialSpecializationDecl*>::doit(clang::ClassTemplatePartialSpecializationDecl const*)
Line
Count
Source
2052
1.18k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
1.18k
    return FromTy::castToDeclContext(Val);
2054
1.18k
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TemplateTypeParmDecl*, clang::TemplateTypeParmDecl*>::doit(clang::TemplateTypeParmDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCTypeParamDecl*, clang::ObjCTypeParamDecl*>::doit(clang::ObjCTypeParamDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TypeAliasDecl*, clang::TypeAliasDecl*>::doit(clang::TypeAliasDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::TypedefDecl*, clang::TypedefDecl*>::doit(clang::TypedefDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UnresolvedUsingTypenameDecl*, clang::UnresolvedUsingTypenameDecl*>::doit(clang::UnresolvedUsingTypenameDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingDecl*, clang::UsingDecl*>::doit(clang::UsingDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingDirectiveDecl*, clang::UsingDirectiveDecl*>::doit(clang::UsingDirectiveDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingPackDecl*, clang::UsingPackDecl*>::doit(clang::UsingPackDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UsingShadowDecl*, clang::UsingShadowDecl*>::doit(clang::UsingShadowDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ConstructorUsingShadowDecl*, clang::ConstructorUsingShadowDecl*>::doit(clang::ConstructorUsingShadowDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::BindingDecl*, clang::BindingDecl*>::doit(clang::BindingDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FieldDecl*, clang::FieldDecl*>::doit(clang::FieldDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCAtDefsFieldDecl*, clang::ObjCAtDefsFieldDecl*>::doit(clang::ObjCAtDefsFieldDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCIvarDecl*, clang::ObjCIvarDecl*>::doit(clang::ObjCIvarDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXDeductionGuideDecl*, clang::CXXDeductionGuideDecl*>::doit(clang::CXXDeductionGuideDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXMethodDecl*, clang::CXXMethodDecl*>::doit(clang::CXXMethodDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXConstructorDecl*, clang::CXXConstructorDecl*>::doit(clang::CXXConstructorDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXConversionDecl*, clang::CXXConversionDecl*>::doit(clang::CXXConversionDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::CXXDestructorDecl*, clang::CXXDestructorDecl*>::doit(clang::CXXDestructorDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::MSPropertyDecl*, clang::MSPropertyDecl*>::doit(clang::MSPropertyDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::NonTypeTemplateParmDecl*, clang::NonTypeTemplateParmDecl*>::doit(clang::NonTypeTemplateParmDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarDecl*, clang::VarDecl*>::doit(clang::VarDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::DecompositionDecl*, clang::DecompositionDecl*>::doit(clang::DecompositionDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ImplicitParamDecl*, clang::ImplicitParamDecl*>::doit(clang::ImplicitParamDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPCapturedExprDecl*, clang::OMPCapturedExprDecl*>::doit(clang::OMPCapturedExprDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ParmVarDecl*, clang::ParmVarDecl*>::doit(clang::ParmVarDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarTemplateSpecializationDecl*, clang::VarTemplateSpecializationDecl*>::doit(clang::VarTemplateSpecializationDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::VarTemplatePartialSpecializationDecl*, clang::VarTemplatePartialSpecializationDecl*>::doit(clang::VarTemplatePartialSpecializationDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::EnumConstantDecl*, clang::EnumConstantDecl*>::doit(clang::EnumConstantDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::IndirectFieldDecl*, clang::IndirectFieldDecl*>::doit(clang::IndirectFieldDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::UnresolvedUsingValueDecl*, clang::UnresolvedUsingValueDecl*>::doit(clang::UnresolvedUsingValueDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPThreadPrivateDecl*, clang::OMPThreadPrivateDecl*>::doit(clang::OMPThreadPrivateDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::ObjCPropertyImplDecl*, clang::ObjCPropertyImplDecl*>::doit(clang::ObjCPropertyImplDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::PragmaCommentDecl*, clang::PragmaCommentDecl*>::doit(clang::PragmaCommentDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::PragmaDetectMismatchDecl*, clang::PragmaDetectMismatchDecl*>::doit(clang::PragmaDetectMismatchDecl const*)
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::StaticAssertDecl*, clang::StaticAssertDecl*>::doit(clang::StaticAssertDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::TranslationUnitDecl*, clang::TranslationUnitDecl*>::doit(clang::TranslationUnitDecl const*)
Line
Count
Source
2052
9.26k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
9.26k
    return FromTy::castToDeclContext(Val);
2054
9.26k
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::FunctionDecl*, clang::FunctionDecl*>::doit(clang::FunctionDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::Decl*, clang::Decl*>::doit(clang::Decl const*)
Line
Count
Source
2052
4.76M
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
4.76M
    return FromTy::castToDeclContext(Val);
2054
4.76M
  }
llvm::cast_convert_val<clang::DeclContext, clang::NamedDecl*, clang::NamedDecl*>::doit(clang::NamedDecl const*)
Line
Count
Source
2052
2.09M
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
2.09M
    return FromTy::castToDeclContext(Val);
2054
2.09M
  }
Unexecuted instantiation: llvm::cast_convert_val<clang::DeclContext, clang::OMPDeclareReductionDecl*, clang::OMPDeclareReductionDecl*>::doit(clang::OMPDeclareReductionDecl const*)
llvm::cast_convert_val<clang::DeclContext, clang::ObjCContainerDecl const*, clang::ObjCContainerDecl const*>::doit(clang::ObjCContainerDecl const*)
Line
Count
Source
2052
7.61k
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
7.61k
    return FromTy::castToDeclContext(Val);
2054
7.61k
  }
llvm::cast_convert_val<clang::DeclContext, clang::ObjCInterfaceDecl const*, clang::ObjCInterfaceDecl const*>::doit(clang::ObjCInterfaceDecl const*)
Line
Count
Source
2052
317
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
317
    return FromTy::castToDeclContext(Val);
2054
317
  }
llvm::cast_convert_val<clang::DeclContext, clang::ValueDecl*, clang::ValueDecl*>::doit(clang::ValueDecl const*)
Line
Count
Source
2052
330
  static ::clang::DeclContext *doit(const FromTy *Val) {
2053
330
    return FromTy::castToDeclContext(Val);
2054
330
  }
2055
};
2056
2057
template<class FromTy>
2058
struct cast_convert_val< const ::clang::DeclContext, FromTy, FromTy> {
2059
  static const ::clang::DeclContext &doit(const FromTy &Val) {
2060
    return *FromTy::castToDeclContext(&Val);
2061
  }
2062
};
2063
2064
template<class FromTy>
2065
struct cast_convert_val< const ::clang::DeclContext, FromTy*, FromTy*> {
2066
  static const ::clang::DeclContext *doit(const FromTy *Val) {
2067
    return FromTy::castToDeclContext(Val);
2068
  }
2069
};
2070
2071
} // namespace llvm
2072
2073
#endif // LLVM_CLANG_AST_DECLBASE_H