reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Derived Classes

tools/clang/include/clang/AST/Decl.h
  477 class LabelDecl : public NamedDecl {
  523 class NamespaceDecl : public NamedDecl, public DeclContext,
  645 class ValueDecl : public NamedDecl {
 2950 class TypeDecl : public NamedDecl {
tools/clang/include/clang/AST/DeclCXX.h
 2845 class UsingDirectiveDecl : public NamedDecl {
 2949 class NamespaceAliasDecl : public NamedDecl,
 3068 class UsingShadowDecl : public NamedDecl, public Redeclarable<UsingShadowDecl> {
 3275 class UsingDecl : public NamedDecl, public Mergeable<UsingDecl> {
 3425 class UsingPackDecl final
tools/clang/include/clang/AST/DeclObjC.h
  138 class ObjCMethodDecl : public NamedDecl, public DeclContext {
  728 class ObjCPropertyDecl : public NamedDecl {
  968 class ObjCContainerDecl : public NamedDecl, public DeclContext {
 2728 class ObjCCompatibleAliasDecl : public NamedDecl {
tools/clang/include/clang/AST/DeclTemplate.h
  387 class TemplateDecl : public NamedDecl {

Declarations

gen/tools/clang/include/clang/AST/DeclNodes.inc
   95 ABSTRACT_DECL(NAMED(Named, Decl))
tools/clang/include/clang/AST/ASTImporter.h
   44 class NamedDecl;
tools/clang/include/clang/AST/ASTImporterLookupTable.h
   25 class NamedDecl;
tools/clang/include/clang/AST/ASTMutationListener.h
   29   class NamedDecl;
tools/clang/include/clang/AST/ASTUnresolvedSet.h
   26 class NamedDecl;
tools/clang/include/clang/AST/CXXInheritance.h
   35 class NamedDecl;
tools/clang/include/clang/AST/DeclAccessPair.h
   25 class NamedDecl;
tools/clang/include/clang/AST/DeclBase.h
   54 class NamedDecl;
tools/clang/include/clang/AST/DependentDiagnostic.h
   33 class NamedDecl;
tools/clang/include/clang/AST/Expr.h
   50   class NamedDecl;
tools/clang/include/clang/AST/ExternalASTSource.h
   48 class NamedDecl;
tools/clang/include/clang/AST/Mangle.h
   34   class NamedDecl;
tools/clang/include/clang/AST/TemplateName.h
   30 class NamedDecl;
tools/clang/include/clang/AST/Type.h
  110 class NamedDecl;
tools/clang/include/clang/AST/UnresolvedSet.h
   27 class NamedDecl;
tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h
   28 class NamedDecl;
tools/clang/include/clang/CrossTU/CrossTranslationUnit.h
   33 class NamedDecl;
tools/clang/include/clang/Sema/CodeCompleteConsumer.h
   45 class NamedDecl;
tools/clang/include/clang/Sema/IdentifierResolver.h
   31 class NamedDecl;
tools/clang/include/clang/Sema/ScopeInfo.h
   48 class NamedDecl;
tools/clang/include/clang/Sema/Sema.h
  141   class NamedDecl;
tools/clang/include/clang/Sema/Template.h
   38 class NamedDecl;
tools/clang/include/clang/Serialization/ASTReader.h
  101 class NamedDecl;
tools/clang/include/clang/Serialization/ASTWriter.h
   81 class NamedDecl;
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
   59 class NamedDecl;
tools/clang/include/clang/Tooling/Core/Lookup.h
   23 class NamedDecl;
tools/clang/include/clang/Tooling/Refactoring/Rename/USRFinder.h
   28 class NamedDecl;
tools/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
   27 class NamedDecl;
tools/clang/lib/CodeGen/CodeGenModule.h
   68 class NamedDecl;
tools/clang/lib/Index/IndexingContext.h
   26   class NamedDecl;
tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
   34 class NamedDecl;
tools/clang/tools/extra/clangd/CodeComplete.h
   35 class NamedDecl;
tools/clang/tools/libclang/CXCursor.h
   34 class NamedDecl;
tools/lldb/include/lldb/Core/ClangForward.h
   76 class NamedDecl;

References

gen/tools/clang/include/clang/AST/Attrs.inc
 4272 NamedDecl * parent;
 4275   static DiagnoseIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, const AttributeCommonInfo &CommonInfo = {SourceRange{}}) {
 4283   static DiagnoseIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, const AttributeCommonInfo &CommonInfo = {SourceRange{}}) {
 4290   static DiagnoseIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, SourceRange Range, AttributeCommonInfo::Syntax Syntax) {
 4294   static DiagnoseIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, SourceRange Range, AttributeCommonInfo::Syntax Syntax) {
 4326               , NamedDecl * Parent
 4403   NamedDecl * getParent() const {
gen/tools/clang/include/clang/Sema/AttrParsedAttrImpl.inc
  478   if (!D || (!isa<NamedDecl>(D))) {
 1088   if (!D || (!isa<NamedDecl>(D))) {
gen/tools/clang/include/clang/Serialization/AttrPCHRead.inc
  733     NamedDecl * parent = Record.GetLocalDeclAs<NamedDecl >(Record.readInt());
  733     NamedDecl * parent = Record.GetLocalDeclAs<NamedDecl >(Record.readInt());
include/llvm/ADT/ArrayRef.h
  108         const ArrayRef<U *> &A,
  110            std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  118       const SmallVectorTemplateCommon<U *, DummyT> &Vec,
  120           std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
include/llvm/ADT/DenseMapInfo.h
   39   static inline T* getEmptyKey() {
   41     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   45   static inline T* getTombstoneKey() {
   47     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   51   static unsigned getHashValue(const T *PtrVal) {
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/STLExtras.h
   75       typename std::add_pointer<typename std::add_const<T>::type>::type;
include/llvm/Support/Casting.h
   34   using SimpleType = From; // The real type this represents...
   37   static SimpleType &getSimplifiedValue(From &Val) { return Val; }
   41   using NonConstSimpleType = typename simplify_type<From>::SimpleType;
   47   static RetType getSimplifiedValue(const From& Val) {
   57   static inline bool doit(const From &Val) {
   58     return To::classof(&Val);
   66   static inline bool doit(const From &) { return true; }
   76   static inline bool doit(const From &Val) {
   77     return isa_impl<To, From>::doit(Val);
   77     return isa_impl<To, From>::doit(Val);
  104   static inline bool doit(const From *Val) {
  106     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  141 template <class X, class Y> LLVM_NODISCARD inline bool isa(const Y &Val) {
  142   return isa_impl_wrap<X, const Y,
  142   return isa_impl_wrap<X, const Y,
  143                        typename simplify_type<const Y>::SimpleType>::doit(Val);
  168   using ret_type = const To &; // Normal case, return Ty&
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  236       std::is_same<X, typename simplify_type<X>::SimpleType>::value;
  236       std::is_same<X, typename simplify_type<X>::SimpleType>::value;
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  258   return cast_convert_val<X, Y,
  258   return cast_convert_val<X, Y,
  259                           typename simplify_type<Y>::SimpleType>::doit(Val);
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  265   return cast_convert_val<X, Y*,
  266                           typename simplify_type<Y*>::SimpleType>::doit(Val);
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  306 cast_or_null(Y *Val) {
  309   return cast<X>(Val);
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  360                             typename cast_retty<X, Y>::ret_type>::type
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  367 dyn_cast_or_null(Y *Val) {
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/PointerLikeTypeTraits.h
   56   static inline void *getAsVoidPointer(T *P) { return P; }
   57   static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
   59   enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
   91   typedef PointerLikeTypeTraits<T *> NonConst;
   93   static inline const void *getAsVoidPointer(const T *P) {
   96   static inline const T *getFromVoidPointer(const void *P) {
include/llvm/Support/type_traits.h
   55 struct add_const_past_pointer { using type = const T; };
tools/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp
   37       if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
   37       if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
tools/clang/include/clang/AST/ASTContext.h
  413   llvm::DenseMap<NamedDecl*, llvm::TinyPtrVector<Module*>> MergedDefModules;
  496   llvm::DenseMap<NamedDecl *, NamedDecl *> InstantiatedFromUsingDecl;
  496   llvm::DenseMap<NamedDecl *, NamedDecl *> InstantiatedFromUsingDecl;
  522   llvm::MapVector<const NamedDecl *, unsigned> MangleNumbers;
  664   template <typename NodeT> DynTypedNodeList getParents(const NodeT &Node) {
  911   NamedDecl *getInstantiatedFromUsingDecl(NamedDecl *Inst);
  911   NamedDecl *getInstantiatedFromUsingDecl(NamedDecl *Inst);
  915   void setInstantiatedFromUsingDecl(NamedDecl *Inst, NamedDecl *Pattern);
  915   void setInstantiatedFromUsingDecl(NamedDecl *Inst, NamedDecl *Pattern);
  953                         const NamedDecl *Method,
  954                         SmallVectorImpl<const NamedDecl *> &Overridden) const;
  980   void mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
  985   void deduplicateMergedDefinitonsFor(NamedDecl *ND);
  989   ArrayRef<Module*> getModulesWithMergedDefinition(const NamedDecl *Def) {
  991         MergedDefModules.find(cast<NamedDecl>(Def->getCanonicalDecl()));
 1481   TemplateArgument getInjectedTemplateArg(NamedDecl *ParamDecl);
 2728   const ObjCInterfaceDecl *getObjContainingInterface(const NamedDecl *ND) const;
 2807   void setManglingNumber(const NamedDecl *ND, unsigned Number);
 2808   unsigned getManglingNumber(const NamedDecl *ND) const;
tools/clang/include/clang/AST/ASTImporter.h
  283     using FoundDeclsTy = SmallVector<NamedDecl *, 2>;
  530                        NamedDecl **Decls, unsigned NumDecls);
tools/clang/include/clang/AST/ASTImporterLookupTable.h
   53   using DeclList = llvm::SmallSetVector<NamedDecl *, 2>;
   57   void add(DeclContext *DC, NamedDecl *ND);
   58   void remove(DeclContext *DC, NamedDecl *ND);
   64   void add(NamedDecl *ND);
   65   void remove(NamedDecl *ND);
tools/clang/include/clang/AST/ASTImporterSharedState.h
   57       if (auto *ND = dyn_cast<NamedDecl>(D))
   57       if (auto *ND = dyn_cast<NamedDecl>(D))
   63       if (auto *ND = dyn_cast<NamedDecl>(D))
   63       if (auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/include/clang/AST/ASTMutationListener.h
  140   virtual void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) {}
tools/clang/include/clang/AST/ASTTypeTraits.h
   65     return ASTNodeKind(KindToKindId<T>::Id);
   65     return ASTNodeKind(KindToKindId<T>::Id);
   65     return ASTNodeKind(KindToKindId<T>::Id);
  234   static DynTypedNode create(const T &Node) {
  235     return BaseConverter<T>::create(Node);
  251   const T *get() const {
  252     return BaseConverter<T>::get(NodeKind, Storage.buffer);
  259   const T &getUnchecked() const {
  260     return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer);
  394     static const T *get(ASTNodeKind NodeKind, const char Storage[]) {
  395       if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind))
  399     static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) {
  401       return *cast<T>(static_cast<const BaseT *>(
  469     : public DynCastPtrConverter<T, Decl> {};
tools/clang/include/clang/AST/ASTUnresolvedSet.h
   55   void addDecl(ASTContext &C, NamedDecl *D, AccessSpecifier AS) {
   62   bool replace(const NamedDecl *Old, NamedDecl *New, AccessSpecifier AS) {
   62   bool replace(const NamedDecl *Old, NamedDecl *New, AccessSpecifier AS) {
tools/clang/include/clang/AST/CXXInheritance.h
  155   std::unique_ptr<NamedDecl *[]> DeclsFound;
  182   using decl_iterator = NamedDecl **;
tools/clang/include/clang/AST/Decl.h
  258   NamedDecl *getUnderlyingDeclImpl() LLVM_READONLY;
  345   bool declarationReplaces(NamedDecl *OldD, bool IsKnownNewer = true) const;
  440   NamedDecl *getUnderlyingDecl() {
  450   const NamedDecl *getUnderlyingDecl() const {
  454   NamedDecl *getMostRecentDecl() {
  455     return cast<NamedDecl>(static_cast<Decl *>(this)->getMostRecentDecl());
  457   const NamedDecl *getMostRecentDecl() const {
  467 inline raw_ostream &operator<<(raw_ostream &OS, const NamedDecl &ND) {
  477 class LabelDecl : public NamedDecl {
  523 class NamespaceDecl : public NamedDecl, public DeclContext,
  645 class ValueDecl : public NamedDecl {
 2903   NamedDecl **Chaining;
 2908                     MutableArrayRef<NamedDecl *> CH);
 2917                                    QualType T, llvm::MutableArrayRef<NamedDecl *> CH);
 2921   using chain_iterator = ArrayRef<NamedDecl *>::const_iterator;
 2923   ArrayRef<NamedDecl *> chain() const {
 2950 class TypeDecl : public NamedDecl {
 4381                                            const NamedDecl* ND) {
 4387                                            const NamedDecl* ND) {
tools/clang/include/clang/AST/DeclAccessPair.h
   35   static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS) {
   41   NamedDecl *getDecl() const {
   48   void setDecl(NamedDecl *D) {
   54   void set(NamedDecl *D, AccessSpecifier AS) {
   58   operator NamedDecl*() const { return getDecl(); }
   59   NamedDecl *operator->() const { return getDecl(); }
tools/clang/include/clang/AST/DeclBase.h
 1196   using ResultTy = ArrayRef<NamedDecl *>;
 1202   NamedDecl *Single = nullptr;
 1204   static NamedDecl *const SingleElementDummyList;
 1208   DeclContextLookupResult(ArrayRef<NamedDecl *> Result)
 1210   DeclContextLookupResult(NamedDecl *Single)
 1218                                   NamedDecl *const>;
 2257                            SmallVectorImpl<NamedDecl *> &Results);
 2273   void makeDeclVisibleInContext(NamedDecl *D);
 2442   void makeDeclVisibleInContextInternal(NamedDecl *D);
 2448   void makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal,
 2450   void makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal);
 2462   static const ToTy *doit(const DeclContext *Val) {
 2466   static ToTy *doit(DeclContext *Val) {
 2491     return To::classofKind(Val.getDeclKind());
 2514   static const ToTy *doit(const ::clang::DeclContext *Val) {
 2515     return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
 2521   static ToTy *doit(::clang::DeclContext *Val) {
 2522     return ::clang::cast_convert_decl_context<ToTy>::doit(Val);
 2529   static ::clang::DeclContext &doit(const FromTy &Val) {
 2530     return *FromTy::castToDeclContext(&Val);
 2536   static ::clang::DeclContext *doit(const FromTy *Val) {
 2537     return FromTy::castToDeclContext(Val);
tools/clang/include/clang/AST/DeclCXX.h
  996   ArrayRef<NamedDecl *> getLambdaExplicitTemplateParameters() const;
 1047   void removeConversion(const NamedDecl *Old);
 1655   std::vector<const NamedDecl *>
 1657                       llvm::function_ref<bool(const NamedDecl *ND)> Filter);
 2845 class UsingDirectiveDecl : public NamedDecl {
 2856   NamedDecl *NominatedNamespace;
 2866                      NamedDecl *Nominated,
 2898   NamedDecl *getNominatedNamespaceAsWritten() { return NominatedNamespace; }
 2899   const NamedDecl *getNominatedNamespaceAsWritten() const {
 2930                                     NamedDecl *Nominated,
 2949 class NamespaceAliasDecl : public NamedDecl,
 2966   NamedDecl *Namespace;
 2971                      SourceLocation IdentLoc, NamedDecl *Namespace)
 2991                                     NamedDecl *Namespace);
 3045   NamedDecl *getAliasedNamespace() const { return Namespace; }
 3068 class UsingShadowDecl : public NamedDecl, public Redeclarable<UsingShadowDecl> {
 3072   NamedDecl *Underlying = nullptr;
 3076   NamedDecl *UsingOrNextShadow = nullptr;
 3096                   UsingDecl *Using, NamedDecl *Target);
 3105                                  NamedDecl *Target) {
 3130   NamedDecl *getTargetDecl() const { return Underlying; }
 3134   void setTargetDecl(NamedDecl *ND) {
 3187                              UsingDecl *Using, NamedDecl *Target,
 3217                                             UsingDecl *Using, NamedDecl *Target,
 3275 class UsingDecl : public NamedDecl, public Mergeable<UsingDecl> {
 3426     : public NamedDecl, public Mergeable<UsingPackDecl>,
 3427       private llvm::TrailingObjects<UsingPackDecl, NamedDecl *> {
 3430   NamedDecl *InstantiatedFrom;
 3435   UsingPackDecl(DeclContext *DC, NamedDecl *InstantiatedFrom,
 3436                 ArrayRef<NamedDecl *> UsingDecls)
 3444                             getTrailingObjects<NamedDecl *>());
 3457   NamedDecl *getInstantiatedFromUsingDecl() const { return InstantiatedFrom; }
 3461   ArrayRef<NamedDecl *> expansions() const {
 3462     return llvm::makeArrayRef(getTrailingObjects<NamedDecl *>(), NumExpansions);
 3466                                NamedDecl *InstantiatedFrom,
 3467                                ArrayRef<NamedDecl *> UsingDecls);
tools/clang/include/clang/AST/DeclContextInternals.h
   36   using DeclsTy = SmallVector<NamedDecl *, 4>;
   45   llvm::PointerUnion<NamedDecl *, DeclsAndHasExternalTy> Data;
   70   NamedDecl *getAsDecl() const {
   71     return Data.dyn_cast<NamedDecl *>();
   91       if (NamedDecl *OldD = getAsDecl())
   97   void setOnlyValue(NamedDecl *ND) {
  106   void remove(NamedDecl *D) {
  108     if (NamedDecl *Singleton = getAsDecl()) {
  128     } else if (NamedDecl *Singleton = getAsDecl()) {
  148     if (NamedDecl *ND = getAsDecl()) {
  164   bool HandleRedeclaration(NamedDecl *D, bool IsKnownNewer) {
  166     if (NamedDecl *OldD = getAsDecl()) {
  177       NamedDecl *OldD = *OD;
  189   void AddSubsequentDecl(NamedDecl *D) {
  194     if (NamedDecl *OldD = getAsDecl()) {
  230       NamedDecl *TagD = Vec.back();
tools/clang/include/clang/AST/DeclFriend.h
   59   using FriendUnion = llvm::PointerUnion<NamedDecl *, TypeSourceInfo *>;
  138   NamedDecl *getFriendDecl() const {
  139     return Friend.dyn_cast<NamedDecl *>();
  149     if (NamedDecl *ND = getFriendDecl()) {
tools/clang/include/clang/AST/DeclObjC.h
  138 class ObjCMethodDecl : public NamedDecl, public DeclContext {
  728 class ObjCPropertyDecl : public NamedDecl {
  968 class ObjCContainerDecl : public NamedDecl, public DeclContext {
 2728 class ObjCCompatibleAliasDecl : public NamedDecl {
tools/clang/include/clang/AST/DeclTemplate.h
   63 NamedDecl *getAsNamedDecl(TemplateParameter P);
   68     : private llvm::TrailingObjects<TemplateParameterList, NamedDecl *,
   89                         ArrayRef<NamedDecl *> Params, SourceLocation RAngleLoc,
   92   size_t numTrailingObjects(OverloadToken<NamedDecl *>) const {
  108                                        ArrayRef<NamedDecl *> Params,
  113   using iterator = NamedDecl **;
  116   using const_iterator = NamedDecl * const *;
  118   iterator begin() { return getTrailingObjects<NamedDecl *>(); }
  119   const_iterator begin() const { return getTrailingObjects<NamedDecl *>(); }
  125   ArrayRef<NamedDecl*> asArray() {
  128   ArrayRef<const NamedDecl*> asArray() const {
  132   NamedDecl* getParam(unsigned Idx) {
  136   const NamedDecl* getParam(unsigned Idx) const {
  206       NamedDecl *, Expr *>::with_counts<
  213                                         ArrayRef<NamedDecl *> Params,
  387 class TemplateDecl : public NamedDecl {
  393                TemplateParameterList *Params, NamedDecl *Decl);
  419   NamedDecl *getTemplatedDecl() const { return TemplatedDecl; }
  434   NamedDecl *TemplatedDecl;
  444   void init(NamedDecl *templatedDecl, TemplateParameterList* templateParams) {
  610   llvm::PointerIntPair<NamedDecl *, 2> MemberAndTSK;
  617   MemberSpecializationInfo(NamedDecl *IF, TemplateSpecializationKind TSK,
  626   NamedDecl *getInstantiatedFrom() const { return MemberAndTSK.getPointer(); }
  837                            TemplateParameterList *Params, NamedDecl *Decl)
  986                        NamedDecl *Decl)
 1097                                       NamedDecl *Decl);
 2100                     NamedDecl *Decl)
 2132                                    NamedDecl *Decl);
 2269   using FriendUnion = llvm::PointerUnion<NamedDecl *,TypeSourceInfo *>;
 2312   NamedDecl *getFriendDecl() const {
 2313     return Friend.dyn_cast<NamedDecl*>();
 2347                         NamedDecl *Decl)
 2398                                        NamedDecl *Decl);
 2919                   NamedDecl *Decl)
 3079 inline NamedDecl *getAsNamedDecl(TemplateParameter P) {
tools/clang/include/clang/AST/DependentDiagnostic.h
   46                                      NamedDecl *TargetDecl,
   79   NamedDecl *getAccessTarget() const {
   84   NamedDecl *getAccessNamingClass() const {
  118     NamedDecl *TargetDecl;
tools/clang/include/clang/AST/Expr.h
 1149                                     NamedDecl *, ASTTemplateKWAndArgsInfo,
 1166   size_t numTrailingObjects(OverloadToken<NamedDecl *>) const {
 1181               const DeclarationNameInfo &NameInfo, NamedDecl *FoundD,
 1203          QualType T, ExprValueKind VK, NamedDecl *FoundD = nullptr,
 1212          NamedDecl *FoundD = nullptr,
 1259   NamedDecl *getFoundDecl() {
 1260     return hasFoundDecl() ? *getTrailingObjects<NamedDecl *>() : D;
 1265   const NamedDecl *getFoundDecl() const {
 1266     return hasFoundDecl() ? *getTrailingObjects<NamedDecl *>() : D;
 3191   NamedDecl *getConversionFunction() const;
tools/clang/include/clang/AST/ExprCXX.h
 2011   ArrayRef<NamedDecl *> getExplicitTemplateParameters() const;
 3515                                     TemplateArgumentLoc, NamedDecl *> {
 3570   unsigned numTrailingObjects(OverloadToken<NamedDecl *>) const {
 3579                               NamedDecl *FirstQualifierFoundInScope,
 3590          SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope,
 3645   NamedDecl *getFirstQualifierFoundInScope() const {
 3648     return *getTrailingObjects<NamedDecl *>();
 4120   NamedDecl *Pack = nullptr;
 4124   SizeOfPackExpr(QualType SizeType, SourceLocation OperatorLoc, NamedDecl *Pack,
 4145                                 NamedDecl *Pack, SourceLocation PackLoc,
 4162   NamedDecl *getPack() const { return Pack; }
 4869   NamedDecl *FoundDecl;
 4887                             SourceLocation ConceptNameLoc, NamedDecl *FoundDecl,
 4900          NamedDecl *FoundDecl, ConceptDecl *NamedConcept,
 4911   NamedDecl *getFoundDecl() const {
tools/clang/include/clang/AST/ExprObjC.h
  620   llvm::PointerIntPair<NamedDecl *, 1, bool> PropertyOrGetter;
tools/clang/include/clang/AST/ExternalASTSource.h
  332                                  ArrayRef<NamedDecl*> Decls);
tools/clang/include/clang/AST/JSONNodeDumper.h
  223   void VisitNamedDecl(const NamedDecl *ND);
tools/clang/include/clang/AST/Mangle.h
   59   llvm::DenseMap<const NamedDecl*, uint64_t> AnonStructIds;
   85   uint64_t getAnonymousStructId(const NamedDecl *D) {
   86     std::pair<llvm::DenseMap<const NamedDecl *, uint64_t>::iterator, bool>
   94   bool shouldMangleDeclName(const NamedDecl *D);
   95   virtual bool shouldMangleCXXName(const NamedDecl *D) = 0;
   99   void mangleName(const NamedDecl *D, raw_ostream &);
  100   virtual void mangleCXXName(const NamedDecl *D, raw_ostream &) = 0;
  119                          const NamedDecl *ID,
  138   virtual void mangleSEHFilterExpression(const NamedDecl *EnclosingDecl,
  141   virtual void mangleSEHFinallyBlock(const NamedDecl *EnclosingDecl,
tools/clang/include/clang/AST/RecursiveASTVisitor.h
 1636     for (NamedDecl *D : *TPL) {
tools/clang/include/clang/AST/TemplateName.h
  110   NamedDecl **getStorage() {
  113   NamedDecl * const *getStorage() const {
  118   using iterator = NamedDecl *const *;
tools/clang/include/clang/AST/TextNodeDumper.h
  185   void dumpName(const NamedDecl *ND);
tools/clang/include/clang/AST/Type.h
 1897   bool isIncompleteType(NamedDecl **Def = nullptr) const;
tools/clang/include/clang/AST/UnresolvedSet.h
   33                                   std::random_access_iterator_tag, NamedDecl *,
   34                                   std::ptrdiff_t, NamedDecl *, NamedDecl *> {
   34                                   std::ptrdiff_t, NamedDecl *, NamedDecl *> {
   49   NamedDecl *getDecl() const { return I->getDecl(); }
   50   void setDecl(NamedDecl *ND) const { return I->setDecl(ND); }
   55   NamedDecl *operator*() const { return getDecl(); }
   56   NamedDecl *operator->() const { return **this; }
   88   void addDecl(NamedDecl *D) {
   92   void addDecl(NamedDecl *D, AccessSpecifier AS) {
   99   bool replace(const NamedDecl* Old, NamedDecl *New) {
   99   bool replace(const NamedDecl* Old, NamedDecl *New) {
  108   void replace(iterator I, NamedDecl *New) { I.I->setDecl(New); }
  110   void replace(iterator I, NamedDecl *New, AccessSpecifier AS) {
tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h
  266 const NodeT *
  269     if (const NodeT *Node = N.getNodeAs<NodeT>(BoundTo))
  269     if (const NodeT *Node = N.getNodeAs<NodeT>(BoundTo))
tools/clang/include/clang/ASTMatchers/ASTMatchers.h
  110   const T *getNodeAs(StringRef ID) const {
  111     return MyBoundNodes.getNodeAs<T>(ID);
  334 extern const internal::VariadicDynCastAllOfMatcher<Decl, NamedDecl> namedDecl;
 2536 inline internal::Matcher<NamedDecl> hasName(const std::string &Name) {
 2550 extern const internal::VariadicFunction<internal::Matcher<NamedDecl>, StringRef,
 2990   const NamedDecl *UnderlyingDecl = Node.getUnderlyingDecl();
 3507   const NamedDecl *FoundDecl = Node.getFoundDecl();
tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
  160   const T *getNodeAs(StringRef ID) const {
  165     return It->second.get<T>();
  302   virtual bool matches(const T &Node,
  309     return matches(DynNode.getUnchecked<T>(), Finder, Builder);
  316 class SingleNodeMatcherInterface : public MatcherInterface<T> {
  321   virtual bool matchesNode(const T &Node) const = 0;
  325   bool matches(const T &Node,
  345   DynTypedMatcher(MatcherInterface<T> *Implementation)
  346       : SupportedKind(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()),
  436     return canConvertTo(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  445   template <typename T> Matcher<T> convertTo() const {
  447     return unconditionalConvertTo<T>();
  454   template <typename T> Matcher<T> unconditionalConvertTo() const;
  479 class WrapperMatcherInterface : public MatcherInterface<T> {
  499   explicit Matcher(MatcherInterface<T> *Implementation)
  506   Matcher(const Matcher<From> &Other,
  507           typename std::enable_if<std::is_base_of<From, T>::value &&
  507           typename std::enable_if<std::is_base_of<From, T>::value &&
  508                                !std::is_same<From, T>::value>::type * = nullptr)
  508                                !std::is_same<From, T>::value>::type * = nullptr)
  520             std::is_same<T, QualType>::value &&
  529     static_assert(std::is_base_of<To, T>::value, "Invalid dynCast call.");
  534   bool matches(const T &Node,
  581     return Other.dynCastTo(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  596 inline Matcher<T> makeMatcher(MatcherInterface<T> *Implementation) {
  596 inline Matcher<T> makeMatcher(MatcherInterface<T> *Implementation) {
  705 class HasNameMatcher : public SingleNodeMatcherInterface<NamedDecl> {
  709   bool matchesNode(const NamedDecl &Node) const override;
  716   bool matchesNodeUnqualified(const NamedDecl &Node) const;
  724   bool matchesNodeFullFast(const NamedDecl &Node) const;
  731   bool matchesNodeFullSlow(const NamedDecl &Node) const;
  739 Matcher<NamedDecl> hasAnyNameFunc(ArrayRef<const StringRef *> NameRefs);
  980                                   const Matcher<NamedDecl> &Base,
  989                                       const Matcher<NamedDecl> &Base,
  994   bool matchesChildOf(const T &Node, const DynTypedMatcher &Matcher,
  997     static_assert(std::is_base_of<Decl, T>::value ||
  998                   std::is_base_of<Stmt, T>::value ||
  999                   std::is_base_of<NestedNameSpecifier, T>::value ||
 1000                   std::is_base_of<NestedNameSpecifierLoc, T>::value ||
 1001                   std::is_base_of<TypeLoc, T>::value ||
 1002                   std::is_base_of<QualType, T>::value,
 1009   bool matchesDescendantOf(const T &Node,
 1013     static_assert(std::is_base_of<Decl, T>::value ||
 1014                   std::is_base_of<Stmt, T>::value ||
 1015                   std::is_base_of<NestedNameSpecifier, T>::value ||
 1016                   std::is_base_of<NestedNameSpecifierLoc, T>::value ||
 1017                   std::is_base_of<TypeLoc, T>::value ||
 1018                   std::is_base_of<QualType, T>::value,
 1026   bool matchesAncestorOf(const T &Node,
 1030     static_assert(std::is_base_of<Decl, T>::value ||
 1031                       std::is_base_of<NestedNameSpecifierLoc, T>::value ||
 1032                       std::is_base_of<Stmt, T>::value ||
 1033                       std::is_base_of<TypeLoc, T>::value,
 1084       std::is_base_of<typename AnyTypeList::head, T>::value ||
 1085       TypeListContainsSuperOf<typename AnyTypeList::tail, T>::value;
 1146     template <typename To> operator Matcher<To>() const {
 1184   operator Matcher<T>() const {
 1185     static_assert(TypeListContainsSuperOf<ReturnTypes, T>::value,
 1202   operator Matcher<T>() const {
 1203     static_assert(TypeListContainsSuperOf<ReturnTypes, T>::value,
 1243   operator Matcher<T>() const {
 1245                ast_type_traits::ASTNodeKind::getFromNodeKind<T>())
 1246         .template unconditionalConvertTo<T>();
 1255 class BindableMatcher : public Matcher<T> {
 1257   explicit BindableMatcher(const Matcher<T> &M) : Matcher<T>(M) {}
 1258   explicit BindableMatcher(MatcherInterface<T> *Implementation)
 1265   Matcher<T> bind(StringRef ID) const {
 1285 class HasMatcher : public WrapperMatcherInterface<T> {
 1290   bool matches(const T &Node, ASTMatchFinder *Finder,
 1335   template <typename T> operator Matcher<T>() const {
 1337                Op, ast_type_traits::ASTNodeKind::getFromNodeKind<T>(),
 1338                getMatchers<T>(std::index_sequence_for<Ps...>()))
 1339         .template unconditionalConvertTo<T>();
 1370 inline Matcher<T> DynTypedMatcher::unconditionalConvertTo() const {
 1376 BindableMatcher<T> makeAllOfComposite(
 1377     ArrayRef<const Matcher<T> *> InnerMatchers) {
 1388   using PI = llvm::pointee_iterator<const Matcher<T> *const *>;
 1395           ast_type_traits::ASTNodeKind::getFromNodeKind<T>(),
 1397           .template unconditionalConvertTo<T>());
 1408     ArrayRef<const Matcher<InnerT> *> InnerMatchers) {
 1418 class HasDescendantMatcher : public WrapperMatcherInterface<T> {
 1426   bool matches(const T &Node, ASTMatchFinder *Finder,
 1438 class HasParentMatcher : public WrapperMatcherInterface<T> {
 1446   bool matches(const T &Node, ASTMatchFinder *Finder,
 1458 class HasAncestorMatcher : public WrapperMatcherInterface<T> {
 1466   bool matches(const T &Node, ASTMatchFinder *Finder,
 1557     : public VariadicFunction<BindableMatcher<SourceT>, Matcher<TargetT>,
 1558                               makeDynCastAllOfComposite<SourceT, TargetT>> {
tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
  199   ast_matchers::internal::Matcher<T> getTypedMatcher() const {
  202         ->template convertTo<T>();
  227       : MatcherOps(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()) {}
  228   typedef ast_matchers::internal::Matcher<T> MatcherT;
  232     return DynTypedMatcher(Matcher.convertTo<T>());
tools/clang/include/clang/Analysis/Analyses/ThreadSafety.h
  175   virtual void handleNoMutexHeld(StringRef Kind, const NamedDecl *D,
  188   virtual void handleMutexNotHeld(StringRef Kind, const NamedDecl *D,
tools/clang/include/clang/Analysis/Analyses/ThreadSafetyCommon.h
  102   void enterCFG(CFG *Cfg, const NamedDecl *D, const CFGBlock *First) {}
  158     if (!dyn_cast_or_null<NamedDecl>(AC.getDecl()))
  255   const NamedDecl *getDecl() const {
  256     return dyn_cast<NamedDecl>(ACtx->getDecl());
  345     const NamedDecl *AttrDecl;
  359     CallingContext(CallingContext *P, const NamedDecl *D = nullptr)
  371   CapabilityExpr translateAttrExpr(const Expr *AttrExp, const NamedDecl *D,
  450   void enterCFG(CFG *Cfg, const NamedDecl *D, const CFGBlock *First);
tools/clang/include/clang/Analysis/AnyCall.h
  182     if (const auto *ND = dyn_cast_or_null<NamedDecl>(D))
  182     if (const auto *ND = dyn_cast_or_null<NamedDecl>(D))
tools/clang/include/clang/Analysis/RetainSummaryManager.h
  620                                   const NamedDecl *FD,
tools/clang/include/clang/CrossTU/CrossTranslationUnit.h
  163   static llvm::Optional<std::string> getLookupName(const NamedDecl *ND);
tools/clang/include/clang/Parse/Parser.h
  769   static NamedDecl *getNonTypeAnnotation(const Token &Tok) {
  773   static void setNonTypeAnnotation(Token &Tok, NamedDecl *ND) {
 1429   NamedDecl *ParseCXXInlineMethodDef(AccessSpecifier AS,
 2732   void DiagnoseUnexpectedNamespace(NamedDecl *Context);
 3013                                SmallVectorImpl<NamedDecl *> &TemplateParams,
 3017                                   SmallVectorImpl<NamedDecl*> &TemplateParams);
 3019   NamedDecl *ParseTemplateParameter(unsigned Depth, unsigned Position);
 3020   NamedDecl *ParseTypeParameter(unsigned Depth, unsigned Position);
 3021   NamedDecl *ParseTemplateTemplateParameter(unsigned Depth, unsigned Position);
 3022   NamedDecl *ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position);
tools/clang/include/clang/Sema/CodeCompleteConsumer.h
  166 QualType getDeclUsageType(ASTContext &C, const NamedDecl *ND);
  765   const NamedDecl *Declaration = nullptr;
  864   CodeCompletionResult(const NamedDecl *Declaration, unsigned Priority,
  900       const NamedDecl *D = nullptr)
  909   CodeCompletionResult(CodeCompletionString *Pattern, const NamedDecl *D,
  920   const NamedDecl *getDeclaration() const {
 1158                                        const NamedDecl *Decl);
 1163                                               const NamedDecl *Decl);
tools/clang/include/clang/Sema/DeclSpec.h
 1348       NamedDecl **DeclsInPrototype;
 1480     ArrayRef<NamedDecl *> getDeclsInPrototype() const {
 1617                                      ArrayRef<NamedDecl *> DeclsInPrototype,
tools/clang/include/clang/Sema/DelayedDiagnostic.h
   85   NamedDecl *getTargetDecl() const { return Target; }
  121   NamedDecl *Target;
  142                                             const NamedDecl *ReferringDecl,
  143                                             const NamedDecl *OffendingDecl,
  182   const NamedDecl *getAvailabilityReferringDecl() const {
  187   const NamedDecl *getAvailabilityOffendingDecl() const {
  240     const NamedDecl *ReferringDecl;
  241     const NamedDecl *OffendingDecl;
tools/clang/include/clang/Sema/ExternalSemaSource.h
   84   ReadUndefinedButUsed(llvm::MapVector<NamedDecl *, SourceLocation> &Undefined);
tools/clang/include/clang/Sema/IdentifierResolver.h
   45     using DeclsTy = SmallVector<NamedDecl *, 2>;
   50     void AddDecl(NamedDecl *D) { Decls.push_back(D); }
   54     void RemoveDecl(NamedDecl *D);
   57     void InsertDecl(DeclsTy::iterator Pos, NamedDecl *D) {
   73     using value_type = NamedDecl *;
   74     using reference = NamedDecl *;
   75     using pointer = NamedDecl *;
   87     iterator(NamedDecl *D) {
  110     NamedDecl *operator*() const {
  159   void AddDecl(NamedDecl *D);
  163   void RemoveDecl(NamedDecl *D);
  167   void InsertDeclAfter(iterator Pos, NamedDecl *D);
  177   bool tryAddTopLevelDecl(NamedDecl *D, DeclarationName Name);
tools/clang/include/clang/Sema/Lookup.h
  281   bool isHiddenDeclarationVisible(NamedDecl *ND) const {
  349   static bool isVisible(Sema &SemaRef, NamedDecl *D) {
  361   NamedDecl *getAcceptableDecl(NamedDecl *D) const {
  361   NamedDecl *getAcceptableDecl(NamedDecl *D) const {
  372   static bool isVisibleSlow(Sema &SemaRef, NamedDecl *D);
  373   NamedDecl *getAcceptableDeclSlow(NamedDecl *D) const;
  373   NamedDecl *getAcceptableDeclSlow(NamedDecl *D) const;
  426   void addDecl(NamedDecl *D) {
  432   void addDecl(NamedDecl *D, AccessSpecifier AS) {
  507   DeclClass *getAsSingle() const {
  509     return dyn_cast<DeclClass>(getFoundDecl());
  517   NamedDecl *getFoundDecl() const {
  524   NamedDecl *getRepresentativeDecl() const {
  643     NamedDecl *next() {
  661     void replace(NamedDecl *D) {
  667     void replace(NamedDecl *D, AccessSpecifier AS) {
  787   virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
  787   virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
  801   llvm::MapVector<NamedDecl*, NamedDecl*> Decls;
  801   llvm::MapVector<NamedDecl*, NamedDecl*> Decls;
  804     NamedDecl *operator()(std::pair<NamedDecl*, NamedDecl*> P) const {
  804     NamedDecl *operator()(std::pair<NamedDecl*, NamedDecl*> P) const {
  804     NamedDecl *operator()(std::pair<NamedDecl*, NamedDecl*> P) const {
  811   void insert(NamedDecl *D);
  814   void erase(NamedDecl *D) {
  815     Decls.erase(cast<NamedDecl>(D->getCanonicalDecl()));
tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h
  223       llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) override;
tools/clang/include/clang/Sema/Overload.h
  417         SmallVector<std::pair<NamedDecl *, FunctionDecl *>, 4>;
  442     void addConversion(NamedDecl *Found, FunctionDecl *D) {
 1115   inline ConstructorInfo getConstructorInfo(NamedDecl *ND) {
 1121     auto *D = ND->getUnderlyingDecl();
tools/clang/include/clang/Sema/ScopeInfo.h
  251     using BaseInfoTy = llvm::PointerIntPair<const NamedDecl *, 1, bool>;
  258     const NamedDecl *Property = nullptr;
  272     const NamedDecl *getBase() const { return Base.getPointer(); }
  273     const NamedDecl *getProperty() const { return Property; }
  824   SmallVector<NamedDecl*, 4> LocalPacks;
  843   SmallVector<NamedDecl*, 4> TemplateParams;
tools/clang/include/clang/Sema/Sema.h
  229 typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType*, NamedDecl*>,
  343   bool isVisibleSlow(const NamedDecl *D);
  348   bool shouldLinkPossiblyHiddenDecl(const NamedDecl *Old,
  349                                     const NamedDecl *New) {
  361   bool shouldLinkPossiblyHiddenDecl(LookupResult &Old, const NamedDecl *New);
  627   typedef llvm::SmallSetVector<NamedDecl *, 16> NamedDeclSetType;
  657   NamedDecl *findLocallyScopedExternCDecl(DeclarationName Name);
 1185   llvm::MapVector<NamedDecl *, SourceLocation> UndefinedButUsed;
 1194       SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> > &Undefined);
 1262   llvm::SmallPtrSet<const NamedDecl *, 4> TypoCorrectedFunctionDefinitions;
 1722   void makeMergedDefinitionVisible(NamedDecl *ND);
 1727   bool isVisible(const NamedDecl *D) {
 1733   hasVisibleDeclaration(const NamedDecl *D,
 1737   bool hasVisibleDeclarationSlow(const NamedDecl *D,
 1740   bool hasVisibleMergedDefinition(NamedDecl *Def);
 1741   bool hasMergedDefinitionInCurrentModule(NamedDecl *Def);
 1749   bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
 1749   bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
 1751   bool hasVisibleDefinition(const NamedDecl *D) {
 1752     NamedDecl *Hidden;
 1758   hasVisibleDefaultArgument(const NamedDecl *D,
 1765       const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
 1770       const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
 1775   bool isEquivalentInternalLinkageDeclaration(const NamedDecl *A,
 1776                                               const NamedDecl *B);
 1778       SourceLocation Loc, const NamedDecl *D,
 1779       ArrayRef<const NamedDecl *> Equiv);
 1842     NamedDecl *Previous;
 1843     NamedDecl *New;
 1918       NamedDecl *NonTypeDecl;
 1944     static NameClassification NonType(NamedDecl *D) {
 1994     NamedDecl *getNonTypeDecl() const {
 2059                                           NamedDecl *Found,
 2101   NamedDecl *HandleDeclarator(Scope *S, Declarator &D,
 2103   void RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S);
 2119   NamedDecl *getShadowedDeclaration(const TypedefNameDecl *D,
 2121   NamedDecl *getShadowedDeclaration(const VarDecl *D, const LookupResult &R);
 2122   void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
 2122   void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
 2135   llvm::DenseMap<const NamedDecl *, const NamedDecl *> ShadowingDecls;
 2135   llvm::DenseMap<const NamedDecl *, const NamedDecl *> ShadowingDecls;
 2143   NamedDecl* ActOnTypedefDeclarator(Scope* S, Declarator& D, DeclContext* DC,
 2146   NamedDecl* ActOnTypedefNameDecl(Scope* S, DeclContext* DC, TypedefNameDecl *D,
 2148   NamedDecl *ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC,
 2154   NamedDecl *
 2166   NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
 2337                                          QualType ReturnTy, NamedDecl *D);
 2417   void diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl,
 2419   void diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl,
 2431   void checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec);
 2437                                             NamedDecl *Spec);
 2545                             AccessSpecifier AS, NamedDecl *PrevDecl,
 2718   NamedDecl *getCurFunctionOrMethodDecl();
 2721   void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext = true);
 2730   bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S = nullptr,
 2785   mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI,
 2828   void mergeDeclAttributes(NamedDecl *New, Decl *Old,
 2832   bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S,
 2841   void notePreviousDefinition(const NamedDecl *Old, SourceLocation New);
 2874                              NamedDecl *&OldDecl,
 2944                                                  NamedDecl *FoundDecl,
 3069                                            NamedDecl *FoundDecl,
 3070                                            NamedDecl *Member);
 3178       NamedDecl *Found, FunctionDecl *Fn,
 3215   bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND,
 3536   NamedDecl *LookupSingleName(Scope *S, DeclarationName Name,
 3682   void MarkTypoCorrectedFunctionDefinition(const NamedDecl *F);
 3692   bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old);
 3692   bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old);
 3700   NamedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
 3703   NamedDecl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
 4298   void DiagnoseUnusedDecl(const NamedDecl *ND);
 4342   void DiagnoseAvailabilityOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs,
 4357   bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid);
 4358   bool DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs,
 4368   void DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc,
 4549                    NamedDecl *FoundD = nullptr,
 4556                    NamedDecl *FoundD = nullptr,
 4600       const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D,
 4601       NamedDecl *FoundD = nullptr,
 4704       NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo,
 4713                            NamedDecl *FirstQualifierInScope, LookupResult &R,
 4735                                       NamedDecl *FirstQualifierInScope,
 4792   BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc,
 5059   bool CheckUsingShadowDecl(UsingDecl *UD, NamedDecl *Target,
 5063                                         NamedDecl *Target,
 5077   NamedDecl *BuildUsingDeclaration(
 5082   NamedDecl *BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
 5082   NamedDecl *BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
 5083                                 ArrayRef<NamedDecl *> Expansions);
 5111                         NamedDecl *FoundDecl,
 5133                         NamedDecl *FoundDecl,
 5810   bool isAcceptableNestedNameSpecifier(const NamedDecl *SD,
 5812   NamedDecl *FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS);
 5851                                    NamedDecl *ScopeLookupResult,
 6050                                                 ArrayRef<NamedDecl *> TParams,
 6177   ExprResult BuildCXXMemberCallExpr(Expr *Exp, NamedDecl *FoundDecl,
 6227   NamedDecl *ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS,
 6362   void inferGslPointerAttribute(NamedDecl *ND, CXXRecordDecl *UnderlyingRecord);
 6411   NamedDecl *ActOnFriendFunctionDecl(Scope *S, Declarator &D,
 6497   void CheckOverrideControl(NamedDecl *D);
 6501   void DiagnoseAbsenceOfOverrideControl(NamedDecl *D);
 6521   bool SetMemberAccessSpecifier(NamedDecl *MemberDecl,
 6522                                 NamedDecl *PrevMemberDecl,
 6548   AccessResult CheckFriendAccess(NamedDecl *D);
 6569   bool IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *NamingClass,
 6634   NamedDecl *getAsTemplateNameDecl(NamedDecl *D,
 6634   NamedDecl *getAsTemplateNameDecl(NamedDecl *D,
 6690                                       NamedDecl *Instantiation,
 6692                                       const NamedDecl *Pattern,
 6693                                       const NamedDecl *PatternDef,
 6700   NamedDecl *ActOnTypeParameter(Scope *S, bool Typename,
 6713   NamedDecl *ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
 6718   NamedDecl *ActOnTemplateTemplateParameter(Scope *S,
 6734                              ArrayRef<NamedDecl *> Params,
 6823                          SourceLocation ConceptNameLoc, NamedDecl *FoundDecl,
 6868                                          NamedDecl *PrevDecl,
 6880   bool CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous);
 6881   void CompleteMemberSpecialization(NamedDecl *Member, LookupResult &Previous);
 6927   bool CheckTemplateArgument(NamedDecl *Param,
 6929                              NamedDecl *Template,
 7681   getTemplateInstantiationArgs(NamedDecl *D,
 7774     NamedDecl *Template;
 7844   llvm::DenseMap<NamedDecl*, NamedDecl*> VisibleNamespaceCache;
 7844   llvm::DenseMap<NamedDecl*, NamedDecl*> VisibleNamespaceCache;
 7994                           NamedDecl *Template,
 8002                           NamedDecl *Template,
 8011                           NamedDecl *Param,
 8056         Decl *Entity, NamedDecl *Template = nullptr,
 8497   NamedDecl *FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
 8497   NamedDecl *FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
 9004   NamedDecl *DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II,
 9004   NamedDecl *DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II,
 9006   void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W);
 9239   bool checkOpenCLDisabledDecl(const NamedDecl &D, const Expr &E);
 9471   NamedDecl *
 9476   void ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc,
11251   bool CheckPointerCall(NamedDecl *NDecl, CallExpr *TheCall,
11259   void checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
tools/clang/include/clang/Sema/SemaInternal.h
   65 inline std::pair<unsigned, unsigned> getDepthAndIndex(NamedDecl *ND) {
   82   return getDepthAndIndex(UPP.first.get<NamedDecl *>());
  113   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
  113   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
  276   void addName(StringRef Name, NamedDecl *ND,
tools/clang/include/clang/Sema/Template.h
  278     NamedDecl *PartiallySubstitutedPack = nullptr;
  396     void SetPartiallySubstitutedPack(NamedDecl *Pack,
  412     NamedDecl *
tools/clang/include/clang/Sema/TypoCorrection.h
   59   TypoCorrection(const DeclarationName &Name, NamedDecl *NameDecl,
   68   TypoCorrection(NamedDecl *Name, NestedNameSpecifier *NNS = nullptr,
  146   NamedDecl *getFoundDecl() const {
  151   NamedDecl *getCorrectionDecl() const {
  152     auto *D = getFoundDecl();
  166   void setCorrectionDecl(NamedDecl *CDecl) {
  172   void setCorrectionDecls(ArrayRef<NamedDecl*> Decls) {
  179   void addCorrectionDecl(NamedDecl *CDecl);
  230   using decl_iterator = SmallVectorImpl<NamedDecl *>::iterator;
  238   using const_decl_iterator = SmallVectorImpl<NamedDecl *>::const_iterator;
  268   SmallVector<NamedDecl *, 1> CorrectionDecls;
tools/clang/include/clang/Serialization/ASTReader.h
  546   llvm::DenseMap<std::pair<DeclContext *, IdentifierInfo *>, NamedDecl *>
  551   llvm::DenseMap<Decl*, llvm::SmallVector<NamedDecl*, 2>>
  610   llvm::SetVector<NamedDecl *> PendingMergedDefinitionsToDeduplicate;
 1035   llvm::SmallMapVector<IdentifierInfo *, SmallVector<NamedDecl*, 2>, 16>
 1100   llvm::SmallVector<NamedDecl *, 16> PendingOdrMergeChecks;
 1427   void pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name);
 1572   void mergeDefinitionVisibility(NamedDecl *Def, NamedDecl *MergedDef);
 1572   void mergeDefinitionVisibility(NamedDecl *Def, NamedDecl *MergedDef);
 1887   T *ReadDeclAs(ModuleFile &F, const RecordData &R, unsigned &I) {
 1888     return cast_or_null<T>(GetDecl(ReadDeclID(F, R, I)));
 2000       llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) override;
 2541   T *readDeclAs() {
 2542     return Reader->ReadDeclAs<T>(*F, Record, Idx);
tools/clang/include/clang/Serialization/ASTWriter.h
  636   unsigned getAnonymousDeclarationNumber(const NamedDecl *D);
  742   void RedefinedHiddenDefinition(const NamedDecl *D, Module *M) override;
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
  333     const auto *ND = dyn_cast_or_null<NamedDecl>(getDecl());
  333     const auto *ND = dyn_cast_or_null<NamedDecl>(getDecl());
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
  454   void VisitCommonDeclRefExpr(const Expr *DR, const NamedDecl *D,
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
  584   const NamedDecl *FD;
  586   FunctionCodeRegion(const NamedDecl *fd, const CodeSpaceRegion* sreg)
  591   static void ProfileRegion(llvm::FoldingSetNodeID& ID, const NamedDecl *FD,
  609   const NamedDecl *getDecl() const {
 1390   const FunctionCodeRegion *getFunctionCodeRegion(const NamedDecl *FD);
tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
  744   for (const auto *I : D->chain()) {
tools/clang/include/clang/Tooling/Core/Lookup.h
   44                               const NamedDecl *FromDecl,
tools/clang/include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h
   36   bool visitSymbolOccurrence(const NamedDecl *ND,
   43   bool VisitNamedDecl(const NamedDecl *D) {
  129   bool visit(const NamedDecl *ND, SourceLocation BeginLoc,
  134   bool visit(const NamedDecl *ND, SourceLocation Loc) {
tools/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
   57   const NamedDecl *getRenameDecl() const;
   60   RenameOccurrences(const NamedDecl *ND, std::string NewName)
   66   const NamedDecl *ND;
   79   QualifiedRenameRule(const NamedDecl *ND,
   87   const NamedDecl *ND;
tools/clang/include/clang/Tooling/Refactoring/Rename/USRFinder.h
   34 const NamedDecl *getNamedDeclAt(const ASTContext &Context,
   40 const NamedDecl *getNamedDeclFor(const ASTContext &Context,
tools/clang/include/clang/Tooling/Refactoring/Rename/USRFindingAction.h
   38 const NamedDecl *getCanonicalSymbolDeclaration(const NamedDecl *FoundDecl);
   38 const NamedDecl *getCanonicalSymbolDeclaration(const NamedDecl *FoundDecl);
   41 std::vector<std::string> getUSRsForDeclaration(const NamedDecl *ND,
tools/clang/lib/AST/ASTContext.cpp
  446                    SmallVectorImpl<const NamedDecl *> &Redeclared) {
  553       SmallVector<const NamedDecl*, 8> Overridden;
  561       getOverriddenMethods(dyn_cast<NamedDecl>(D), Overridden);
  689   SmallVector<NamedDecl *, 4> CanonParams;
 1035 void ASTContext::mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
 1041   MergedDefModules[cast<NamedDecl>(ND->getCanonicalDecl())].push_back(M);
 1044 void ASTContext::deduplicateMergedDefinitonsFor(NamedDecl *ND) {
 1045   auto It = MergedDefModules.find(cast<NamedDecl>(ND->getCanonicalDecl()));
 1449 NamedDecl *
 1450 ASTContext::getInstantiatedFromUsingDecl(NamedDecl *UUD) {
 1459 ASTContext::setInstantiatedFromUsingDecl(NamedDecl *Inst, NamedDecl *Pattern) {
 1459 ASTContext::setInstantiatedFromUsingDecl(NamedDecl *Inst, NamedDecl *Pattern) {
 1540                       const NamedDecl *D,
 1541                       SmallVectorImpl<const NamedDecl *> &Overridden) const {
 2644                                               const NamedDecl *ND) const {
 4437 TemplateArgument ASTContext::getInjectedTemplateArg(NamedDecl *Param) {
 4474   for (NamedDecl *Param : *Params)
 7150   std::multimap<uint64_t, NamedDecl *> FieldOrBaseOffsets;
 7197   std::multimap<uint64_t, NamedDecl *>::iterator
 7238     NamedDecl *dcl = CurLayObj->second;
 7718   NamedDecl **Storage = OT->getStorage();
 7720     NamedDecl *D = *I;
10105   for (auto *CurDecl :
10240 void ASTContext::setManglingNumber(const NamedDecl *ND, unsigned Number) {
10245 unsigned ASTContext::getManglingNumber(const NamedDecl *ND) const {
tools/clang/lib/AST/ASTDiagnostic.cpp
  413       const NamedDecl *ND = reinterpret_cast<const NamedDecl*>(Val);
  444         NamedDecl *ND = cast<NamedDecl>(DC);
  444         NamedDecl *ND = cast<NamedDecl>(DC);
 1318       NamedDecl *FromParamND = ParamsFrom->getParam(FromParamIndex);
 1319       NamedDecl *ToParamND = ParamsTo->getParam(ToParamIndex);
tools/clang/lib/AST/ASTImporter.cpp
  152     LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
  152     LLVM_NODISCARD Error importInto(ImportT *&To, ImportT *From) {
  155         To = cast_or_null<ImportT>(*ToOrErr);
  162     Expected<T *> import(T *From) {
  162     Expected<T *> import(T *From) {
  166       return cast_or_null<T>(*ToOrErr);
  170     Expected<T *> import(const T *From) {
  170     Expected<T *> import(const T *From) {
  357         NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
  358         DeclarationName &Name, NamedDecl *&ToD, SourceLocation &Loc);
  707   SmallVector<NamedDecl *, 4> To(From->size());
 1542     NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
 1543     DeclarationName &Name, NamedDecl *&ToD, SourceLocation &Loc) {
 1580   ToD = cast_or_null<NamedDecl>(Importer.GetAlreadyImportedOrNull(D));
 2182   NamedDecl *ToD;
 2198     SmallVector<NamedDecl *, 4> ConflictingDecls;
 2200     for (auto *FoundDecl : FoundDecls) {
 2261   NamedDecl *LookupD;
 2300   NamedDecl *ToD;
 2313     SmallVector<NamedDecl *, 4> ConflictingDecls;
 2316     for (auto *FoundDecl : FoundDecls) {
 2395   NamedDecl *FoundD;
 2405     SmallVector<NamedDecl *, 4> ConflictingDecls;
 2408     for (auto *FoundDecl : FoundDecls) {
 2451   NamedDecl *ToD;
 2490   NamedDecl *ToD;
 2509     SmallVector<NamedDecl *, 4> ConflictingDecls;
 2512     for (auto *FoundDecl : FoundDecls) {
 2585   NamedDecl *ToD = nullptr;
 2605     SmallVector<NamedDecl *, 4> ConflictingDecls;
 2615     for (auto *FoundDecl : FoundDecls) {
 2741         for (NamedDecl *Found : D2CXX->noload_lookup(Name)) {
 2814   NamedDecl *ToD;
 2823     SmallVector<NamedDecl *, 4> ConflictingDecls;
 2826     for (auto *FoundDecl : FoundDecls) {
 3011   NamedDecl *ToD;
 3039     SmallVector<NamedDecl *, 4> ConflictingDecls;
 3042     for (auto *FoundDecl : FoundDecls) {
 3365   NamedDecl *ToD;
 3373   for (auto *FoundDecl : FoundDecls) {
 3450   NamedDecl *ToD;
 3492   auto **NamedChain =
 3493     new (Importer.getToContext()) NamedDecl*[D->getChainingSize()];
 3496   for (auto *PI : D->chain())
 3497     if (Expected<NamedDecl *> ToD = import(PI))
 3502   llvm::MutableArrayRef<NamedDecl *> CH = {NamedChain, D->getChainingSize()};
 3543   if (NamedDecl *FriendD = D->getFriendDecl()) {
 3544     NamedDecl *ToFriendD;
 3593   NamedDecl *ToD;
 3601   for (auto *FoundDecl : FoundDecls) {
 3658   NamedDecl *ToD;
 3668     SmallVector<NamedDecl *, 4> ConflictingDecls;
 3671     for (auto *FoundDecl : FoundDecls) {
 3882   NamedDecl *ToD;
 3889   for (auto *FoundDecl : FoundDecls) {
 4007   NamedDecl *ToD;
 4039   NamedDecl *ToD;
 4188   NamedDecl *ToD;
 4196   for (auto *FoundDecl : FoundDecls) {
 4266   NamedDecl *ToD = nullptr;
 4293   if (NamedDecl *FromPattern =
 4295     if (Expected<NamedDecl *> ToPatternOrErr = import(FromPattern))
 4317   NamedDecl *ToD = nullptr;
 4327   Expected<NamedDecl *> ToTargetOrErr = import(D->getTargetDecl());
 4359   NamedDecl *ToD = nullptr;
 4402   NamedDecl *ToD = nullptr;
 4439   NamedDecl *ToD = nullptr;
 4612   NamedDecl *ToD;
 4621   for (auto *FoundDecl : FoundDecls) {
 4788   NamedDecl *ToD;
 4796   for (auto *FoundDecl : FoundDecls) {
 5042   NamedDecl *ToD;
 5052     SmallVector<NamedDecl *, 4> ConflictingDecls;
 5054     for (auto *FoundDecl : FoundDecls) {
 5336   NamedDecl *ToD;
 5345   SmallVector<NamedDecl *, 4> ConflictingDecls;
 5347   for (auto *FoundDecl : FoundDecls) {
 5562   NamedDecl *ToD;
 5578     for (auto *FoundDecl : FoundDecls) {
 6264   NamedDecl *ToFoundD = nullptr;
 7034   NamedDecl *ToPack;
 7211   NamedDecl *ToDecl;
 7283   NamedDecl *ToFirstQualifierFoundInScope;
 7395   for (auto *D : E->decls())
 7397       ToDecls.addDecl(cast<NamedDecl>(*ToDOrErr));
 7448       ToDecls.addDecl(cast<NamedDecl>(*ToDOrErr));
 8304     for (auto *I : *FromStorage) {
 8306         ToTemplates.addDecl(cast<NamedDecl>(*ToOrErr));
 8715                                                           NamedDecl **Decls,
tools/clang/lib/AST/ASTImporterLookupTable.cpp
   25   bool VisitNamedDecl(NamedDecl *D) {
   71 void ASTImporterLookupTable::add(DeclContext *DC, NamedDecl *ND) {
   77 void ASTImporterLookupTable::remove(DeclContext *DC, NamedDecl *ND) {
   84 void ASTImporterLookupTable::add(NamedDecl *ND) {
   93 void ASTImporterLookupTable::remove(NamedDecl *ND) {
  126     for (NamedDecl *ND : List) {
tools/clang/lib/AST/CXXInheritance.cpp
   42   llvm::SmallSetVector<NamedDecl *, 8> Decls;
   47   DeclsFound = std::make_unique<NamedDecl *[]>(NumDeclsFound);
  523 std::vector<const NamedDecl *> CXXRecordDecl::lookupDependentName(
  525     llvm::function_ref<bool(const NamedDecl *ND)> Filter) {
  526   std::vector<const NamedDecl *> Results;
  530     for (const NamedDecl *ND : DirectResult) {
  546   for (const NamedDecl *ND : Paths.front().Decls) {
tools/clang/lib/AST/Comment.cpp
  384     const NamedDecl *Param = TPL->getParam(getIndex(i));
tools/clang/lib/AST/CommentSema.cpp
  342     const NamedDecl *Param = TemplateParameters->getParam(0);
  993   const NamedDecl *BestDecl;
 1007   void addDecl(const NamedDecl *ND);
 1009   const NamedDecl *getBestDecl() const {
 1022 void SimpleTypoCorrector::addDecl(const NamedDecl *ND) {
 1062     const NamedDecl *Param = TemplateParameters->getParam(i);
 1098     const NamedDecl *Param = TemplateParameters->getParam(i);
 1114   if (const NamedDecl *ND = Corrector.getBestDecl()) {
tools/clang/lib/AST/Decl.cpp
   88   if (auto *ND = dyn_cast_or_null<NamedDecl>(TheDecl)) {
   88   if (auto *ND = dyn_cast_or_null<NamedDecl>(TheDecl)) {
  170 static Optional<Visibility> getExplicitVisibility(const NamedDecl *D,
  179 static bool usesTypeVisibility(const NamedDecl *D) {
  220 static Optional<Visibility> getVisibilityOf(const NamedDecl *D,
  221                                     NamedDecl::ExplicitVisibilityKind kind) {
  224   if (kind == NamedDecl::VisibilityForType) {
  251   for (const NamedDecl *P : *Params) {
  334       const NamedDecl *ND = Arg.getAsDecl();
  407 static bool hasDirectVisibilityAttribute(const NamedDecl *D,
  530 static bool useInlineVisibilityHidden(const NamedDecl *D) {
  571 static bool isInModulePurview(const NamedDecl *D) {
  577 static bool isExportedFromModuleInterfaceUnit(const NamedDecl *D) {
  590 static LinkageInfo getInternalLinkageFor(const NamedDecl *D) {
  601 static LinkageInfo getExternalLinkageFor(const NamedDecl *D) {
  607                                   cast<NamedDecl>(D->getCanonicalDecl())))
  626 LinkageComputer::getLVForNamespaceScopeDecl(const NamedDecl *D,
  862     LinkageInfo EnumLV = getLVForDecl(cast<NamedDecl>(D->getDeclContext()),
  908 LinkageComputer::getLVForClassMember(const NamedDecl *D,
  964   const NamedDecl *explicitSpecSuppressor = nullptr;
 1098 getExplicitVisibilityAux(const NamedDecl *ND,
 1099                          NamedDecl::ExplicitVisibilityKind kind,
 1133     const NamedDecl *MostRecent = ND->getMostRecentDecl();
 1185   const NamedDecl *Owner;
 1187     Owner = dyn_cast<NamedDecl>(DC);
 1190         dyn_cast<NamedDecl>(ContextDecl->getDeclContext()->getRedeclContext());
 1192     Owner = cast<NamedDecl>(ContextDecl);
 1215 LinkageInfo LinkageComputer::getLVForLocalDecl(const NamedDecl *D,
 1329 LinkageInfo LinkageComputer::computeLVForDecl(const NamedDecl *D,
 1453 LinkageInfo LinkageComputer::getLVForDecl(const NamedDecl *D,
 1483   NamedDecl *Old = nullptr;
 1485     auto *T = cast<NamedDecl>(I);
 1485     auto *T = cast<NamedDecl>(I);
 1499 LinkageInfo LinkageComputer::getDeclLinkageAndVisibility(const NamedDecl *D) {
 1502                                             ? NamedDecl::VisibilityForType
 1503                                             : NamedDecl::VisibilityForValue));
 1527     if (auto *ND = dyn_cast<NamedDecl>(this))
 1602     if (isa<NamedDecl>(Ctx))
 1661       OS << *cast<NamedDecl>(DC);
 1691 bool NamedDecl::declarationReplaces(NamedDecl *OldD, bool IsKnownNewer) const {
 1771 NamedDecl *NamedDecl::getUnderlyingDeclImpl() {
 1772   NamedDecl *ND = this;
 1789   const NamedDecl *D = this;
 2873 static bool isNamed(const NamedDecl *ND, const char (&Str)[Len]) {
 4691                                      MutableArrayRef<NamedDecl *> CH)
 4703                           llvm::MutableArrayRef<NamedDecl *> CH) {
tools/clang/lib/AST/DeclBase.cpp
  280   if (const auto *DN = dyn_cast_or_null<NamedDecl>(TheDecl)) {
  280   if (const auto *DN = dyn_cast_or_null<NamedDecl>(TheDecl)) {
 1340                                                   ArrayRef<NamedDecl*> Decls) {
 1374     for (auto *D : Decls) {
 1411 static bool shouldBeHidden(NamedDecl *D) {
 1468   if (isa<NamedDecl>(D)) {
 1469     auto *ND = cast<NamedDecl>(D);
 1469     auto *ND = cast<NamedDecl>(D);
 1524   if (auto *ND = dyn_cast<NamedDecl>(D))
 1524   if (auto *ND = dyn_cast<NamedDecl>(D))
 1532   if (auto *ND = dyn_cast<NamedDecl>(D))
 1532   if (auto *ND = dyn_cast<NamedDecl>(D))
 1590     if (auto *ND = dyn_cast<NamedDecl>(D))
 1590     if (auto *ND = dyn_cast<NamedDecl>(D))
 1606 NamedDecl *const DeclContextLookupResult::SingleElementDummyList = nullptr;
 1707                                       SmallVectorImpl<NamedDecl *> &Results) {
 1738     if (auto *ND = dyn_cast<NamedDecl>(D))
 1738     if (auto *ND = dyn_cast<NamedDecl>(D))
 1799 void DeclContext::makeDeclVisibleInContext(NamedDecl *D) {
 1807 void DeclContext::makeDeclVisibleInContextWithFlags(NamedDecl *D, bool Internal,
 1856 void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D, bool Internal) {
tools/clang/lib/AST/DeclCXX.cpp
   68     I.setDecl(cast<NamedDecl>(Source->GetExternalDecl(
  689   if (auto *ND = dyn_cast<NamedDecl>(DUnderlying)) {
  689   if (auto *ND = dyn_cast<NamedDecl>(DUnderlying)) {
  844         NamedDecl *Primary =
  845             FunTmpl ? cast<NamedDecl>(FunTmpl) : cast<NamedDecl>(Conversion);
  845             FunTmpl ? cast<NamedDecl>(FunTmpl) : cast<NamedDecl>(Conversion);
  847           Conversions.replace(cast<NamedDecl>(Primary->getPreviousDecl()),
 1396   for (auto *D : R)
 1403 static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) {
 1416   NamedDecl *CallOp = getLambdaCallOperatorHelper(*this);
 1421   NamedDecl *CallOp = getLambdaCallOperatorHelper(*this);
 1440   NamedDecl *InvokerFun = Invoker.front();
 1474 ArrayRef<NamedDecl *>
 1495 static CanQualType GetConversionType(ASTContext &Context, NamedDecl *Conv) {
 1521                            llvm::SmallPtrSet<NamedDecl*, 8> &HiddenVBaseCs) {
 1545         HiddenVBaseCs.insert(cast<NamedDecl>(I.getDecl()->getCanonicalDecl()));
 1589   llvm::SmallPtrSet<NamedDecl*, 8> HiddenVBaseCs;
 1615     if (!HiddenVBaseCs.count(cast<NamedDecl>(I.getDecl()->getCanonicalDecl())))
 1641 void CXXRecordDecl::removeConversion(const NamedDecl *ConvDecl) {
 2007   for (auto *ND : RD->lookup(getDeclName())) {
 2207   for (const auto *D : R) {
 2688                                                NamedDecl *Used,
 2783                                                NamedDecl *Namespace) {
 2803                                  NamedDecl *Target)
 2805       redeclarable_base(C), UsingOrNextShadow(cast<NamedDecl>(Using)) {
 2833                                    NamedDecl *Target, bool IsVirtual) {
 2902                                      NamedDecl *InstantiatedFrom,
 2903                                      ArrayRef<NamedDecl *> UsingDecls) {
 2904   size_t Extra = additionalSizeToAlloc<NamedDecl *>(UsingDecls.size());
 2910   size_t Extra = additionalSizeToAlloc<NamedDecl *>(NumExpansions);
 2913   auto *Trail = Result->getTrailingObjects<NamedDecl *>();
 2915     new (Trail + I) NamedDecl*(nullptr);
tools/clang/lib/AST/DeclFriend.cpp
   40   if (Friend.is<NamedDecl *>()) {
   41     const auto *D = Friend.get<NamedDecl*>();
   41     const auto *D = Friend.get<NamedDecl*>();
tools/clang/lib/AST/DeclPrinter.cpp
 1133   } else if (auto *TD = D->getTemplatedDecl())
 1615       NamedDecl *ND = cast<DeclRefExpr>(*I)->getDecl();
 1629       NamedDecl *ND = cast<DeclRefExpr>(*I)->getDecl();
tools/clang/lib/AST/DeclTemplate.cpp
   48                                              ArrayRef<NamedDecl *> Params,
   55     NamedDecl *P = Params[Idx];
   81                               ArrayRef<NamedDecl *> Params,
   83   void *Mem = C.Allocate(totalSizeToAlloc<NamedDecl *, Expr *>(
   92   for (const NamedDecl *P : asArray()) {
  122   const NamedDecl *FirstParm = getParam(0);
  133   for (NamedDecl *P : *Params) {
  167                            NamedDecl *Decl)
  284                                                    NamedDecl *Decl) {
  383                                              NamedDecl *Decl) {
  953                                                      NamedDecl *Decl) {
 1215   NamedDecl *P[2] = {T, N};
 1237   NamedDecl *Params[] = {TemplateTemplateParm, TemplateTypeParm,
 1260   NamedDecl *Params[] = {Index, Ts};
tools/clang/lib/AST/Expr.cpp
  368 static void computeDeclRefDependence(const ASTContext &Ctx, NamedDecl *D,
  499                          const DeclarationNameInfo &NameInfo, NamedDecl *FoundD,
  517     *getTrailingObjects<NamedDecl *>() = FoundD;
  547                                  ExprValueKind VK, NamedDecl *FoundD,
  562                                  NamedDecl *FoundD,
  571       totalSizeToAlloc<NestedNameSpecifierLoc, NamedDecl *,
  590       totalSizeToAlloc<NestedNameSpecifierLoc, NamedDecl *,
  674     if (const NamedDecl *ND = dyn_cast<NamedDecl>(CurrentDecl)) {
  674     if (const NamedDecl *ND = dyn_cast<NamedDecl>(CurrentDecl)) {
  789     while (Ctx && isa<NamedDecl>(Ctx)) {
 1930 NamedDecl *CastExpr::getConversionFunction() const {
tools/clang/lib/AST/ExprCXX.cpp
 1301 ArrayRef<NamedDecl *> LambdaExpr::getExplicitTemplateParameters() const {
 1399     SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope,
 1432     *getTrailingObjects<NamedDecl *>() = FirstQualifierFoundInScope;
 1448     SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierFoundInScope,
 1457                                    TemplateArgumentLoc, NamedDecl *>(
 1472                                    TemplateArgumentLoc, NamedDecl *>(
 1483     NamedDecl *decl = *begin;
 1597                        NamedDecl *Pack, SourceLocation PackLoc,
 1756     SourceLocation ConceptNameLoc, NamedDecl *FoundDecl,
 1812                                   NamedDecl *FoundDecl,
tools/clang/lib/AST/ExprClassification.cpp
  500   NamedDecl *Member = E->getMemberDecl();
tools/clang/lib/AST/ExprConstant.cpp
 2740   for (const auto *C : IFD->chain())
 3212           const NamedDecl *Decl = nullptr;
 5660       for (auto *C : IndirectFieldChain) {
10253       for (auto *FD : IFD->chain()) {
tools/clang/lib/AST/ExternalASTMerger.cpp
   34 typedef std::pair<Source<NamedDecl *>, ASTImporter *> Candidate;
   57   auto *ND = cast<NamedDecl>(DC);
   80     NamedDecl *SearchResultDecl = SearchResult[0];
  481   llvm::SmallVector<NamedDecl *, 1> Decls;
  499                       for (NamedDecl *FromD : Result) {
  515     NamedDecl *ND = cast_or_null<NamedDecl>(*NDOrErr);
  515     NamedDecl *ND = cast_or_null<NamedDecl>(*NDOrErr);
tools/clang/lib/AST/ItaniumMangle.cpp
  105 static const NamedDecl *getStructor(const NamedDecl *decl) {
  105 static const NamedDecl *getStructor(const NamedDecl *decl) {
  110 static bool isLambda(const NamedDecl *ND) {
  123   llvm::DenseMap<const NamedDecl*, unsigned> Uniquifier;
  133   bool shouldMangleCXXName(const NamedDecl *D) override;
  137   void mangleCXXName(const NamedDecl *D, raw_ostream &) override;
  163   void mangleSEHFilterExpression(const NamedDecl *EnclosingDecl,
  165   void mangleSEHFinallyBlock(const NamedDecl *EnclosingDecl,
  175   bool getNextDiscriminator(const NamedDecl *ND, unsigned &disc) {
  223   const NamedDecl *Structor;
  290     void write(raw_ostream &Out, const NamedDecl *ND,
  292       ND = cast<NamedDecl>(ND->getCanonicalDecl());
  386                  const NamedDecl *D = nullptr, bool NullOut_ = false)
  419   void mangle(const NamedDecl *D);
  426   void mangleName(const NamedDecl *ND);
  428   void mangleNameOrStandardSubstitution(const NamedDecl *ND);
  433   bool mangleSubstitution(const NamedDecl *ND);
  440   bool mangleStandardSubstitution(const NamedDecl *ND);
  442   void addSubstitution(const NamedDecl *ND) {
  443     ND = cast<NamedDecl>(ND->getCanonicalDecl());
  463   void mangleNameWithAbiTags(const NamedDecl *ND,
  470   void mangleUnqualifiedName(const NamedDecl *ND,
  475   void mangleUnqualifiedName(const NamedDecl *ND, DeclarationName Name,
  478   void mangleUnscopedName(const NamedDecl *ND,
  487       const NamedDecl *ND, const AbiTagList *AdditionalAbiTags = nullptr);
  492   void mangleTemplateParamDecl(const NamedDecl *Decl);
  494   void mangleNestedName(const NamedDecl *ND, const DeclContext *DC,
  537                         NamedDecl *firstQualifierLookup,
  544   void mangleDeclRefExpr(const NamedDecl *D);
  560   void writeAbiTags(const NamedDecl *ND,
  571 bool ItaniumMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {
  630 void CXXNameMangler::writeAbiTags(const NamedDecl *ND,
  637     const NamedDecl *ND, const AbiTagList *AdditionalAbiTags) {
  642 void CXXNameMangler::mangle(const NamedDecl *D) {
  790 isTemplate(const NamedDecl *ND, const TemplateArgumentList *&TemplateArgs) {
  816 void CXXNameMangler::mangleName(const NamedDecl *ND) {
  849 void CXXNameMangler::mangleNameWithAbiTags(const NamedDecl *ND,
  949 void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND,
 1252 void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
 1501 void CXXNameMangler::mangleNestedName(const NamedDecl *ND,
 1609       const NamedDecl *ND = cast<NamedDecl>(D);
 1609       const NamedDecl *ND = cast<NamedDecl>(D);
 1631     mangleUnqualifiedName(cast<NamedDecl>(D), AdditionalAbiTags);
 1634   if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
 1634   if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
 1663       const auto *ND = cast<NamedDecl>(Context);
 1663       const auto *ND = cast<NamedDecl>(Context);
 1692 void CXXNameMangler::mangleTemplateParamDecl(const NamedDecl *Decl) {
 1718         for (auto *Param : *Tt->getExpansionTemplateParameters(I))
 1726       for (auto *Param : *Tt->getTemplateParameters())
 1749             = cast<NamedDecl>(Context)->getIdentifier()) {
 1752         if (isTemplate(cast<NamedDecl>(Context), TemplateArgs))
 1776   for (auto *D : Lambda->getLambdaExplicitTemplateParameters())
 1836   const NamedDecl *ND = cast<NamedDecl>(DC);
 1836   const NamedDecl *ND = cast<NamedDecl>(DC);
 2511 void CXXNameMangler::mangleNameOrStandardSubstitution(const NamedDecl *ND) {
 3495                                       NamedDecl *firstQualifierLookup,
 3552 void CXXNameMangler::mangleDeclRefExpr(const NamedDecl *D) {
 4326     const NamedDecl *Pack = SPE->getPack();
 4667 bool CXXNameMangler::mangleSubstitution(const NamedDecl *ND) {
 4672   ND = cast<NamedDecl>(ND->getCanonicalDecl());
 4770 bool CXXNameMangler::mangleStandardSubstitution(const NamedDecl *ND) {
 4934 void ItaniumMangleContextImpl::mangleCXXName(const NamedDecl *D,
 5051     const NamedDecl *EnclosingDecl, raw_ostream &Out) {
 5061     const NamedDecl *EnclosingDecl, raw_ostream &Out) {
tools/clang/lib/AST/JSONNodeDumper.cpp
  111   if (const auto *ND = dyn_cast<NamedDecl>(D))
  111   if (const auto *ND = dyn_cast<NamedDecl>(D))
  286   if (const auto *ND = dyn_cast<NamedDecl>(D))
  286   if (const auto *ND = dyn_cast<NamedDecl>(D))
  298   if (const auto *ND = dyn_cast<NamedDecl>(D))
  298   if (const auto *ND = dyn_cast<NamedDecl>(D))
  690 void JSONNodeDumper::VisitNamedDecl(const NamedDecl *ND) {
 1216   if (const NamedDecl *ND = CE->getConversionFunction())
 1253     for (const NamedDecl *D : ULE->decls())
tools/clang/lib/AST/Linkage.h
   41   explicit LVComputationKind(NamedDecl::ExplicitVisibilityKind EK)
   45   NamedDecl::ExplicitVisibilityKind getExplicitVisibilityKind() const {
   50     return getExplicitVisibilityKind() == NamedDecl::VisibilityForType;
   53     return getExplicitVisibilityKind() == NamedDecl::VisibilityForValue;
   58     LVComputationKind Result(NamedDecl::VisibilityForValue);
   85       llvm::PointerIntPair<const NamedDecl *,
   93   llvm::Optional<LinkageInfo> lookup(const NamedDecl *ND,
  101   void cache(const NamedDecl *ND, LVComputationKind Kind, LinkageInfo Info) {
  123   LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D,
  127   LinkageInfo getLVForClassMember(const NamedDecl *D,
  134   LinkageInfo getLVForLocalDecl(const NamedDecl *D,
  143   LinkageInfo computeLVForDecl(const NamedDecl *D,
  147   LinkageInfo getLVForDecl(const NamedDecl *D, LVComputationKind computation);
  154   LinkageInfo getDeclLinkageAndVisibility(const NamedDecl *D);
tools/clang/lib/AST/Mangle.cpp
   56 static bool isExternC(const NamedDecl *ND) {
   63                                          const NamedDecl *ND) {
   95 bool MangleContext::shouldMangleDeclName(const NamedDecl *D) {
  119 void MangleContext::mangleName(const NamedDecl *D, raw_ostream &Out) {
  197                                       const NamedDecl *ID,
  251     else if (auto ND = dyn_cast<NamedDecl>(DC)) {
  379     const NamedDecl *ND = cast<NamedDecl>(D);
  379     const NamedDecl *ND = cast<NamedDecl>(D);
  423   bool writeFuncOrVarName(const NamedDecl *D, raw_ostream &OS) {
  446   std::string getMangledStructor(const NamedDecl *ND, unsigned StructorType) {
tools/clang/lib/AST/MicrosoftMangle.cpp
  112 static const FunctionDecl *getStructor(const NamedDecl *ND) {
  128   llvm::DenseMap<const NamedDecl *, unsigned> Uniquifier;
  130   llvm::DenseMap<const NamedDecl *, unsigned> SEHFilterIds;
  131   llvm::DenseMap<const NamedDecl *, unsigned> SEHFinallyIds;
  136   bool shouldMangleCXXName(const NamedDecl *D) override;
  138   void mangleCXXName(const NamedDecl *D, raw_ostream &Out) override;
  192   void mangleSEHFilterExpression(const NamedDecl *EnclosingDecl,
  194   void mangleSEHFinallyBlock(const NamedDecl *EnclosingDecl,
  197   bool getNextDiscriminator(const NamedDecl *ND, unsigned &disc) {
  262   const NamedDecl *Structor;
  311   void mangle(const NamedDecl *D, StringRef Prefix = "?");
  312   void mangleName(const NamedDecl *ND);
  331   void mangleNestedName(const NamedDecl *ND);
  334   bool isStructorDecl(const NamedDecl *ND) const {
  338   void mangleUnqualifiedName(const NamedDecl *ND) {
  341   void mangleUnqualifiedName(const NamedDecl *ND, DeclarationName Name);
  385                          const NamedDecl *Parm);
  423 bool MicrosoftMangleContextImpl::shouldMangleCXXName(const NamedDecl *D) {
  483 void MicrosoftCXXNameMangler::mangle(const NamedDecl *D, StringRef Prefix) {
  716 void MicrosoftCXXNameMangler::mangleName(const NamedDecl *ND) {
  760 isTemplate(const NamedDecl *ND, const TemplateArgumentList *&TemplateArgs) {
  786 void MicrosoftCXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
  944               mangleUnqualifiedName(cast<NamedDecl>(LambdaContextDecl));
 1044 void MicrosoftCXXNameMangler::mangleNestedName(const NamedDecl *ND) {
 1095           if (const auto *ND = dyn_cast<NamedDecl>(MC))
 1095           if (const auto *ND = dyn_cast<NamedDecl>(MC))
 1124     } else if (isa<NamedDecl>(DC)) {
 1125       ND = cast<NamedDecl>(DC);
 1437                                                 const NamedDecl *Parm) {
 1458     const NamedDecl *ND = TA.getAsDecl();
 1536     const NamedDecl *ND =
 2945 void MicrosoftMangleContextImpl::mangleCXXName(const NamedDecl *D,
 3286     const NamedDecl *EnclosingDecl, raw_ostream &Out) {
 3298     const NamedDecl *EnclosingDecl, raw_ostream &Out) {
tools/clang/lib/AST/NestedNameSpecifier.cpp
  151     NamedDecl *ND = static_cast<NamedDecl *>(Specifier);
tools/clang/lib/AST/ODRHash.cpp
  282   void VisitNamedDecl(const NamedDecl *D) {
  284     Inherited::VisitNamedDecl(D);
  629   const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  629   const NamedDecl *ND = dyn_cast<NamedDecl>(D);
tools/clang/lib/AST/QualTypeNames.cpp
  270   const auto *Outer = dyn_cast_or_null<NamedDecl>(DC);
  270   const auto *Outer = dyn_cast_or_null<NamedDecl>(DC);
  288           Outer = dyn_cast<NamedDecl>(Decl);
tools/clang/lib/AST/RecordLayoutBuilder.cpp
  763   void FinishLayout(const NamedDecl *D);
 1916 void ItaniumRecordLayoutBuilder::FinishLayout(const NamedDecl *D) {
 3171     for (const NamedDecl *ND : IFD->chain())
tools/clang/lib/AST/TemplateBase.cpp
  408     NamedDecl *ND = getAsDecl();
tools/clang/lib/AST/TextNodeDumper.cpp
  241   if (auto *ND = dyn_cast<NamedDecl>(D))
  245   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
  245   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
  418   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  418   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  427 void TextNodeDumper::dumpName(const NamedDecl *ND) {
 1266   for (const auto *Child : D->chain())
tools/clang/lib/AST/Type.cpp
   74   NamedDecl *ND = nullptr;
 2114 bool Type::isIncompleteType(NamedDecl **Def) const {
tools/clang/lib/AST/TypePrinter.cpp
  117     void printTypeSpec(NamedDecl *D, raw_ostream &OS);
  944 void TypePrinter::printTypeSpec(NamedDecl *D, raw_ostream &OS) {
tools/clang/lib/AST/VTableBuilder.cpp
 2867     const auto *ND = dyn_cast<NamedDecl>(D);
 2867     const auto *ND = dyn_cast<NamedDecl>(D);
tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp
  438                           const Matcher<NamedDecl> &Base,
  443                               const Matcher<NamedDecl> &Base,
  760                             const Matcher<NamedDecl> &Matcher,
  779                                          const Matcher<NamedDecl> &Matcher,
  853                                          const Matcher<NamedDecl> &Base,
  890     const ObjCInterfaceDecl *Declaration, const Matcher<NamedDecl> &Base,
tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
  335 Matcher<NamedDecl> hasAnyNameFunc(ArrayRef<const StringRef *> NameRefs) {
  370 static StringRef getNodeName(const NamedDecl &Node,
  447 bool HasNameMatcher::matchesNodeUnqualified(const NamedDecl &Node) const {
  456 bool HasNameMatcher::matchesNodeFullFast(const NamedDecl &Node) const {
  479   for (; Ctx && isa<NamedDecl>(Ctx); Ctx = Ctx->getParent()) {
  509 bool HasNameMatcher::matchesNodeFullSlow(const NamedDecl &Node) const {
  539 bool HasNameMatcher::matchesNode(const NamedDecl &Node) const {
  563 const internal::VariadicDynCastAllOfMatcher<Decl, NamedDecl> namedDecl;
  777 const internal::VariadicFunction<internal::Matcher<NamedDecl>, StringRef,
tools/clang/lib/ASTMatchers/Dynamic/Marshallers.h
   75     return Value.isMatcher() && Value.getMatcher().hasTypedMatcher<T>();
   78   static ast_matchers::internal::Matcher<T> get(const VariantValue &Value) {
   79     return Value.getMatcher().getTypedMatcher<T>();
   83     return ArgKind(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  361     RetTypes.push_back(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  466       ast_matchers::internal::VariadicDynCastAllOfMatcher<BaseT, DerivedT> Func,
  469         DerivedKind(ast_type_traits::ASTNodeKind::getFromNodeKind<DerivedT>()) {
  778     ast_matchers::internal::VariadicDynCastAllOfMatcher<BaseT, DerivedT>
tools/clang/lib/Analysis/AnalysisDeclContext.cpp
  492       if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl()))
  492       if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl()))
  537       if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl()))
  537       if (const auto *D = dyn_cast<NamedDecl>(LCtx->getDecl()))
tools/clang/lib/Analysis/BodyFarm.cpp
  236   for (NamedDecl *FoundDecl : Decls)
tools/clang/lib/Analysis/CallGraph.cpp
  251   if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(FD))
  251   if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(FD))
  271     if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Node->getDecl()))
  271     if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Node->getDecl()))
tools/clang/lib/Analysis/PathDiagnostic.cpp
  972   Out << Prefix << '\'' << cast<NamedDecl>(*D);
 1147   else if (const auto *ND = dyn_cast_or_null<NamedDecl>(getCallee()))
 1147   else if (const auto *ND = dyn_cast_or_null<NamedDecl>(getCallee()))
 1208     if (const auto *ND = dyn_cast_or_null<NamedDecl>(D))
 1208     if (const auto *ND = dyn_cast_or_null<NamedDecl>(D))
tools/clang/lib/Analysis/RetainSummaryManager.cpp
  895 static QualType getCallableReturnType(const NamedDecl *ND) {
  906     const ParmVarDecl *pd, unsigned parm_idx, const NamedDecl *FD,
tools/clang/lib/Analysis/ThreadSafety.cpp
   70                             const Expr *MutexExp, const NamedDecl *D,
  317 using LocalVarContext = llvm::ImmutableMap<const NamedDecl *, unsigned>;
  392     const NamedDecl *Dec;
  407     VarDefinition(const NamedDecl *D, const Expr *E, Context C)
  411     VarDefinition(const NamedDecl *D, unsigned R, Context C)
  428   const VarDefinition* lookup(const NamedDecl *D, Context Ctx) {
  439   const Expr* lookupExpr(const NamedDecl *D, Context &Ctx) {
  474     const NamedDecl *Dec = VarDefinitions[i].Dec;
  502       const NamedDecl *D = I.getKey();
  528   Context addDefinition(const NamedDecl *D, const Expr *Exp, Context Ctx) {
  537   Context addReference(const NamedDecl *D, unsigned i, Context Ctx) {
  546   Context updateDefinition(const NamedDecl *D, Expr *Exp, Context Ctx) {
  559   Context clearDefinition(const NamedDecl *D, Context Ctx) {
  569   Context removeDefinition(const NamedDecl *D, Context Ctx) {
  654     const NamedDecl *Dec = P.first;
 1038                    const NamedDecl *D, VarDecl *SelfDecl = nullptr);
 1042                    const NamedDecl *D,
 1350                                        const Expr *Exp, const NamedDecl *D,
 1382                                        const Expr *Exp, const NamedDecl *D,
 1514   auto *FunDecl = dyn_cast_or_null<NamedDecl>(Exp->getCalleeDecl());
 1579   void warnIfMutexNotHeld(const NamedDecl *D, const Expr *Exp, AccessKind AK,
 1582   void warnIfMutexHeld(const NamedDecl *D, const Expr *Exp, Expr *MutexExp,
 1590   void handleCall(const Expr *Exp, const NamedDecl *D, VarDecl *VD = nullptr);
 1613 void BuildLockset::warnIfMutexNotHeld(const NamedDecl *D, const Expr *Exp,
 1676 void BuildLockset::warnIfMutexHeld(const NamedDecl *D, const Expr *Exp,
 1801 void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D,
 2088   auto *D = dyn_cast_or_null<NamedDecl>(Exp->getCalleeDecl());
 2149         const auto *CtorD = dyn_cast_or_null<NamedDecl>(CE->getConstructor());
 2149         const auto *CtorD = dyn_cast_or_null<NamedDecl>(CE->getConstructor());
 2264   const NamedDecl *D = walker.getDecl();
tools/clang/lib/Analysis/ThreadSafetyCommon.cpp
   96                                                const NamedDecl *D,
  810 void SExprBuilder::enterCFG(CFG *Cfg, const NamedDecl *D,
tools/clang/lib/CodeGen/Address.h
  108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGBlocks.cpp
 2959     const NamedDecl *ND = nullptr;
tools/clang/lib/CodeGen/CGCUDANV.cpp
  208   auto *ND = cast<const NamedDecl>(D);
tools/clang/lib/CodeGen/CGClass.cpp
  599     for (const auto *I : IndirectField->chain())
tools/clang/lib/CodeGen/CGDecl.cpp
  124     for (auto *Using : cast<UsingPackDecl>(D).expansions())
tools/clang/lib/CodeGen/CGException.cpp
 1842     const NamedDecl *ParentSEHFn = ParentCGF.CurSEHParent;
tools/clang/lib/CodeGen/CGExpr.cpp
 2515   const NamedDecl *ND = E->getDecl();
 3883   NamedDecl *ND = E->getMemberDecl();
tools/clang/lib/CodeGen/CGExprCXX.cpp
 1322   for (auto *Decl : Ctx.getTranslationUnitDecl()->lookup(Name))
tools/clang/lib/CodeGen/CGObjCRuntime.cpp
  197             CGF.CurSEHParent = cast<NamedDecl>(CGF.CurFuncDecl);
tools/clang/lib/CodeGen/CodeGenFunction.h
  477   const NamedDecl *CurSEHParent = nullptr;
tools/clang/lib/CodeGen/CodeGenModule.cpp
  757                                         const NamedDecl *D) const {
  860   const auto *D = dyn_cast<NamedDecl>(GD.getDecl());
  860   const auto *D = dyn_cast<NamedDecl>(GD.getDecl());
  870                                           const NamedDecl *D) const {
  882   setGVPropertiesAux(GV, dyn_cast<NamedDecl>(GD.getDecl()));
  886                                     const NamedDecl *D) const {
  892                                        const NamedDecl *D) const {
  986                                       const NamedDecl *ND,
 1092   const auto *ND = cast<NamedDecl>(GD.getDecl());
 1092   const auto *ND = cast<NamedDecl>(GD.getDecl());
 1640   if (dyn_cast_or_null<NamedDecl>(D))
 1759 static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) {
tools/clang/lib/CodeGen/CodeGenModule.h
  767   void setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const;
  772   void setDLLImportDLLExport(llvm::GlobalValue *GV, const NamedDecl *D) const;
  776   void setGVProperties(llvm::GlobalValue *GV, const NamedDecl *D) const;
  778   void setGVPropertiesAux(llvm::GlobalValue *GV, const NamedDecl *D) const;
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp
 1300     const NamedDecl *ND = Dtor;
tools/clang/lib/CrossTU/CrossTranslationUnit.cpp
  196 CrossTranslationUnitContext::getLookupName(const NamedDecl *ND) {
tools/clang/lib/Frontend/ASTConsumers.cpp
   74       if (isa<NamedDecl>(D))
   75         return cast<NamedDecl>(D)->getQualifiedNameAsString();
  128     bool VisitNamedDecl(NamedDecl *D) {
tools/clang/lib/Frontend/ASTMerge.cpp
   63       if (const auto *ND = dyn_cast<NamedDecl>(D))
   63       if (const auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/lib/Frontend/ASTUnit.cpp
  286 static uint64_t getDeclShowContexts(const NamedDecl *ND,
  906   if (const auto *ND = dyn_cast<NamedDecl>(D)) {
  906   if (const auto *ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/Frontend/FrontendAction.cpp
   92     if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
   92     if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  117     if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
  117     if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
tools/clang/lib/Frontend/FrontendActions.cpp
  451     if (auto *NamedTemplate = dyn_cast_or_null<NamedDecl>(Inst.Entity)) {
  451     if (auto *NamedTemplate = dyn_cast_or_null<NamedDecl>(Inst.Entity)) {
tools/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
   37   using MangledSymbols = std::map<const NamedDecl *, MangledSymbol>;
   39   bool WriteNamedDecl(const NamedDecl *ND, MangledSymbols &Symbols, int RDO) {
  108     const NamedDecl *ParentDecl = getParentFunctionDecl(ND);
  141       HandleNamedDecl(dyn_cast<NamedDecl>(D), Symbols, RDO);
  147       HandleNamedDecl(dyn_cast<NamedDecl>(D), Symbols, RDO);
  153       HandleNamedDecl(dyn_cast<NamedDecl>(D), Symbols, RDO);
  156   bool HandleNamedDecl(const NamedDecl *ND, MangledSymbols &Symbols, int RDO) {
  211       bool VisitNamedDecl(NamedDecl *ND) {
  227       std::set<const NamedDecl *> LateParsedDecls;
  228       std::set<NamedDecl *> NamedDecls;
  241       for (const auto *FD : v.LateParsedDecls) {
  249     for (const NamedDecl *ND : v.ValueDecls)
  251     for (const NamedDecl *ND : v.NamedDecls)
tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
  385     void RewriteBlocksInFunctionProtoType(QualType funcType, NamedDecl *D);
  388     void RewriteBlockPointerDecl(NamedDecl *VD);
  486     void CheckFunctionPointerDecl(QualType dType, NamedDecl *ND);
  609                                                    NamedDecl *D) {
  621 void RewriteModernObjC::CheckFunctionPointerDecl(QualType funcType, NamedDecl *ND) {
 1697     NamedDecl* D = cast<NamedDecl>(DS->getSingleDecl());
 1697     NamedDecl* D = cast<NamedDecl>(DS->getSingleDecl());
 4862 void RewriteModernObjC::RewriteBlockPointerDecl(NamedDecl *ND) {
tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
  313     void RewriteBlocksInFunctionProtoType(QualType funcType, NamedDecl *D);
  316     void RewriteBlockPointerDecl(NamedDecl *VD);
  397     void CheckFunctionPointerDecl(QualType dType, NamedDecl *ND);
  545                                                    NamedDecl *D) {
  557 void RewriteObjC::CheckFunctionPointerDecl(QualType funcType, NamedDecl *ND) {
 1488     NamedDecl* D = cast<NamedDecl>(DS->getSingleDecl());
 1488     NamedDecl* D = cast<NamedDecl>(DS->getSingleDecl());
 4016 void RewriteObjC::RewriteBlockPointerDecl(NamedDecl *ND) {
tools/clang/lib/Index/CommentToXML.cpp
  899     if (const NamedDecl *ND = dyn_cast<NamedDecl>(DI->CommentDecl)) {
  899     if (const NamedDecl *ND = dyn_cast<NamedDecl>(DI->CommentDecl)) {
tools/clang/lib/Index/FileIndexRecord.cpp
   53     if (auto ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/Index/IndexBody.cpp
   20   const NamedDecl *Parent;
   31               const NamedDecl *Parent, const DeclContext *DC)
  155       llvm::function_ref<bool(const NamedDecl *ND)> Filter) {
  171     std::vector<const NamedDecl *> Symbols =
  471 void IndexingContext::indexBody(const Stmt *S, const NamedDecl *Parent,
tools/clang/lib/Index/IndexDecl.cpp
   55                                  const NamedDecl *Parent,
   72         if (const NamedDecl *TTD = TD->getTemplatedDecl())
   82                         const NamedDecl *Parent = nullptr,
  163       IndexCtx.handleReference(D, AttrLoc, cast<NamedDecl>(D->getDeclContext()),
  191   gatherTemplatePseudoOverrides(const NamedDecl *D,
  205       for (const NamedDecl *ND : Pattern->lookup(D->getDeclName())) {
  589     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  589     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  600     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  600     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  617     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  617     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  626     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  626     const NamedDecl *Parent = dyn_cast<NamedDecl>(DC);
  654   static bool shouldIndexTemplateParameterDefaultValue(const NamedDecl *D) {
  670     const NamedDecl *Parent = D->getTemplatedDecl();
  678       for (const NamedDecl *TP : *Params) {
  711       IndexCtx.indexTypeSourceInfo(Ty, cast<NamedDecl>(D->getDeclContext()));
  722                        dyn_cast<NamedDecl>(D->getDeclContext()),
tools/clang/lib/Index/IndexSymbol.cpp
   66   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
   66   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  474   if (auto *ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/Index/IndexTypeSourceInfo.cpp
   19   const NamedDecl *Parent;
   27   TypeIndexer(IndexingContext &indexCtx, const NamedDecl *parent,
  193     std::vector<const NamedDecl *> Symbols = RD->lookupDependentName(
  210                                           const NamedDecl *Parent,
  221                                    const NamedDecl *Parent,
  234                                                   const NamedDecl *Parent,
tools/clang/lib/Index/IndexingContext.cpp
   73 bool IndexingContext::handleReference(const NamedDecl *D, SourceLocation Loc,
   74                                       const NamedDecl *Parent,
  219     const auto *ND = cast<NamedDecl>(D);
  219     const auto *ND = cast<NamedDecl>(D);
  222       for (const NamedDecl *BaseND : Pattern->lookup(ND->getDeclName())) {
  232         for (const NamedDecl *BaseECD : Pattern->lookup(ECD->getDeclName()))
  265 static bool shouldSkipNamelessDecl(const NamedDecl *ND) {
  284     } else if (auto ND = dyn_cast<NamedDecl>(Parent)) {
  360   if (!isa<NamedDecl>(D) || shouldSkipNamelessDecl(cast<NamedDecl>(D)))
  360   if (!isa<NamedDecl>(D) || shouldSkipNamelessDecl(cast<NamedDecl>(D)))
tools/clang/lib/Index/IndexingContext.h
   78   bool handleReference(const NamedDecl *D, SourceLocation Loc,
   79                        const NamedDecl *Parent,
  102   void indexTypeSourceInfo(TypeSourceInfo *TInfo, const NamedDecl *Parent,
  107   void indexTypeLoc(TypeLoc TL, const NamedDecl *Parent,
  113                                    const NamedDecl *Parent,
  118   void indexBody(const Stmt *S, const NamedDecl *Parent,
tools/clang/lib/Index/USRGeneration.cpp
   48 static StringRef GetExternalSourceContainer(const NamedDecl *D) {
   85   void VisitNamedDecl(const NamedDecl *D);
  122   bool ShouldGenerateLocation(const NamedDecl *D);
  124   bool isLocal(const NamedDecl *D) {
  128   void GenExtSymbolContainer(const NamedDecl *D);
  170   bool EmitDeclName(const NamedDecl *D);
  178 bool USRGenerator::EmitDeclName(const NamedDecl *D) {
  185 bool USRGenerator::ShouldGenerateLocation(const NamedDecl *D) {
  198   if (const NamedDecl *D = dyn_cast<NamedDecl>(DC))
  198   if (const NamedDecl *D = dyn_cast<NamedDecl>(DC))
  288 void USRGenerator::VisitNamedDecl(const NamedDecl *D) {
  583   if (const NamedDecl *DCN = dyn_cast<NamedDecl>(DC))
  583   if (const NamedDecl *DCN = dyn_cast<NamedDecl>(DC))
  593 void USRGenerator::GenExtSymbolContainer(const NamedDecl *D) {
tools/clang/lib/Parse/ParseCXXInlineMethods.cpp
   24 NamedDecl *Parser::ParseCXXInlineMethodDef(
   37   NamedDecl *FnD;
tools/clang/lib/Parse/ParseDecl.cpp
 1499     NamedDecl *ND  = dyn_cast<NamedDecl>(D);
 1499     NamedDecl *ND  = dyn_cast<NamedDecl>(D);
 6410   SmallVector<NamedDecl *, 0> DeclsInPrototype;
 6414       NamedDecl *ND = dyn_cast<NamedDecl>(D);
 6414       NamedDecl *ND = dyn_cast<NamedDecl>(D);
tools/clang/lib/Parse/ParseDeclCXX.cpp
 2793     NamedDecl *ThisDecl = nullptr;
 3092     DiagnoseUnexpectedNamespace(cast<NamedDecl>(TagDecl));
 3170     if (auto *TD = dyn_cast_or_null<NamedDecl>(TagDecl))
 3170     if (auto *TD = dyn_cast_or_null<NamedDecl>(TagDecl))
 3191             << (isa<NamedDecl>(TagDecl)
 3192                   ? cast<NamedDecl>(TagDecl)->getQualifiedNameAsString()
 3381 void Parser::DiagnoseUnexpectedNamespace(NamedDecl *D) {
tools/clang/lib/Parse/ParseExpr.cpp
  552     NamedDecl *ND = candidate.getCorrectionDecl();
  565     for (auto *C : candidate) {
  566       NamedDecl *ND = C->getUnderlyingDecl();
tools/clang/lib/Parse/ParseExprCXX.cpp
  563     NamedDecl *ND = getNonTypeAnnotation(Tok);
 1265     SmallVector<NamedDecl*, 4> TemplateParams;
tools/clang/lib/Parse/ParseOpenMP.cpp
  639     NamedDecl *ND = dyn_cast<NamedDecl>(D);
  639     NamedDecl *ND = dyn_cast<NamedDecl>(D);
 1120                          NamedDecl *>,
 1171       NamedDecl *ND = Actions.lookupOpenMPDeclareTargetName(
 1189     NamedDecl *ND;
tools/clang/lib/Parse/ParseTemplate.cpp
  117     SmallVector<NamedDecl*, 4> TemplateParams;
  422     unsigned Depth, SmallVectorImpl<NamedDecl *> &TemplateParams,
  461                              SmallVectorImpl<NamedDecl*> &TemplateParams) {
  464     if (NamedDecl *TmpParam
  580 NamedDecl *Parser::ParseTemplateParameter(unsigned Depth, unsigned Position) {
  615 NamedDecl *Parser::ParseTypeParameter(unsigned Depth, unsigned Position) {
  677 NamedDecl *
  683   SmallVector<NamedDecl*,8> TemplateParams;
  782 NamedDecl *
tools/clang/lib/Sema/AnalysisBasedWarnings.cpp
 1392         const NamedDecl *Base = Profile.getBase();
 1465     const NamedDecl *KeyProp = Key.getProperty();
 1759   void handleNoMutexHeld(StringRef Kind, const NamedDecl *D,
 1772   void handleMutexNotHeld(StringRef Kind, const NamedDecl *D,
tools/clang/lib/Sema/CodeCompleteConsumer.cpp
  358   const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
  358   const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
  375     if (const auto *ND = dyn_cast<NamedDecl>(DC)) {
  375     if (const auto *ND = dyn_cast<NamedDecl>(DC)) {
  409         OS << cast<NamedDecl>(CurDC)->getName();
  472   const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
  472   const NamedDecl *ND = dyn_cast<NamedDecl>(DC);
tools/clang/lib/Sema/DeclSpec.cpp
  169                                              ArrayRef<NamedDecl*>
  272     I.Fun.DeclsInPrototype = new NamedDecl *[DeclsInPrototype.size()];
tools/clang/lib/Sema/DelayedDiagnostic.cpp
   26                                     const NamedDecl *ReferringDecl,
   27                                     const NamedDecl *OffendingDecl,
tools/clang/lib/Sema/IdentifierResolver.cpp
   74 void IdentifierResolver::IdDeclInfo::RemoveDecl(NamedDecl *D) {
  144 void IdentifierResolver::AddDecl(NamedDecl *D) {
  161     NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr);
  169 void IdentifierResolver::InsertDeclAfter(iterator Pos, NamedDecl *D) {
  186       NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr);
  209 void IdentifierResolver::RemoveDecl(NamedDecl *D) {
  262 static DeclMatchKind compareDeclarations(NamedDecl *Existing, NamedDecl *New) {
  262 static DeclMatchKind compareDeclarations(NamedDecl *Existing, NamedDecl *New) {
  302 bool IdentifierResolver::tryAddTopLevelDecl(NamedDecl *D, DeclarationName Name){
  316     NamedDecl *PrevD = static_cast<NamedDecl*>(Ptr);
  416   NamedDecl *D = **this;
tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
  232     llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) {
tools/clang/lib/Sema/ScopeInfo.cpp
   60 static const NamedDecl *getBestPropertyDecl(const ObjCPropertyRefExpr *PropE) {
   71   const NamedDecl *D = nullptr;
tools/clang/lib/Sema/Sema.cpp
  638 static bool isFunctionOrVarDeclExternC(NamedDecl *ND) {
  658     SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> > &Undefined) {
  660     NamedDecl *ND = UndefinedUse.first;
  714   SmallVector<std::pair<NamedDecl *, SourceLocation>, 16> Undefined;
 1215       const NamedDecl *D = *I;
 1283 NamedDecl *Sema::getCurFunctionOrMethodDecl() {
 1286     return cast<NamedDecl>(DC);
 1914     llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) {}
 2050     NamedDecl *Fn = (*It)->getUnderlyingDecl();
 2103     const NamedDecl *ND = *ULE->decls_begin();
 2299 bool Sema::checkOpenCLDisabledDecl(const NamedDecl &D, const Expr &E) {
tools/clang/lib/Sema/SemaAccess.cpp
   39 bool Sema::SetMemberAccessSpecifier(NamedDecl *MemberDecl,
   40                                     NamedDecl *PrevMemberDecl,
   65 static CXXRecordDecl *FindDeclaringClass(NamedDecl *D) {
  550   NamedDecl *Friend
  551     = cast<NamedDecl>(FriendD->getFriendDecl()->getCanonicalDecl());
 1044     NamedDecl *D = Target.getTargetDecl();
 1096   NamedDecl *D = entity.getTargetDecl();
 1104     NamedDecl *PrevDecl = nullptr;
 1163     NamedDecl *D = entity.getTargetDecl();
 1263   NamedDecl *D = (Entity.isMemberAccess() ? Entity.getTargetDecl() : nullptr);
 1298     const NamedDecl *OrigDecl = Entity.getTargetDecl()->getUnderlyingDecl();
 1352     NamedDecl *Target = Entity.getTargetDecl();
 1504     NamedDecl *TargetDecl = cast<NamedDecl>(TargetD);
 1504     NamedDecl *TargetDecl = cast<NamedDecl>(TargetD);
 1768 Sema::AccessResult Sema::CheckFriendAccess(NamedDecl *target) {
 1891 bool Sema::IsSimplyAccessible(NamedDecl *Target, CXXRecordDecl *NamingClass,
tools/clang/lib/Sema/SemaAttr.cpp
   98 void Sema::inferGslPointerAttribute(NamedDecl *ND,
  884   NamedDecl *ND = dyn_cast<NamedDecl>(D);
  884   NamedDecl *ND = dyn_cast<NamedDecl>(D);
  885   if (ND && ND->getExplicitVisibility(NamedDecl::VisibilityForValue))
tools/clang/lib/Sema/SemaCUDA.cpp
  590     NamedDecl *Match = *It;
  752   for (NamedDecl *OldND : Previous) {
tools/clang/lib/Sema/SemaCXXScopeSpec.cpp
  238     NamedDecl *SuggestedDef = nullptr;
  314 bool Sema::isAcceptableNestedNameSpecifier(const NamedDecl *SD,
  358 NamedDecl *Sema::FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS) {
  376   NamedDecl *Result = Found.getFoundDecl();
  485                                        NamedDecl *ScopeLookupResult,
  601         if (NamedDecl *ND = R.getAsSingle<NamedDecl>())
  601         if (NamedDecl *ND = R.getAsSingle<NamedDecl>())
  610       if (NamedDecl *ND = R.getAsSingle<NamedDecl>())
  610       if (NamedDecl *ND = R.getAsSingle<NamedDecl>())
  643       if (NamedDecl *ND = Corrected.getFoundDecl())
  651   NamedDecl *SD =
  672       NamedDecl *OuterDecl;
  677         OuterDecl = FoundOuter.getAsSingle<NamedDecl>();
  819       if (NamedDecl *ND = Found.getAsSingle<NamedDecl>())
  819       if (NamedDecl *ND = Found.getAsSingle<NamedDecl>())
tools/clang/lib/Sema/SemaChecking.cpp
 4158                                         const NamedDecl *FDecl,
 4205                                   const NamedDecl *FDecl,
 4304 void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
 4439 bool Sema::CheckPointerCall(NamedDecl *NDecl, CallExpr *TheCall,
 6935           if (const NamedDecl *ND = dyn_cast<NamedDecl>(PV->getDeclContext())) {
 6935           if (const NamedDecl *ND = dyn_cast<NamedDecl>(PV->getDeclContext())) {
 6959     if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(CE->getCalleeDecl())) {
 6959     if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(CE->getCalleeDecl())) {
 7918       NamedDecl *decl = (*I)->getUnderlyingDecl();
 8393         NamedDecl *ND = Result.getFoundDecl();
 9090       for (const auto *I : R) {
12539   using Object = NamedDecl *;
13190                                     const NamedDecl *ND) {
13263   const NamedDecl *ND = nullptr;
14636     const NamedDecl *ND = m.RD;
tools/clang/lib/Sema/SemaCodeComplete.cpp
   69   typedef std::pair<const NamedDecl *, unsigned> DeclIndexPair;
   79     llvm::PointerUnion<const NamedDecl *, DeclIndexPairVector *> DeclOrVector;
   97     void Add(const NamedDecl *ND, unsigned Index) {
  105       if (const NamedDecl *PrevND =
  106               DeclOrVector.dyn_cast<const NamedDecl *>()) {
  223   unsigned getBasePriority(const NamedDecl *D);
  291   bool isInterestingDecl(const NamedDecl *ND,
  301                          const NamedDecl *Hiding);
  323   void AddResult(Result R, DeclContext *CurContext, NamedDecl *Hiding,
  349   bool IsOrdinaryName(const NamedDecl *ND) const;
  350   bool IsOrdinaryNonTypeName(const NamedDecl *ND) const;
  351   bool IsIntegralConstantValue(const NamedDecl *ND) const;
  352   bool IsOrdinaryNonValueName(const NamedDecl *ND) const;
  353   bool IsNestedNameSpecifier(const NamedDecl *ND) const;
  354   bool IsEnum(const NamedDecl *ND) const;
  355   bool IsClassOrStruct(const NamedDecl *ND) const;
  356   bool IsUnion(const NamedDecl *ND) const;
  357   bool IsNamespace(const NamedDecl *ND) const;
  358   bool IsNamespaceOrAlias(const NamedDecl *ND) const;
  359   bool IsType(const NamedDecl *ND) const;
  360   bool IsMember(const NamedDecl *ND) const;
  361   bool IsObjCIvar(const NamedDecl *ND) const;
  362   bool IsObjCMessageReceiver(const NamedDecl *ND) const;
  363   bool IsObjCMessageReceiverOrLambdaCapture(const NamedDecl *ND) const;
  364   bool IsObjCCollection(const NamedDecl *ND) const;
  365   bool IsImpossibleToSatisfy(const NamedDecl *ND) const;
  567   llvm::PointerUnion<const NamedDecl *, const DeclIndexPair *> DeclOrIterator;
  587   iterator(const NamedDecl *SingleDecl, unsigned Index)
  594     if (DeclOrIterator.is<const NamedDecl *>()) {
  613     if (const NamedDecl *ND = DeclOrIterator.dyn_cast<const NamedDecl *>())
  613     if (const NamedDecl *ND = DeclOrIterator.dyn_cast<const NamedDecl *>())
  637   if (const NamedDecl *ND = DeclOrVector.dyn_cast<const NamedDecl *>())
  637   if (const NamedDecl *ND = DeclOrVector.dyn_cast<const NamedDecl *>())
  645   if (DeclOrVector.is<const NamedDecl *>() || DeclOrVector.isNull())
  710 static bool shouldIgnoreDueToReservedName(const NamedDecl *ND, Sema &SemaRef) {
  730 bool ResultBuilder::isInterestingDecl(const NamedDecl *ND,
  782                                       const NamedDecl *Hiding) {
  880 QualType clang::getDeclUsageType(ASTContext &C, const NamedDecl *ND) {
  937 unsigned ResultBuilder::getBasePriority(const NamedDecl *ND) {
 1025   const NamedDecl *D = R.Declaration;
 1042   for (NamedDecl *Ctor : getConstructors(SemaRef.Context, Record)) {
 1094     const NamedDecl *ND = I->first;
 1230                               NamedDecl *Hiding, bool InBaseClass = false) {
 1368 bool ResultBuilder::IsOrdinaryName(const NamedDecl *ND) const {
 1386 bool ResultBuilder::IsOrdinaryNonTypeName(const NamedDecl *ND) const {
 1409 bool ResultBuilder::IsIntegralConstantValue(const NamedDecl *ND) const {
 1422 bool ResultBuilder::IsOrdinaryNonValueName(const NamedDecl *ND) const {
 1435 bool ResultBuilder::IsNestedNameSpecifier(const NamedDecl *ND) const {
 1444 bool ResultBuilder::IsEnum(const NamedDecl *ND) const {
 1449 bool ResultBuilder::IsClassOrStruct(const NamedDecl *ND) const {
 1463 bool ResultBuilder::IsUnion(const NamedDecl *ND) const {
 1475 bool ResultBuilder::IsNamespace(const NamedDecl *ND) const {
 1481 bool ResultBuilder::IsNamespaceOrAlias(const NamedDecl *ND) const {
 1486 bool ResultBuilder::IsType(const NamedDecl *ND) const {
 1494 bool ResultBuilder::IsMember(const NamedDecl *ND) const {
 1533 bool ResultBuilder::IsObjCMessageReceiver(const NamedDecl *ND) const {
 1543     const NamedDecl *ND) const {
 1554 bool ResultBuilder::IsObjCCollection(const NamedDecl *ND) const {
 1569 bool ResultBuilder::IsImpossibleToSatisfy(const NamedDecl *ND) const {
 1575 bool ResultBuilder::IsObjCIvar(const NamedDecl *ND) const {
 1613   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
 1613   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
 1625   bool IsAccessible(NamedDecl *ND, DeclContext *Ctx) {
 2591                                const NamedDecl *ND, QualType BaseType,
 2637                              const NamedDecl *FunctionOrMethod,
 2733 formatBlockPlaceholder(const PrintingPolicy &Policy, const NamedDecl *BlockDecl,
 2833 formatBlockPlaceholder(const PrintingPolicy &Policy, const NamedDecl *BlockDecl,
 3109                               const NamedDecl *ND,
 3334   const NamedDecl *ND = Declaration;
 3386         NamedDecl *Param = FunTmpl->getTemplateParameters()->getParam(
 3531                                               const NamedDecl *ND) {
 3549                                                      const NamedDecl *ND) {
 4442                              const NamedDecl *BD,
 5218   for (NamedDecl *C : LookupConstructors(RD)) {
 5636     for (const NamedDecl *Ctor : Ctors) {
 6661     NamedDecl *ND = LookupSingleName(S, Super, SuperLoc, LookupOrdinaryName);
 7177   NamedDecl *CurClass =
 7224   NamedDecl *CurClass =
 7255   NamedDecl *CurClass =
tools/clang/lib/Sema/SemaCoroutine.cpp
  163     NamedDecl *Found = *Result.begin();
  919     NamedDecl *Found = *Result.begin();
 1584         NamedDecl *Found = *Result.begin();
tools/clang/lib/Sema/SemaDecl.cpp
   78     if (NamedDecl *ND = candidate.getCorrectionDecl()) {
  211       for (NamedDecl *ND : BaseRD->lookup(&II)) {
  370   NamedDecl *IIDecl = nullptr;
  887       return NameClassification::NonType(cast<NamedDecl>(Ivar.get()));
  920       if (NamedDecl *D = ImplicitlyDefineFunction(NameLoc, *Name, S))
  952         NamedDecl *FirstDecl = Corrected.getFoundDecl();
  953         NamedDecl *UnderlyingFirstDecl = Corrected.getCorrectionDecl();
 1121   NamedDecl *FirstDecl = (*Result.begin())->getUnderlyingDecl();
 1214                                               NamedDecl *Found,
 1422 void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) {
 1482 bool Sema::isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S,
 1498 static bool isOutOfScopePreviousDeclaration(NamedDecl *,
 1509     NamedDecl *D = F.next();
 1525 bool Sema::CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old) {
 1525 bool Sema::CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old) {
 1568 static bool isUsingDecl(NamedDecl *D) {
 1718 static bool ShouldDiagnoseUnusedDecl(const NamedDecl *D) {
 1815 static void GenerateFixForUnusedDecl(const NamedDecl *D, ASTContext &Ctx,
 1842 void Sema::DiagnoseUnusedDecl(const NamedDecl *D) {
 1892     NamedDecl *D = cast<NamedDecl>(TmpD);
 1892     NamedDecl *D = cast<NamedDecl>(TmpD);
 1940   NamedDecl *IDecl = LookupSingleName(TUScope, Id, IdLoc, LookupOrdinaryName);
 2031 NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
 2142     NamedDecl *Old = Filter.next();
 2260     NamedDecl *OldD = OldDecls.getRepresentativeDecl();
 2274     NamedDecl *Hidden = nullptr;
 2411 static bool mergeAlignedAttrs(Sema &S, NamedDecl *New, Decl *Old) {
 2518 static bool mergeDeclAttribute(Sema &S, NamedDecl *D,
 2598 static const NamedDecl *getDefinition(const Decl *D) {
 2625   const NamedDecl *Def = getDefinition(Old);
 2770 void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old,
 3157 bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD,
 4197 void Sema::notePreviousDefinition(const NamedDecl *Old, SourceLocation New) {
 4663   NamedDecl *PrevDecl = R.getRepresentativeDecl()->getUnderlyingDecl();
 4695                                     SmallVectorImpl<NamedDecl *> &Chaining) {
 4701         cast<NamedDecl>(D)->getDeclName()) {
 4724         NamedDecl **NamedChain =
 4725           new (SemaRef.Context)NamedDecl*[Chaining.size()];
 5005   NamedDecl *Anon = nullptr;
 5049   SmallVector<NamedDecl*, 2> Chain;
 5102   NamedDecl *Anon =
 5115   SmallVector<NamedDecl*, 2> Chain;
 5477       << Name << cast<NamedDecl>(Cur) << cast<NamedDecl>(DC) << SS.getRange();
 5477       << Name << cast<NamedDecl>(Cur) << cast<NamedDecl>(DC) << SS.getRange();
 5514 NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D,
 5694   NamedDecl *New;
 5852 Sema::RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S) {
 5862 NamedDecl *Sema::findLocallyScopedExternCDecl(DeclarationName Name) {
 5886 NamedDecl*
 5928   NamedDecl *ND = ActOnTypedefNameDecl(S, DC, NewTD, Previous, Redeclaration);
 5973 NamedDecl*
 5978   NamedDecl *ShadowedDecl = getShadowedDeclaration(NewTD, Previous);
 6031 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC,
 6120 static void checkAttributesAfterMerging(Sema &S, NamedDecl &ND) {
 6222 static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl,
 6223                                            NamedDecl *NewDecl,
 6478 NamedDecl *Sema::ActOnVariableDeclarator(
 7036   NamedDecl *ShadowedDecl = D.getCXXScopeSpec().isEmpty()
 7156     NamedDecl *Prev = Previous.getRepresentativeDecl();
 7185 static ShadowedDeclKind computeShadowedDeclKind(const NamedDecl *ShadowedDecl,
 7220 NamedDecl *Sema::getShadowedDeclaration(const VarDecl *D,
 7229   NamedDecl *ShadowedDecl = R.getFoundDecl();
 7237 NamedDecl *Sema::getShadowedDeclaration(const TypedefNameDecl *D,
 7246   NamedDecl *ShadowedDecl = R.getFoundDecl();
 7259 void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
 7259 void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
 7389   if (NamedDecl *ShadowedDecl = getShadowedDeclaration(D, R))
 7403   const NamedDecl *D = cast<NamedDecl>(DRE->getDecl()->getCanonicalDecl());
 7403   const NamedDecl *D = cast<NamedDecl>(DRE->getDecl()->getCanonicalDecl());
 7407   const NamedDecl *ShadowedDecl = I->second;
 7423   NamedDecl *Prev = S.findLocallyScopedExternCDecl(ND->getDeclName());
 7510       if (NamedDecl *Prev = S.findLocallyScopedExternCDecl(ND->getDeclName())) {
 7821       NamedDecl *D = Path.Decls.front();
 7867     for (auto *I : Paths.found_decls()) {
 7951 void Sema::MarkTypoCorrectedFunctionDefinition(const NamedDecl *F) {
 7964 static NamedDecl *DiagnoseInvalidRedeclaration(
 8026     NamedDecl *Result;
 8563 NamedDecl*
 8971       for (NamedDecl *NonParmDecl : FTI.getDeclsInPrototype()) {
 9252     NamedDecl *PrincipalDecl = (FunctionTemplate
 9253                                 ? cast<NamedDecl>(FunctionTemplate)
 9332           if (NamedDecl *Result = DiagnoseInvalidRedeclaration(
 9342         if (NamedDecl *Result = DiagnoseInvalidRedeclaration(
 9410     NamedDecl *Prev = Previous.getRepresentativeDecl();
 9916     bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious,
10002     bool &Redeclaration, NamedDecl *&OldDecl, bool &MergeTypeWithPrevious,
10028   for (NamedDecl *ND : Previous) {
10152                                       bool &Redeclaration, NamedDecl *&OldDecl,
10248   NamedDecl *OldDecl = nullptr;
10259       NamedDecl *Candidate = Previous.getRepresentativeDecl();
13035       NamedDecl *PrevDecl = R.getFoundDecl();
13118     ArrayRef<ParmVarDecl *> Parameters, QualType ReturnTy, NamedDecl *D) {
13580       auto *NonParmDecl = dyn_cast<NamedDecl>(NPD);
13580       auto *NonParmDecl = dyn_cast<NamedDecl>(NPD);
14093 NamedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc,
14113   NamedDecl *ExternCPrev = findLocallyScopedExternCDecl(&II);
14633 static FixItHint createFriendTagNNSFixIt(Sema &SemaRef, NamedDecl *ND, Scope *S,
14648     NamedDecl *Lookup = SemaRef.LookupSingleName(
14932         NamedDecl *ND = F.next();
14958         NamedDecl *ND = F.next();
14973         NamedDecl *ND = Previous.getFoundDecl();
15090     NamedDecl *PrevDecl = Previous.getFoundDecl();
15091     NamedDecl *DirectPrevDecl = Previous.getRepresentativeDecl();
15242             if (NamedDecl *Def = PrevTagDecl->getDefinition()) {
15262               NamedDecl *Hidden = nullptr;
15911   NamedDecl *PrevDecl = nullptr;
15918       PrevDecl = Previous.getAsSingle<NamedDecl>();
15982                                 AccessSpecifier AS, NamedDecl *PrevDecl,
16002       NamedDecl *Def;
16325     NamedDecl *PrevDecl = LookupSingleName(S, II, Loc, LookupMemberName,
17079   NamedDecl *PrevDecl = LookupSingleName(S, II, IILoc, LookupOrdinaryName,
17086   NamedDecl *Hidden;
17112   NamedDecl *PrevDecl = R.getAsSingle<NamedDecl>();
17112   NamedDecl *PrevDecl = R.getAsSingle<NamedDecl>();
17600   NamedDecl *PrevDecl = LookupSingleName(TUScope, Name, NameLoc,
17647       if (NamedDecl *ND = dyn_cast<NamedDecl>(PrevDecl))
17647       if (NamedDecl *ND = dyn_cast<NamedDecl>(PrevDecl))
tools/clang/lib/Sema/SemaDeclAttr.cpp
 1069       S.Context, AL, Cond, Msg, DiagType, ArgDependent, cast<NamedDecl>(D)));
 1759         << cast<NamedDecl>(D);
 1846       for (NamedDecl *ND : LR)
 2196     NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform,
 2360   auto *ND = dyn_cast<NamedDecl>(D);
 2360   auto *ND = dyn_cast<NamedDecl>(D);
 5572           cast<NamedDecl>(D)->getDeclName().getCXXOverloadedOperator())) {
 7217         << cast<NamedDecl>(D);
 7332 NamedDecl * Sema::DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II,
 7332 NamedDecl * Sema::DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II,
 7335   NamedDecl *NewD = nullptr;
 7376 void Sema::DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, WeakInfo &W) {
 7381     NamedDecl *NewD = DeclClonePragmaWeak(ND, W.getAlias(), W.getLocation());
 7406     NamedDecl *ND = nullptr;
 7548 static std::pair<AvailabilityResult, const NamedDecl *>
 7549 ShouldDiagnoseAvailabilityOfDecl(Sema &S, const NamedDecl *D,
 7608                                     const NamedDecl *OffendingDecl) {
 7689 static NamedDecl *findEnclosingDeclToAnnotate(Decl *OrigCtx) {
 7693       return cast<NamedDecl>(Ctx);
 7701   return dyn_cast<NamedDecl>(OrigCtx);
 7711   static AttributeInsertion createInsertionAfter(const NamedDecl *D) {
 7717   static AttributeInsertion createInsertionBefore(const NamedDecl *D) {
 7766 createAttributeInsertion(const NamedDecl *D, const SourceManager &SM,
 7797                                       Decl *Ctx, const NamedDecl *ReferringDecl,
 7798                                       const NamedDecl *OffendingDecl,
 7869     if (const auto *Enclosing = findEnclosingDeclToAnnotate(Ctx)) {
 8105                                     const NamedDecl *ReferringDecl,
 8106                                     const NamedDecl *OffendingDecl,
 8209   void DiagnoseDeclAvailability(NamedDecl *D, SourceRange Range,
 8286     NamedDecl *D, SourceRange Range, ObjCInterfaceDecl *ReceiverClass) {
 8288   const NamedDecl *OffendingDecl;
 8422     if (NamedDecl *D = ObjCO->getInterface())
 8472 void Sema::DiagnoseAvailabilityOfDecl(NamedDecl *D,
 8480   const NamedDecl* OffendingDecl;
tools/clang/lib/Sema/SemaDeclCXX.cpp
   87     NamedDecl *Decl = DRE->getDecl();
  686 NamedDecl *
  839       auto *Old = Previous.getRepresentativeDecl();
  859   NamedDecl *New =
  989     NamedDecl *Found = *Result.begin();
 1145     for (NamedDecl *D : MemberGet) {
 2961 void Sema::CheckOverrideControl(NamedDecl *D) {
 3029 void Sema::DiagnoseAbsenceOfOverrideControl(NamedDecl *D) {
 3099   std::map<CXXRecordDecl*, NamedDecl*> Bases;
 3146 NamedDecl *
 3281   NamedDecl *Member;
 3377     NamedDecl *NonTemplateMember = Member;
 4010     if (NamedDecl *ND = candidate.getCorrectionDecl()) {
 4827     for (auto *C : Indirect->chain()) {
 4983         for (auto *C : F->chain()) {
 5262 typedef std::pair<NamedDecl *, CXXCtorInitializer *> UnionEntry;
 5270   NamedDecl *Child = Field;
 5605   void CheckType(const NamedDecl *D, TypeLoc TL, Sema::AbstractDiagSelID Sel);
 5610   const NamedDecl *Ctx;
 5612   CheckAbstractUsage(AbstractUsageInfo &Info, const NamedDecl *Ctx)
 5695 void AbstractUsageInfo::CheckType(const NamedDecl *D, TypeLoc TL,
 5981     if (!cast<NamedDecl>(Member)->isExternallyVisible())
 6339       NamedDecl *D = (*I)->getUnderlyingDecl();
 8218       NamedDecl *D = Path.Decls.front();
 8280     NamedDecl *ND = *I;
 8507     for (NamedDecl *Param : *Params) {
 9286       if (auto *ND = dyn_cast<NamedDecl>(I))
 9286       if (auto *ND = dyn_cast<NamedDecl>(I))
 9334     NamedDecl *PrevDecl =
 9450 static inline NamespaceDecl *getNamespaceDecl(NamedDecl *D) {
 9722     NamedDecl *Found = *Result.begin();
 9790     if (NamedDecl *ND = candidate.getCorrectionDecl())
 9870     NamedDecl *Named = R.getRepresentativeDecl();
 9999   NamedDecl *UD =
10013 IsEquivalentForUsingDecl(ASTContext &Context, NamedDecl *D1, NamedDecl *D2) {
10013 IsEquivalentForUsingDecl(ASTContext &Context, NamedDecl *D1, NamedDecl *D2) {
10028 bool Sema::CheckUsingShadowDecl(UsingDecl *Using, NamedDecl *Orig,
10082   NamedDecl *Target = Orig;
10091   NamedDecl *NonTag = nullptr, *Tag = nullptr;
10095     NamedDecl *D = (*I)->getUnderlyingDecl();
10133     NamedDecl *OldDecl = nullptr;
10198                                             NamedDecl *Orig,
10201   NamedDecl *Target = Orig;
10207   NamedDecl *NonTemplateTarget = Target;
10314     NamedDecl *ND = Candidate.getCorrectionDecl();
10392 NamedDecl *Sema::BuildUsingDeclaration(
10422       NamedDecl *D = F.next();
10466   NamedDecl *D;
10548       NamedDecl *ND = Corrected.getCorrectionDecl();
10572         for (auto *Ctor : LookupConstructors(RD))
10650 NamedDecl *Sema::BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
10650 NamedDecl *Sema::BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
10651                                     ArrayRef<NamedDecl *> Expansions) {
10715       for (auto *D : Prev) {
10732     NamedDecl *D = *I;
11021   NamedDecl *NewND;
11048         NamedDecl *OldD = Previous.getRepresentativeDecl();
11136   NamedDecl *ND = R.getRepresentativeDecl();
11156     NamedDecl *PrevDecl = PrevR.getRepresentativeDecl();
11405   for (auto *D : FD->getParent()->lookup(Name))
11406     if (auto *Acceptable = R.getAcceptableDecl(D))
11555   for (NamedDecl *Ctor : Derived->lookup(Name))
12141         NamedDecl *D = F.next();
13417                             NamedDecl *FoundDecl,
13455                             NamedDecl *FoundDecl,
14398   if (NamedDecl *PrevDecl = LookupSingleName(S, II, D.getIdentifierLoc(),
14818 NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D,
15067   NamedDecl *ND = ActOnFunctionDeclarator(DCScope, D, DC, TInfo, Previous,
16181   NamedDecl *PrevDecl = nullptr;
16188     PrevDecl = Previous.getAsSingle<NamedDecl>();
tools/clang/lib/Sema/SemaDeclObjC.cpp
  281 static void DiagnoseObjCImplementedDeprecations(Sema &S, const NamedDecl *ND,
  551   NamedDecl *PrevDecl = LookupSingleName(TUScope, SuperName, SuperLoc,
  589           if (NamedDecl *IDecl = T->castAs<ObjCObjectType>()->getInterface()) {
  986   NamedDecl *PrevDecl =
 1111   NamedDecl* IDecl = LookupSingleName(TUScope, SuperName, SuperLoc,
 1138   NamedDecl *ADecl =
 1147   NamedDecl *CDeclU =
 1154       if (NamedDecl *IDecl = T->castAs<ObjCObjectType>()->getInterface()) {
 1475         if (auto *decl = LookupSingleName(S, identifiers[i], identifierLocs[i],
 1538     NamedDecl *decl = LookupSingleName(S, identifiers[i], identifierLocs[i],
 1967   NamedDecl *PrevDecl
 2209                                 NamedDecl *NeededFor = nullptr) {
 3038     NamedDecl *PrevDecl
 4034           NamedDecl *IF = LookupSingleName(TUScope,
 4600       NamedDecl *PrevDecl = R.getFoundDecl();
tools/clang/lib/Sema/SemaExpr.cpp
   53 bool Sema::CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid) {
   84 static void DiagnoseUnusedOfDecl(Sema &S, NamedDecl *D, SourceLocation Loc) {
  145                                                       const NamedDecl *D,
  211 bool Sema::DiagnoseUseOfDecl(NamedDecl *D, ArrayRef<SourceLocation> Locs,
  340 void Sema::DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc,
  520           NamedDecl *ObjectSetClass =
  536           NamedDecl *ObjectGetClass =
  596     NamedDecl *ObjectGetClass = LookupSingleName(TUScope,
 1781                        const CXXScopeSpec *SS, NamedDecl *FoundD,
 1816                        NestedNameSpecifierLoc NNS, NamedDecl *FoundD,
 1974         for (NamedDecl *D : R)
 2021     NamedDecl *ND = Corrected.getFoundDecl();
 2027         for (NamedDecl *CD : Corrected) {
 2062       auto *UnderlyingND = ND->getUnderlyingDecl();
 2265     NamedDecl *D = ImplicitlyDefineFunction(NameLoc, *II, S);
 2834   for (NamedDecl *D : R) {
 2875 static bool CheckDeclInExpr(Sema &S, SourceLocation Loc, NamedDecl *D) {
 4993     if (NamedDecl *ND = Corrected.getFoundDecl()) {
 4997         for (NamedDecl *CD : Corrected) {
 5704   NamedDecl *NDecl = nullptr;
 8710   NamedDecl *Conversion;
12721 static NamedDecl *getDeclFromExpr(Expr *E) {
13029     NamedDecl *ObjectSetClass = LookupSingleName(TUScope,
13695     for (NamedDecl *D : ULE->decls()) {
14003       for (auto *FI : IndirectMemberDecl->chain()) {
17826   NamedDecl *d;
17985       NamedDecl *ND = Result.getFoundDecl();
tools/clang/lib/Sema/SemaExprCXX.cpp
  108   for (NamedDecl *ND : CurClass->lookup(&II)) {
 2232     NamedDecl *D = (*Alloc)->getUnderlyingDecl();
 2949       for (NamedDecl *D : Found)
 3465     NamedDecl *D = (*FnOvl)->getUnderlyingDecl();
 4817       for (const auto *ND : Self.LookupConstructors(RD)) {
 4858       for (const auto *ND : Self.LookupConstructors(RD)) {
 7554   if (auto *ND = TC.getFoundDecl()) {
 7644         if (auto *ND = getDeclFromExpr(
 7674   NamedDecl *getDeclFromExpr(Expr *E) {
tools/clang/lib/Sema/SemaExprMember.cpp
  104   for (NamedDecl *D : R) {
  198                                       NamedDecl *Rep,
  484                                NamedDecl *FirstQualifierInScope,
  526                                              NamedDecl *rep,
  607     NamedDecl *ND = candidate.getCorrectionDecl();
  725         for (NamedDecl *ND : TC)
  748                                NamedDecl *FirstQualifierInScope,
  964                                NamedDecl *FirstQualifierInScope,
 1076   NamedDecl *MemberDecl = R.getFoundDecl();
 1712   NamedDecl *FirstQualifierInScope
tools/clang/lib/Sema/SemaExprObjC.cpp
  101     NamedDecl *IF = LookupSingleName(TUScope, NSIdent, AtLoc,
  116     NamedDecl *IF = LookupSingleName(TUScope, NSIdent, AtLoc,
  222   NamedDecl *IF = S.LookupSingleName(S.TUScope, II, Loc,
 1952       NamedDecl *ChosenDecl =
 2176     NamedDecl *ND = Result.getFoundDecl();
 3814         NamedDecl *Target = nullptr;
 3880         NamedDecl *Target = nullptr;
 4041   NamedDecl *Target = nullptr;
tools/clang/lib/Sema/SemaInit.cpp
 2498       for (NamedDecl *ND : Lookup) {
 3875   for (NamedDecl *D : Ctors) {
 3943         NamedDecl *D = *I;
 4504     for (NamedDecl *D : S.LookupConstructors(T1RecordDecl)) {
 4537       NamedDecl *D = *I;
 5154       for (NamedDecl *D : S.LookupConstructors(DestRecordDecl)) {
 5192         NamedDecl *D = *I;
 9749       NamedDecl *D = (*I)->getUnderlyingDecl();
 9823       for (NamedDecl *D : Guides) {
tools/clang/lib/Sema/SemaLambda.cpp
  521                                                     ArrayRef<NamedDecl *> TParams,
 1627       NamedDecl *Def;
tools/clang/lib/Sema/SemaLookup.cpp
  366                                     NamedDecl *D, NamedDecl *Existing) {
  366                                     NamedDecl *D, NamedDecl *Existing) {
  373   auto *DUnderlying = D->getUnderlyingDecl();
  374   auto *EUnderlying = Existing->getUnderlyingDecl();
  455 static bool canHideTag(NamedDecl *D) {
  488     NamedDecl *D = (*Decls.begin())->getUnderlyingDecl();
  499   llvm::SmallDenseMap<NamedDecl*, unsigned, 16> Unique;
  505   NamedDecl *HasNonFunction = nullptr;
  507   llvm::SmallVector<NamedDecl*, 4> EquivalentNonFunctions;
  513     NamedDecl *D = Decls[I]->getUnderlyingDecl();
  514     D = cast<NamedDecl>(D->getCanonicalDecl());
  603     NamedDecl *OtherDecl = Decls[UniqueTagIndex ? 0 : N - 1];
  672   for (NamedDecl *D : *this)
  867         if (NamedDecl *D = LazilyCreateBuiltin((IdentifierInfo *)II,
 1009   for (NamedDecl *D : DR) {
 1269       if (NamedDecl *ND = R.getAcceptableDecl(*I)) {
 1349                   if (NamedDecl *ND = R.getAcceptableDecl(Ivar)) {
 1438       if (NamedDecl *ND = R.getAcceptableDecl(*I)) {
 1508 void Sema::makeMergedDefinitionVisible(NamedDecl *ND) {
 1518     for (auto *Param : *TD->getTemplateParameters())
 1569 bool Sema::hasVisibleMergedDefinition(NamedDecl *Def) {
 1576 bool Sema::hasMergedDefinitionInCurrentModule(NamedDecl *Def) {
 1606 bool Sema::hasVisibleDefaultArgument(const NamedDecl *D,
 1617 static bool hasVisibleDeclarationImpl(Sema &S, const NamedDecl *D,
 1623     auto *R = cast<NamedDecl>(Redecl);
 1623     auto *R = cast<NamedDecl>(Redecl);
 1644     const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules) {
 1657     const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules) {
 1680 bool LookupResult::isVisibleSlow(Sema &SemaRef, NamedDecl *D) {
 1720         VisibleWithinParent = SemaRef.hasVisibleDefinition(cast<NamedDecl>(DC));
 1722         VisibleWithinParent = isVisible(SemaRef, cast<NamedDecl>(DC));
 1725       VisibleWithinParent = isVisible(SemaRef, cast<NamedDecl>(DC));
 1731         if (SemaRef.hasMergedDefinitionInCurrentModule(cast<NamedDecl>(DC))) {
 1738       VisibleWithinParent = SemaRef.hasVisibleDefinition(cast<NamedDecl>(DC));
 1788 bool Sema::isVisibleSlow(const NamedDecl *D) {
 1792 bool Sema::shouldLinkPossiblyHiddenDecl(LookupResult &R, const NamedDecl *New) {
 1802   for (auto *D : R) {
 1836 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D,
 1836 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D,
 1845     auto ND = cast<NamedDecl>(RD);
 1857 bool Sema::hasVisibleDeclarationSlow(const NamedDecl *D,
 1864 NamedDecl *LookupResult::getAcceptableDeclSlow(NamedDecl *D) const {
 1864 NamedDecl *LookupResult::getAcceptableDeclSlow(NamedDecl *D) const {
 1873     if (auto *Acceptable = getSema().VisibleNamespaceCache.lookup(Key))
 1875     auto *Acceptable = isVisible(getSema(), Key)
 1942       if (NamedDecl *D = R.getAcceptableDecl(*I)) {
 1996             if (NamedDecl *LastD = R.getAcceptableDecl(*LastI))
 2363             if (auto *TD = getAsTemplateNameDecl(D))
 2406   for (auto *D : Paths.front().Decls) {
 2579     llvm::SmallPtrSet<NamedDecl*, 8> TagDecls;
 2581     for (auto *D : Result)
 2587     for (auto *D : Result)
 2604     for (auto *D : Result)
 3010     for (const NamedDecl *D : OE->decls()) {
 3021 NamedDecl *Sema::LookupSingleName(Scope *S, DeclarationName Name,
 3027   return R.getAsSingle<NamedDecl>();
 3212   SmallVector<NamedDecl *, 8> Candidates(R.begin(), R.end());
 3214   for (NamedDecl *CandDecl : Candidates) {
 3493 void ADLResult::insert(NamedDecl *New) {
 3494   NamedDecl *&Old = Decls[cast<NamedDecl>(New->getCanonicalDecl())];
 3494   NamedDecl *&Old = Decls[cast<NamedDecl>(New->getCanonicalDecl())];
 3558     for (auto *D : R) {
 3559       auto *Underlying = D;
 3572            D = cast_or_null<NamedDecl>(D->getPreviousDecl())) {
 3610   typedef llvm::TinyPtrVector<NamedDecl*> ShadowMapEntry;
 3641   NamedDecl *checkHidden(NamedDecl *ND);
 3641   NamedDecl *checkHidden(NamedDecl *ND);
 3644   void add(NamedDecl *ND) {
 3667 NamedDecl *VisibleDeclsRecord::checkHidden(NamedDecl *ND) {
 3667 NamedDecl *VisibleDeclsRecord::checkHidden(NamedDecl *ND) {
 3676     for (auto *D : Pos->second) {
 3789             if (NamedDecl *ND = Result.getAcceptableDecl(*I)) {
 3810       for (auto *D : R) {
 3811         if (auto *ND = Result.getAcceptableDecl(D)) {
 3955         if (NamedDecl *ND = dyn_cast<NamedDecl>(D))
 3955         if (NamedDecl *ND = dyn_cast<NamedDecl>(D))
 4061   NamedDecl *Res = nullptr;
 4121   llvm::SmallVector<NamedDecl*, 4> NewDecls(TC.begin(), DI);
 4186 void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
 4186 void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
 4219 void TypoCorrectionConsumer::addName(StringRef Name, NamedDecl *ND,
 4265   if (NamedDecl *NewND = Correction.getCorrectionDecl()) {
 4381     for (auto *TRD : Result)
 4551   } else if (NamedDecl *ND =
 4552                  dyn_cast_or_null<NamedDecl>(NamespaceDeclChain.back())) {
 5141 void TypoCorrection::addCorrectionDecl(NamedDecl *CDecl) {
 5213   for (auto *C : candidate) {
 5215     NamedDecl *ND = C->getUnderlyingDecl();
 5278 static NamedDecl *getDefinitionToImport(NamedDecl *D) {
 5278 static NamedDecl *getDefinitionToImport(NamedDecl *D) {
 5293     if (NamedDecl *TTD = TD->getTemplatedDecl())
 5298 void Sema::diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl,
 5302   NamedDecl *Def = getDefinitionToImport(Decl);
 5329 void Sema::diagnoseMissingImport(SourceLocation UseLoc, NamedDecl *Decl,
 5454     NamedDecl *Decl = Correction.getFoundDecl();
 5465   NamedDecl *ChosenDecl =
tools/clang/lib/Sema/SemaModule.cpp
  650   if (auto *ND = dyn_cast<NamedDecl>(D)) {
  650   if (auto *ND = dyn_cast<NamedDecl>(D)) {
  664     NamedDecl *Target = USD->getUnderlyingDecl();
tools/clang/lib/Sema/SemaOpenMP.cpp
 2217     NamedDecl *ND = Candidate.getCorrectionDecl();
 2239     NamedDecl *ND = Candidate.getCorrectionDecl();
 2304   NamedDecl *ND = CanonicalVD;
12719     for (auto *D : Set) {
12727 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D) {
12727 static NamedDecl *findAcceptableDecl(Sema &SemaRef, NamedDecl *D) {
12735     auto ND = cast<NamedDecl>(RD);
12779     for (auto *D : R) {
12780       auto *Underlying = D;
12813       NamedDecl *D = Lookup.getRepresentativeDecl();
12827     for (NamedDecl *D : ULE->decls()) {
14518   NamedDecl *ND;
15134       NamedDecl *D = Lookup.getRepresentativeDecl();
15146     for (NamedDecl *D : ULE->decls()) {
16174 NamedDecl *
16200   NamedDecl *ND = Lookup.getAsSingle<NamedDecl>();
16200   NamedDecl *ND = Lookup.getAsSingle<NamedDecl>();
16206   if (!SameDirectiveDecls.insert(cast<NamedDecl>(ND->getCanonicalDecl())))
16212     NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT,
tools/clang/lib/Sema/SemaOverload.cpp
   49 CreateFunctionRefExpr(Sema &S, FunctionDecl *Fn, NamedDecl *FoundDecl,
  995                     NamedDecl *&Match, bool NewIsUsingDecl) {
  998     NamedDecl *OldD = *I;
 3262   for (auto *D : S.LookupConstructors(To)) {
 3385       for (auto *D : S.LookupConstructors(ToRecordDecl)) {
 3437         NamedDecl *D = FoundDecl.getDecl();
 4477     NamedDecl *D = *I;
 5295                                           NamedDecl *FoundDecl,
 5810     NamedDecl *D = FoundDecl.getDecl();
 5915     NamedDecl *D = (*I)->getUnderlyingDecl();
 6492 static bool diagnoseDiagnoseIfAttrsWith(Sema &S, const NamedDecl *ND,
 6549 bool Sema::diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND,
 6570     NamedDecl *D = F.getDecl()->getUnderlyingDecl();
 6638   NamedDecl *Decl = FoundDecl.getDecl();
 7385     NamedDecl *D = F.getDecl()->getUnderlyingDecl();
 7802     for (NamedDecl *D : ClassDecl->getVisibleConversionFunctions()) {
 7874     for (NamedDecl *D : ClassDecl->getVisibleConversionFunctions()) {
 9522 bool Sema::isEquivalentInternalLinkageDeclaration(const NamedDecl *A,
 9523                                                   const NamedDecl *B) {
 9568     SourceLocation Loc, const NamedDecl *D, ArrayRef<const NamedDecl *> Equiv) {
 9568     SourceLocation Loc, const NamedDecl *D, ArrayRef<const NamedDecl *> Equiv) {
 9640   llvm::SmallVector<const NamedDecl *, 4> EquivalentCands;
 9702 ClassifyOverloadCandidate(Sema &S, NamedDecl *Found, FunctionDecl *Fn,
 9846 void Sema::NoteOverloadCandidate(NamedDecl *Found, FunctionDecl *Fn,
10176 static void DiagnoseArityMismatch(Sema &S, NamedDecl *Found, Decl *D,
10237 static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated,
10242   NamedDecl *ParamD;
11475   bool AddMatchingNonTemplateFunction(NamedDecl* Fn,
11533       NamedDecl *Fn = (*I)->getUnderlyingDecl();
11984   NamedDecl *Callee = FoundDecl.getDecl();
13405       NamedDecl *Func = *I;
13648     NamedDecl *D = *I;
tools/clang/lib/Sema/SemaPseudoObject.cpp
 1090   for (NamedDecl *D : cast<CXXRecordDecl>(RecordTy->getDecl())
tools/clang/lib/Sema/SemaStmt.cpp
 2275           for (NamedDecl *D : OldFound) {
 3656         NamedDecl *CurDecl = getCurFunctionOrMethodDecl();
 3675           NamedDecl *CurDecl = getCurFunctionOrMethodDecl();
 3693           NamedDecl *CurDecl = getCurFunctionOrMethodDecl();
 3701           NamedDecl *CurDecl = getCurFunctionOrMethodDecl();
tools/clang/lib/Sema/SemaStmtAsm.cpp
  772   NamedDecl *FoundDecl = nullptr;
tools/clang/lib/Sema/SemaTemplate.cpp
   55 NamedDecl *Sema::getAsTemplateNameDecl(NamedDecl *D,
   55 NamedDecl *Sema::getAsTemplateNameDecl(NamedDecl *D,
  106     NamedDecl *Orig = filter.next();
  181   NamedDecl *D = nullptr;
  186     for (NamedDecl *FoundD : R) {
  187       if (NamedDecl *FoundTemplate = getAsTemplateNameDecl(FoundD)) {
  468       if (auto *ND = Corrected.getFoundDecl())
  489   NamedDecl *ExampleLookupResult =
  528     NamedDecl *OuterTemplate;
  576   NamedDecl *Found = nullptr;
  623       if (auto *ND = Candidate.getCorrectionDecl())
  637     auto *ND = Corrected.getFoundDecl();
  703     NamedDecl *FirstQualifierInScope = nullptr;
  732                                           NamedDecl *Instantiation,
  734                                           const NamedDecl *Pattern,
  735                                           const NamedDecl *PatternDef,
  746     NamedDecl *SuggestedDef = nullptr;
  840   Diag(Loc, DiagId) << cast<NamedDecl>(PrevDecl)->getDeclName();
  913   NamedDecl *PrevDecl = SemaRef.LookupSingleName(
  978 NamedDecl *Sema::ActOnTypeParameter(Scope *S, bool Typename,
 1113 NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
 1248 NamedDecl *Sema::ActOnTemplateTemplateParameter(Scope* S,
 1333                                  ArrayRef<NamedDecl *> Params,
 1429   NamedDecl *PrevDecl = nullptr;
 1548         NamedDecl *Hidden = nullptr;
 1760   NamedDecl *transformConstructor(FunctionTemplateDecl *FTD,
 1776       SmallVector<NamedDecl *, 16> AllParams;
 1784       for (NamedDecl *Param : *InnerParams) {
 1788         NamedDecl *NewParam = transformTemplateParameter(Param, Args);
 1830   NamedDecl *buildSimpleDeductionGuide(MutableArrayRef<QualType> ParamTypes) {
 1862   NamedDecl *transformTemplateParameter(NamedDecl *TemplateParam,
 1862   NamedDecl *transformTemplateParameter(NamedDecl *TemplateParam,
 2004   NamedDecl *buildDeductionGuide(TemplateParameterList *TemplateParams,
 2058   for (auto *D : Existing)
 2078   for (NamedDecl *D : LookupConstructors(Transform.Primary)) {
 2082     D = cast<NamedDecl>(D->getCanonicalDecl());
 2179     NamedDecl *P = Params->getParam(I);
 2470     NamedDecl *ND = Params->getParam(0);
 3640 static bool CheckTemplateSpecializationScope(Sema &S, NamedDecl *Specialized,
 3641                                              NamedDecl *PrevDecl,
 3756       NamedDecl *Param = TemplateParams->getParam(I);
 3819     auto *Param = TemplateParams->getParam(I);
 3853     NamedDecl *FnTemplate;
 4893 bool Sema::CheckTemplateArgument(NamedDecl *Param,
 4895                                  NamedDecl *Template,
 5150 static Optional<unsigned> getExpandedPackSize(NamedDecl *Param) {
 5182     S.diagnoseMissingImport(Loc, cast<NamedDecl>(TD),
 7119 static bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, NamedDecl *Old,
 7119 static bool MatchTemplateParameterKind(Sema &S, NamedDecl *New, NamedDecl *Old,
 7458                                              NamedDecl *Specialized,
 7459                                              NamedDecl *PrevDecl,
 7510       auto *ND = cast<NamedDecl>(SpecializedContext);
 7510       auto *ND = cast<NamedDecl>(SpecializedContext);
 7963     NamedDecl *Hidden = nullptr;
 8090     auto *Old = Previous.getRepresentativeDecl();
 8103 static void StripImplicitInstantiation(NamedDecl *D) {
 8114     NamedDecl* D, SourceLocation PointOfInstantiation) {
 8153                                              NamedDecl *PrevDecl,
 8340     NamedDecl *D = F.next()->getUnderlyingDecl();
 8408     NamedDecl *Ovl = (*I)->getUnderlyingDecl();
 8490     for (auto *OldND : Previous) {
 8628 Sema::CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous) {
 8632   NamedDecl *FoundInstantiation = nullptr;
 8633   NamedDecl *Instantiation = nullptr;
 8634   NamedDecl *InstantiatedFrom = nullptr;
 8642       NamedDecl *D = (*I)->getUnderlyingDecl();
 8807 void Sema::CompleteMemberSpecialization(NamedDecl *Member,
 8809   NamedDecl *Instantiation = cast<NamedDecl>(Member->getCanonicalDecl());
 8809   NamedDecl *Instantiation = cast<NamedDecl>(Member->getCanonicalDecl());
 8828 static bool CheckExplicitInstantiationScope(Sema &S, NamedDecl *D,
 8880 static bool CheckExplicitInstantiation(Sema &S, NamedDecl *D,
 9583     NamedDecl *Prev = *P;
10379   void check(NamedDecl *ND) {
10391   void diagnose(NamedDecl *D, bool IsPartialSpec) {
10482 void Sema::checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec) {
10492                                                 NamedDecl *Spec) {
tools/clang/lib/Sema/SemaTemplateDeduction.cpp
  200   if (NamedDecl *NX = dyn_cast<NamedDecl>(X))
  200   if (NamedDecl *NX = dyn_cast<NamedDecl>(X))
  202   if (NamedDecl *NY = dyn_cast<NamedDecl>(Y))
  202   if (NamedDecl *NY = dyn_cast<NamedDecl>(Y))
  644 static Optional<unsigned> getExpandedPackSize(NamedDecl *Param) {
  764       if (auto *Partial = Scope->getPartiallySubstitutedPack(
  932       NamedDecl *Param = TemplateParams->getParam(Pack.Index);
 2507 ConvertDeducedTemplateArgument(Sema &S, NamedDecl *Param,
 2509                                NamedDecl *Template,
 2607     NamedDecl *Param = TemplateParams->getParam(I);
 3038       auto *Param = TemplateParams->getParam(Builder.size() - 1);
 3521     NamedDecl *D = (*I)->getUnderlyingDecl();
 4480   NamedDecl *TemplParamPtr = TemplParam;
tools/clang/lib/Sema/SemaTemplateInstantiate.cpp
   56 Sema::getTemplateInstantiationArgs(NamedDecl *D,
  223     Decl *Entity, NamedDecl *Template, ArrayRef<TemplateArgument> TemplateArgs,
  336     Sema &SemaRef, SourceLocation PointOfInstantiation, NamedDecl *Template,
  346     Sema &SemaRef, SourceLocation PointOfInstantiation, NamedDecl *Template,
  357     NamedDecl *Param, ArrayRef<TemplateArgument> TemplateArgs,
  589           << IsVar << IsTemplate << cast<NamedDecl>(Active->Entity)
  614       NamedDecl *Parm = cast<NamedDecl>(Active->Entity);
  614       NamedDecl *Parm = cast<NamedDecl>(Active->Entity);
  845       if (NamedDecl *PartialPack
  864       if (NamedDecl *PartialPack
  923     NamedDecl *TransformFirstQualifierInScope(NamedDecl *D, SourceLocation Loc);
  923     NamedDecl *TransformFirstQualifierInScope(NamedDecl *D, SourceLocation Loc);
  949                           NamedDecl *FirstQualifierInScope = nullptr,
 1077   return SemaRef.FindInstantiatedDecl(Loc, cast<NamedDecl>(D), TemplateArgs);
 1089 NamedDecl *
 1090 TemplateInstantiator::TransformFirstQualifierInScope(NamedDecl *D,
 1114         return cast_or_null<NamedDecl>(TransformDecl(Loc, D));
 1125   return cast_or_null<NamedDecl>(TransformDecl(Loc, D));
 1185     QualType ObjectType, NamedDecl *FirstQualifierInScope,
 1470   NamedDecl *D = E->getDecl();
 2236     NamedDecl *ND = dyn_cast<NamedDecl>(I->NewDecl);
 2236     NamedDecl *ND = dyn_cast<NamedDecl>(I->NewDecl);
 3087 void LocalInstantiationScope::SetPartiallySubstitutedPack(NamedDecl *Pack,
 3100 NamedDecl *LocalInstantiationScope::getPartiallySubstitutedPack(
tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
  482   if (NamedDecl *ND = dyn_cast<NamedDecl>(New)) {
  482   if (NamedDecl *ND = dyn_cast<NamedDecl>(New)) {
  628       NamedDecl *ND = dyn_cast<NamedDecl>(New);
  628       NamedDecl *ND = dyn_cast<NamedDecl>(New);
  762     NamedDecl *InstPrev = SemaRef.FindInstantiatedDecl(D->getLocation(), Prev,
 1065   NamedDecl **NamedChain =
 1066     new (SemaRef.Context)NamedDecl*[D->getChainingSize()];
 1069   for (auto *PI : D->chain()) {
 1070     NamedDecl *Next = SemaRef.FindInstantiatedDecl(D->getLocation(), PI,
 1121   NamedDecl *ND = D->getFriendDecl();
 1133                        cast<NamedDecl>(NewND), D->getFriendLoc());
 1162     NamedDecl *Prev = SemaRef.FindInstantiatedDecl(D->getLocation(),
 1657     NamedDecl *Prev = SemaRef.FindInstantiatedDecl(D->getLocation(),
 1993   NamedDecl *PrincipalDecl = (TemplateParams
 1994                               ? cast<NamedDecl>(FunctionTemplate)
 2806     NamedDecl *OldTarget = Shadow->getTargetDecl();
 2811     NamedDecl *InstTarget =
 2812         cast_or_null<NamedDecl>(SemaRef.FindInstantiatedDecl(
 2895     SmallVector<NamedDecl*, 8> Expansions;
 2905       Expansions.push_back(cast<NamedDecl>(Slice));
 2908     auto *NewD = SemaRef.BuildUsingPackDecl(D, Expansions);
 2936   NamedDecl *UD = SemaRef.BuildUsingDeclaration(
 2958   SmallVector<NamedDecl*, 8> Expansions;
 2959   for (auto *UD : D->expansions()) {
 2960     if (NamedDecl *NewUD =
 2967   auto *NewD = SemaRef.BuildUsingPackDecl(D, Expansions);
 3509   typedef SmallVector<NamedDecl *, 8> ParamVector;
 3513     NamedDecl *D = cast_or_null<NamedDecl>(Visit(P));
 3513     NamedDecl *D = cast_or_null<NamedDecl>(Visit(P));
 4541     if (NamedDecl *NewPrev = FindInstantiatedDecl(
 5169   NamedDecl *OtherFrom;
 5203 static bool isInstantiationOf(ASTContext &Ctx, NamedDecl *D, Decl *Other) {
 5252          D->getDeclName() == cast<NamedDecl>(Other)->getDeclName();
 5256 static NamedDecl *findInstantiationOf(ASTContext &Ctx,
 5257                                       NamedDecl *D,
 5262       return cast<NamedDecl>(*first);
 5273   if (NamedDecl *D = dyn_cast<NamedDecl>(DC)) {
 5273   if (NamedDecl *D = dyn_cast<NamedDecl>(DC)) {
 5305 NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
 5305 NamedDecl *Sema::FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D,
 5340           return cast<NamedDecl>(FD);
 5346         return cast<NamedDecl>((*Found->get<DeclArgumentPack *>())[PackIdx]);
 5514     NamedDecl *Result = nullptr;
tools/clang/lib/Sema/SemaTemplateVariadic.cpp
   41     void addUnexpanded(NamedDecl *ND, SourceLocation Loc = SourceLocation()) {
  309         return declaresSameEntity(Pack.first.get<NamedDecl *>(), LocalPack);
  362       Name = Unexpanded[I].first.get<NamedDecl *>()->getIdentifier();
  671       NamedDecl *ND = i->first.get<NamedDecl *>();
  671       NamedDecl *ND = i->first.get<NamedDecl *>();
  688                                         i->first.get<NamedDecl *>());
  717       if (NamedDecl *PartialPack
  768       NamedDecl *PartialPack =
  799       NamedDecl *ND = Unexpanded[I].first.get<NamedDecl *>();
  799       NamedDecl *ND = Unexpanded[I].first.get<NamedDecl *>();
  806                                         Unexpanded[I].first.get<NamedDecl *>());
  949     NamedDecl *ND = candidate.getCorrectionDecl();
  984   NamedDecl *ParameterPack = nullptr;
tools/clang/lib/Sema/SemaType.cpp
 7865 bool Sema::hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
 7865 bool Sema::hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
 8006   NamedDecl *Def = nullptr;
 8017     NamedDecl *SuggestedDef = nullptr;
 8408         NamedDecl *FwdDecl = nullptr;
tools/clang/lib/Sema/TreeTransform.h
  481   NamedDecl *TransformFirstQualifierInScope(NamedDecl *D, SourceLocation Loc) {
  481   NamedDecl *TransformFirstQualifierInScope(NamedDecl *D, SourceLocation Loc) {
  482     return cast_or_null<NamedDecl>(getDerived().TransformDecl(Loc, D));
  498                                   NamedDecl *FirstQualifierInScope = nullptr);
  533                         NamedDecl *FirstQualifierInScope = nullptr,
 1117           NamedDecl *SomeDecl = Result.getRepresentativeDecl();
 1189                                    NamedDecl *FirstQualifierInScope,
 3355                                      NamedDecl *FirstQualifierInScope,
 3360                                              NamedDecl *FirstQualifierInScope,
 3364                                             NamedDecl *FirstQualifierInScope,
 3671                                              NamedDecl *FirstQualifierInScope) {
 3847                                               NamedDecl *FirstQualifierInScope,
 4444                                                    NamedDecl *UnqualLookup,
 4460                                                    NamedDecl *UnqualLookup,
 4471     TypeLoc TL, QualType ObjectType, NamedDecl *UnqualLookup,
 8794       for (auto *D : ULE->decls()) {
 8795         NamedDecl *InstD =
 8796             cast<NamedDecl>(getDerived().TransformDecl(E->getExprLoc(), D));
 8841       for (auto *D : ULE->decls()) {
 8842         NamedDecl *InstD =
 8843             cast<NamedDecl>(getDerived().TransformDecl(E->getExprLoc(), D));
 8886       for (auto *D : ULE->decls()) {
 8887         NamedDecl *InstD =
 8888             cast<NamedDecl>(getDerived().TransformDecl(E->getExprLoc(), D));
 9047       for (auto *D : ULE->decls()) {
 9048         NamedDecl *InstD =
 9049             cast<NamedDecl>(TT.getDerived().TransformDecl(E->getExprLoc(), D));
 9273   NamedDecl *Found = ND;
 9275     Found = cast_or_null<NamedDecl>(
 9698   NamedDecl *FoundDecl = E->getFoundDecl();
 9702     FoundDecl = cast_or_null<NamedDecl>(
 9740   NamedDecl *FirstQualifierInScope = nullptr;
 9816     NamedDecl *Found = cast_or_null<NamedDecl>(getDerived().TransformDecl(
 9816     NamedDecl *Found = cast_or_null<NamedDecl>(getDerived().TransformDecl(
10851   for (auto *OldD : Old->decls()) {
10865     NamedDecl *SingleDecl = cast<NamedDecl>(InstD);
10865     NamedDecl *SingleDecl = cast<NamedDecl>(InstD);
10866     ArrayRef<NamedDecl*> Decls = SingleDecl;
10871     for (auto *D : Decls) {
10941     NamedDecl *D = R.getAsSingle<NamedDecl>();
10941     NamedDecl *D = R.getAsSingle<NamedDecl>();
11811   NamedDecl *FirstQualifierInScope
11938   NamedDecl *FirstQualifierInScope = nullptr;
12012       auto *Pack = E->getPack();
12035     auto *Pack = cast_or_null<NamedDecl>(
12035     auto *Pack = cast_or_null<NamedDecl>(
13062     for (auto *E : UPD->expansions()) {
13153                                             NamedDecl *FirstQualifierInScope,
13265     NamedDecl *ND = cast<DeclRefExpr>(Callee)->getDecl();
tools/clang/lib/Serialization/ASTCommon.cpp
  417 bool serialization::needsAnonymousDeclarationNumber(const NamedDecl *D) {
tools/clang/lib/Serialization/ASTCommon.h
   92 bool needsAnonymousDeclarationNumber(const NamedDecl *D);
  104     auto *ND = dyn_cast_or_null<NamedDecl>(LexicalD);
  104     auto *ND = dyn_cast_or_null<NamedDecl>(LexicalD);
tools/clang/lib/Serialization/ASTReader.cpp
  452 using DeclsMap = llvm::DenseMap<DeclarationName, SmallVector<NamedDecl *, 8>>;
 4055 void ASTReader::mergeDefinitionVisibility(NamedDecl *Def,
 4056                                           NamedDecl *MergedDef) {
 7621     if (DeclarationName Name = cast<NamedDecl>(D)->getDeclName()) {
 7633     } else if (needsAnonymousDeclarationNumber(cast<NamedDecl>(D))) {
 8064   SmallVector<NamedDecl *, 64> Decls;
 8066     NamedDecl *ND = cast<NamedDecl>(GetDecl(ID));
 8066     NamedDecl *ND = cast<NamedDecl>(GetDecl(ID));
 8087     NamedDecl *ND = cast<NamedDecl>(GetDecl(ID));
 8087     NamedDecl *ND = cast<NamedDecl>(GetDecl(ID));
 8291     NamedDecl *D = cast<NamedDecl>(GetDecl(ID));
 8291     NamedDecl *D = cast<NamedDecl>(GetDecl(ID));
 8647     llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) {
 8649     NamedDecl *D = cast<NamedDecl>(GetDecl(UndefinedButUsed[Idx++]));
 8649     NamedDecl *D = cast<NamedDecl>(GetDecl(UndefinedButUsed[Idx++]));
 8858     NamedDecl *D = cast<NamedDecl>(GetDecl(DeclIDs[I]));
 8858     NamedDecl *D = cast<NamedDecl>(GetDecl(DeclIDs[I]));
 9229       Decls.addDecl(ReadDeclAs<NamedDecl>(F, Record, Idx));
 9343   SmallVector<NamedDecl *, 16> Params;
 9346     Params.push_back(ReadDeclAs<NamedDecl>(F, Record, Idx));
 9906         pushExternalDeclIntoScope(cast<NamedDecl>(TLD->second[I]), II);
10057   for (auto *ND : PendingMergedDefinitionsToDeduplicate)
10118     NamedDecl *D = PendingOdrMergeChecks.pop_back_val();
10147     llvm::SmallVector<const NamedDecl*, 4> Candidates;
10158       if (auto *ND = dyn_cast<NamedDecl>(CanonMember))
10158       if (auto *ND = dyn_cast<NamedDecl>(CanonMember))
10390               for (auto *D : TD->getTemplateParameters()->asArray()) {
10422           const NamedDecl* FirstDecl = cast<NamedDecl>(FirstIt->first);
10422           const NamedDecl* FirstDecl = cast<NamedDecl>(FirstIt->first);
10423           const NamedDecl* SecondDecl = cast<NamedDecl>(SecondIt->first);
10423           const NamedDecl* SecondDecl = cast<NamedDecl>(SecondIt->first);
11417         NamedDecl *FirstND = FirstFriend->getFriendDecl();
11418         NamedDecl *SecondND = SecondFriend->getFriendDecl();
11487           NamedDecl *FirstParam = FirstTPL->getParam(i);
11488           NamedDecl *SecondParam = SecondTPL->getParam(i);
12188 void ASTReader::pushExternalDeclIntoScope(NamedDecl *D, DeclarationName Name) {
12193       for (auto *ND : It->second)
tools/clang/lib/Serialization/ASTReaderDecl.cpp
  144     T *ReadDeclAs() {
  145       return Record.readDeclAs<T>();
  181     static NamedDecl *getAnonymousDeclForMerging(ASTReader &Reader,
  185                                            unsigned Index, NamedDecl *D);
  215       NamedDecl *New = nullptr;
  216       NamedDecl *Existing = nullptr;
  224       FindExistingResult(ASTReader &Reader, NamedDecl *New, NamedDecl *Existing,
  224       FindExistingResult(ASTReader &Reader, NamedDecl *New, NamedDecl *Existing,
  246       operator NamedDecl*() const { return Existing; }
  254     FindExistingResult findExisting(NamedDecl *D);
  326     void VisitNamedDecl(NamedDecl *ND);
  656 void ASTDeclReader::VisitNamedDecl(NamedDecl *ND) {
  982       TemplDecls.addDecl(ReadDeclAs<NamedDecl>());
 1352   FD->Chaining = new (Reader.getContext())NamedDecl*[FD->ChainingSize];
 1355     FD->Chaining[I] = ReadDeclAs<NamedDecl>();
 1585   D->Namespace = ReadDeclAs<NamedDecl>();
 1596   if (auto *Pattern = ReadDeclAs<NamedDecl>())
 1596   if (auto *Pattern = ReadDeclAs<NamedDecl>())
 1603   D->InstantiatedFrom = ReadDeclAs<NamedDecl>();
 1604   auto **Expansions = D->getTrailingObjects<NamedDecl *>();
 1604   auto **Expansions = D->getTrailingObjects<NamedDecl *>();
 1606     Expansions[I] = ReadDeclAs<NamedDecl>();
 1613   D->Underlying = ReadDeclAs<NamedDecl>();
 1615   D->UsingOrNextShadow = ReadDeclAs<NamedDecl>();
 1635   D->NominatedNamespace = ReadDeclAs<NamedDecl>();
 1973     D->Friend = ReadDeclAs<NamedDecl>();
 1992     D->Friend = ReadDeclAs<NamedDecl>();
 2002   auto *TemplatedDecl = cast_or_null<NamedDecl>(Reader.GetDecl(PatternID));
 2002   auto *TemplatedDecl = cast_or_null<NamedDecl>(Reader.GetDecl(PatternID));
 2453   auto *DPattern = D->getTemplatedDecl();
 2454   auto *ExistingPattern = Existing->getTemplatedDecl();
 2535 static bool allowODRLikeMergeInC(NamedDecl *ND) {
 2559       !allowODRLikeMergeInC(dyn_cast<NamedDecl>(static_cast<T*>(D))))
 2689   template <typename T> T *GetLocalDeclAs(uint32_t LocalID) {
 2690     return cast_or_null<T>(Reader->GetLocalDecl(*F, LocalID));
 2818 static bool isSameTemplateParameter(const NamedDecl *X,
 2819                                     const NamedDecl *Y) {
 2936 static bool isSameEntity(NamedDecl *X, NamedDecl *Y) {
 2936 static bool isSameEntity(NamedDecl *X, NamedDecl *Y) {
 3204 static NamedDecl *getDeclForMerging(NamedDecl *Found,
 3204 static NamedDecl *getDeclForMerging(NamedDecl *Found,
 3248 NamedDecl *ASTDeclReader::getAnonymousDeclForMerging(ASTReader &Reader,
 3266         Previous.push_back(cast<NamedDecl>(ND->getCanonicalDecl()));
 3268         Previous[Number] = cast<NamedDecl>(ND->getCanonicalDecl());
 3277                                                NamedDecl *D) {
 3287 ASTDeclReader::FindExistingResult ASTDeclReader::findExisting(NamedDecl *D) {
 3315     if (auto *Existing = getAnonymousDeclForMerging(
 3348       if (NamedDecl *Existing = getDeclForMerging(*I, TypedefNameForLinkage))
 3356       if (NamedDecl *Existing = getDeclForMerging(*I, TypedefNameForLinkage))
 3524     NamedDecl *FromParam = FromTP->getParam(I);
 3525     NamedDecl *ToParam = ToTP->getParam(I);
 4475       Reader.getContext().setManglingNumber(cast<NamedDecl>(D),
 4503       auto *Exported = cast<NamedDecl>(D);
 4503       auto *Exported = cast<NamedDecl>(D);
tools/clang/lib/Serialization/ASTReaderStmt.cpp
   95     T *ReadDeclAs() {
   96       return Record.readDeclAs<T>();
  579     *E->getTrailingObjects<NamedDecl *>() = ReadDeclAs<NamedDecl>();
  579     *E->getTrailingObjects<NamedDecl *>() = ReadDeclAs<NamedDecl>();
  744   E->FoundDecl = ReadDeclAs<NamedDecl>();
  808       auto *FoundD = Record.readDeclAs<NamedDecl>();
  808       auto *FoundD = Record.readDeclAs<NamedDecl>();
 1720     *E->getTrailingObjects<NamedDecl *>() = ReadDeclAs<NamedDecl>();
 1720     *E->getTrailingObjects<NamedDecl *>() = ReadDeclAs<NamedDecl>();
 1772     auto *D = ReadDeclAs<NamedDecl>();
 1772     auto *D = ReadDeclAs<NamedDecl>();
 1858   E->Pack = Record.readDeclAs<NamedDecl>();
tools/clang/lib/Serialization/ASTWriter.cpp
 3574 static NamedDecl *getDeclForLocalLookup(const LangOptions &LangOpts,
 3575                                         NamedDecl *D) {
 3590         return cast<NamedDecl>(Redecl);
 3601       return cast<NamedDecl>(First);
 3748       SmallVector<NamedDecl *, 16> Decls(IdResolver.begin(II),
 3750       for (SmallVectorImpl<NamedDecl *>::reverse_iterator D = Decls.rbegin(),
 3888     for (NamedDecl *D : Decls) {
 4008   for (auto *D : Result.getLookupResult())
 4113         if (auto *ChildND = dyn_cast<NamedDecl>(ChildD)) {
 4113         if (auto *ChildND = dyn_cast<NamedDecl>(ChildD)) {
 4153   SmallVector<NamedDecl *, 8> ConstructorDecls;
 4154   SmallVector<NamedDecl *, 8> ConversionDecls;
 4240       for (NamedDecl *ND : Result)
 4867   SmallVector<std::pair<NamedDecl *, SourceLocation>, 16> Undefined;
 5803 unsigned ASTWriter::getAnonymousDeclarationNumber(const NamedDecl *D) {
 6561 void ASTWriter::RedefinedHiddenDefinition(const NamedDecl *D, Module *M) {
tools/clang/lib/Serialization/ASTWriterDecl.cpp
   61     void VisitNamedDecl(NamedDecl *D);
  357 void ASTDeclWriter::VisitNamedDecl(NamedDecl *D) {
  939   for (const auto *P : D->chain())
 1246   for (auto *E : D->expansions())
 1411   bool hasFriendDecl = D->Friend.is<NamedDecl*>();
tools/clang/lib/StaticAnalyzer/Checkers/AnalysisOrderChecker.cpp
  110       if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Call.getDecl()))
  110       if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Call.getDecl()))
  119       if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Call.getDecl()))
  119       if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(Call.getDecl()))
tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
   97     const NamedDecl *ND = cast<NamedDecl>(D);
   97     const NamedDecl *ND = cast<NamedDecl>(D);
tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
 1015     const NamedDecl *FD = cast<FunctionCodeRegion>(MR)->getDecl();
tools/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
  228     const NamedDecl *ND = DR->getDecl();
tools/clang/lib/StaticAnalyzer/Checkers/GCDAntipatternChecker.cpp
   76   if (const auto* ND = dyn_cast<NamedDecl>(D)) {
   76   if (const auto* ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
  731   if (auto *ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
 1975     const NamedDecl *FD = cast<FunctionCodeRegion>(MR)->getDecl();
 3254               const auto *D = dyn_cast_or_null<NamedDecl>(Call->getDecl());
 3254               const auto *D = dyn_cast_or_null<NamedDecl>(Call->getDecl());
tools/clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp
  581     const auto *RegionDecl = cast<NamedDecl>(DR->getDecl());
  581     const auto *RegionDecl = cast<NamedDecl>(DR->getDecl());
tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp
   51 static bool shouldRunOnFunctionOrMethod(const NamedDecl *ND);
  172   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
  199   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
  212   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
  240   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
  268   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
  303   if (!shouldRunOnFunctionOrMethod(dyn_cast<NamedDecl>(
  385 static bool shouldRunOnFunctionOrMethod(const NamedDecl *ND) {
tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
 3175       const auto *ND = dyn_cast<NamedDecl>(CP->getCallee());
 3175       const auto *ND = dyn_cast<NamedDecl>(CP->getCallee());
tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
  390     for (; Ctx && isa<NamedDecl>(Ctx); Ctx = Ctx->getParent()) {
tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
 2419 void ExprEngine::VisitCommonDeclRefExpr(const Expr *Ex, const NamedDecl *D,
tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
  197       if (const auto *ND = dyn_cast<NamedDecl>(DeclWithIssue))
  197       if (const auto *ND = dyn_cast<NamedDecl>(DeclWithIssue))
tools/clang/lib/StaticAnalyzer/Core/IssueHash.cpp
   91   if (const auto *ND = dyn_cast<NamedDecl>(D)) {
   91   if (const auto *ND = dyn_cast<NamedDecl>(D)) {
tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
  348                                        const NamedDecl *FD,
  901                                   getFunctionCodeRegion(cast<NamedDecl>(STCD)));
 1011 MemRegionManager::getFunctionCodeRegion(const NamedDecl *FD) {
tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
  700       if (const NamedDecl *ND = dyn_cast<NamedDecl>(DeclWithIssue)) {
  700       if (const NamedDecl *ND = dyn_cast<NamedDecl>(DeclWithIssue)) {
tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.cpp
   40 void ModelInjector::onBodySynthesis(const NamedDecl *D) {
tools/clang/lib/StaticAnalyzer/Frontend/ModelInjector.h
   58   void onBodySynthesis(const NamedDecl *D);
tools/clang/lib/Tooling/ASTDiff/ASTDiff.cpp
  151   std::string getRelativeName(const NamedDecl *ND,
  153   std::string getRelativeName(const NamedDecl *ND) const;
  358 SyntaxTree::Impl::getRelativeName(const NamedDecl *ND,
  379 std::string SyntaxTree::Impl::getRelativeName(const NamedDecl *ND) const {
  427   if (auto *N = dyn_cast<NamedDecl>(D))
  693   if (auto *ND = ASTNode.get<NamedDecl>()) {
  701   if (auto *ND = ASTNode.get<NamedDecl>()) {
tools/clang/lib/Tooling/Core/Lookup.cpp
  156         for (const NamedDecl *Res : LookupRes)
  186                                        const NamedDecl *FromDecl,
tools/clang/lib/Tooling/Refactoring/ASTSelection.cpp
  221     if (const auto *ND = dyn_cast<NamedDecl>(D))
  221     if (const auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp
   46 findSymbolOccurrences(const NamedDecl *ND, RefactoringRuleContext &Context) {
   68   const NamedDecl *ND =
   77 const NamedDecl *RenameOccurrences::getRenameDecl() const { return ND; }
   94   const NamedDecl *ND =
tools/clang/lib/Tooling/Refactoring/Rename/USRFinder.cpp
   42   bool visitSymbolOccurrence(const NamedDecl *ND,
   57   const NamedDecl *getNamedDecl() const { return Result; }
   69   const NamedDecl *Result = nullptr;
   76 const NamedDecl *getNamedDeclAt(const ASTContext &Context,
  107   bool VisitNamedDecl(const NamedDecl *ND) {
  118   const NamedDecl *getNamedDecl() const { return Result; }
  121   const NamedDecl *Result = nullptr;
  127 const NamedDecl *getNamedDeclFor(const ASTContext &Context,
tools/clang/lib/Tooling/Refactoring/Rename/USRFindingAction.cpp
   41 const NamedDecl *getCanonicalSymbolDeclaration(const NamedDecl *FoundDecl) {
   41 const NamedDecl *getCanonicalSymbolDeclaration(const NamedDecl *FoundDecl) {
  182 std::vector<std::string> getUSRsForDeclaration(const NamedDecl *ND,
  217     const NamedDecl *FoundDecl = QualifiedName.empty()
tools/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
   65   bool visitSymbolOccurrence(const NamedDecl *ND,
  168     const NamedDecl *FromDecl;
  181   bool VisitNamedDecl(const NamedDecl *Decl) {
  215     const NamedDecl *Decl = Expr->getFoundDecl();
  250     const NamedDecl *Decl = Expr->getFoundDecl();
  337     if (const auto *TargetDecl =
  371     if (const auto *TargetDecl = getSupportedDeclFromTypeLoc(Loc)) {
  451   const NamedDecl *getSupportedDeclFromTypeLoc(TypeLoc Loc) {
tools/clang/lib/Tooling/Transformer/RangeSelector.cpp
  192     if (const auto *D = Node.get<NamedDecl>()) {
  192     if (const auto *D = Node.get<NamedDecl>()) {
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
  315     const NamedDecl *Scope =
  551     moveClassForwardDeclaration(Result, cast<NamedDecl>(FwdDecl));
  555     moveClassForwardDeclaration(Result, cast<NamedDecl>(TemplateFwdDecl));
  599                    llvm::cast<NamedDecl>(Var), VarRef);
  616                    llvm::cast<NamedDecl>(EnumConstDecl), EnumConstRef);
  629                    llvm::cast<NamedDecl>(Func), FuncRef);
  654         CalleeRange.getEnd(), llvm::cast<NamedDecl>(Func));
  736     const NamedDecl *FwdDecl) {
  774     const NamedDecl *FromDecl) {
  862         const auto *TargetDecl = UsingShadow->getTargetDecl();
  901   const auto *FromDecl = Result.Nodes.getNodeAs<NamedDecl>("from_decl");
  901   const auto *FromDecl = Result.Nodes.getNodeAs<NamedDecl>("from_decl");
  946   const NamedDecl *TargetDecl =
  958     const DeclContext *UseContext, const NamedDecl *From,
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.h
   70       const NamedDecl *FwdDecl);
   75       const NamedDecl *FromDecl);
   84                       const DeclContext *UseContext, const NamedDecl *From,
tools/clang/tools/extra/clang-doc/Mapper.cpp
   77 MapASTVisitor::getComment(const NamedDecl *D, const ASTContext &Context) const {
   87 int MapASTVisitor::getLine(const NamedDecl *D,
   92 llvm::SmallString<128> MapASTVisitor::getFile(const NamedDecl *D,
tools/clang/tools/extra/clang-doc/Mapper.h
   46   int getLine(const NamedDecl *D, const ASTContext &Context) const;
   47   llvm::SmallString<128> getFile(const NamedDecl *D, const ASTContext &Context,
   50   comments::FullComment *getComment(const NamedDecl *D,
tools/clang/tools/extra/clang-doc/Serialize.cpp
  234                                 const NamedDecl *D) {
  597   const NamedDecl *Parent = nullptr;
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
   46 std::vector<SymbolInfo::Context> GetContexts(const NamedDecl *ND) {
   73 CreateSymbolInfo(const NamedDecl *ND, const SourceManager &SM,
  244   const NamedDecl *ND;
  245   if ((ND = Result.Nodes.getNodeAs<NamedDecl>("use")))
  247   else if ((ND = Result.Nodes.getNodeAs<NamedDecl>("decl")))
tools/clang/tools/extra/clang-move/Move.cpp
  150 void MoveDeclFromOldFileToNewFile(ClangMoveTool *MoveTool, const NamedDecl *D) {
  164     const NamedDecl *D = FD;
  199       const NamedDecl * D = TAD;
  257   void MatchClassStaticVariable(const NamedDecl *VD, SourceManager *SM) {
  369                            const std::vector<const NamedDecl *> &Decls,
  397   for (const auto *MovedDecl : Decls) {
  460              const std::vector<const NamedDecl *> &Decls) {
  463   for (const auto *D : Decls) {
  491 void ClangMoveTool::addRemovedDecl(const NamedDecl *Decl) {
  555   Optional<ast_matchers::internal::Matcher<NamedDecl>> HasAnySymbolNames;
  661   if (const auto *D = Result.Nodes.getNodeAs<NamedDecl>("decls_in_header")) {
  661   if (const auto *D = Result.Nodes.getNodeAs<NamedDecl>("decls_in_header")) {
  672   } else if (const auto *ND =
  673                  Result.Nodes.getNodeAs<NamedDecl>("helper_decls")) {
  678   } else if (const auto *UD = Result.Nodes.getNodeAs<NamedDecl>("using_decl")) {
  678   } else if (const auto *UD = Result.Nodes.getNodeAs<NamedDecl>("using_decl")) {
  727     std::vector<const NamedDecl *> UnremovedDecls;
  728     for (const auto *D : UnremovedDeclsInOldHeader)
  735     for (const auto *D : HelperDeclarations) {
  747   for (const auto *RemovedDecl : RemovedDecls) {
  799   std::vector<const NamedDecl *> NewHeaderDecls;
  800   std::vector<const NamedDecl *> NewCCDecls;
  801   for (const auto *MovedDecl : MovedDecls) {
  810   std::vector<const NamedDecl *> ActualNewCCDecls;
  815   for (const auto *D : NewCCDecls) {
  880     for (const auto *Decl : UnremovedDeclsInOldHeader) {
tools/clang/tools/extra/clang-move/Move.h
  143   std::vector<const NamedDecl *> &getMovedDecls() { return MovedDecls; }
  148   void addRemovedDecl(const NamedDecl *Decl);
  150   llvm::SmallPtrSet<const NamedDecl *, 8> &getUnremovedDeclsInOldHeader() {
  170   std::vector<const NamedDecl *> MovedDecls;
  172   std::vector<const NamedDecl *> RemovedDecls;
  180   std::vector<const NamedDecl *> HelperDeclarations;
  182   llvm::SmallPtrSet<const NamedDecl*, 8> UnremovedDeclsInOldHeader;
tools/clang/tools/extra/clang-tidy/bugprone/ForwardingReferenceOverloadCheck.cpp
   27     const NamedDecl *TypeDecl =
tools/clang/tools/extra/clang-tidy/bugprone/ParentVirtualCallCheck.cpp
   62 static std::string getNameAsString(const NamedDecl *Decl) {
tools/clang/tools/extra/clang-tidy/cert/SetLongJmpCheck.cpp
   74   diag(E->getExprLoc(), DiagWording) << cast<NamedDecl>(E->getCalleeDecl());
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
  187       const auto *InitDecl =
  217                                SmallVectorImpl<const NamedDecl *> &Decls) {
  221     if (const NamedDecl *Decl = getCanonicalRecordDecl(Base.getType())) {
  237   SmallVector<const NamedDecl *, 16> OrderedDecls;
tools/clang/tools/extra/clang-tidy/google/ExplicitConstructorCheck.cpp
   66 static bool declIsStdInitializerList(const NamedDecl *D) {
tools/clang/tools/extra/clang-tidy/hicpp/ExceptionBaseclassCheck.cpp
   60   if (const auto *TypeDecl = Result.Nodes.getNodeAs<NamedDecl>("decl"))
   60   if (const auto *TypeDecl = Result.Nodes.getNodeAs<NamedDecl>("decl"))
tools/clang/tools/extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp
   89     if (Result.Nodes.getNodeAs<NamedDecl>("dyn_cast"))
   99     const auto *Func = Result.Nodes.getNodeAs<NamedDecl>("func");
   99     const auto *Func = Result.Nodes.getNodeAs<NamedDecl>("func");
tools/clang/tools/extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
   85   const auto *ND = Result.Nodes.getNodeAs<NamedDecl>("name-decl");
   85   const auto *ND = Result.Nodes.getNodeAs<NamedDecl>("name-decl");
tools/clang/tools/extra/clang-tidy/misc/NonCopyableObjects.cpp
   55   const auto *D = Result.Nodes.getNodeAs<NamedDecl>("decl");
   55   const auto *D = Result.Nodes.getNodeAs<NamedDecl>("decl");
   56   const auto *BD = Result.Nodes.getNodeAs<NamedDecl>("type_decl");
   56   const auto *BD = Result.Nodes.getNodeAs<NamedDecl>("type_decl");
tools/clang/tools/extra/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
   34   if (const auto *AliasDecl = Result.Nodes.getNodeAs<NamedDecl>("alias")) {
   34   if (const auto *AliasDecl = Result.Nodes.getNodeAs<NamedDecl>("alias")) {
tools/clang/tools/extra/clang-tidy/misc/UnusedAliasDeclsCheck.h
   29   llvm::DenseMap<const NamedDecl *, CharSourceRange> FoundDecls;
tools/clang/tools/extra/clang-tidy/misc/UnusedUsingDeclsCheck.cpp
  125   if (const auto *Used = Result.Nodes.getNodeAs<NamedDecl>("used")) {
  125   if (const auto *Used = Result.Nodes.getNodeAs<NamedDecl>("used")) {
  149     for (const NamedDecl *ND : ULE->decls()) {
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertUtils.cpp
  116 bool DeclFinderASTVisitor::VisitNamedDecl(NamedDecl *D) {
  128   if (auto *D = dyn_cast<NamedDecl>(DeclRef->getDecl()))
  128   if (auto *D = dyn_cast<NamedDecl>(DeclRef->getDecl()))
tools/clang/tools/extra/clang-tidy/modernize/LoopConvertUtils.h
  198   bool VisitNamedDecl(clang::NamedDecl *D);
tools/clang/tools/extra/clang-tidy/readability/ContainerSizeEmptyCheck.cpp
  214   const auto *Container = Result.Nodes.getNodeAs<NamedDecl>("container");
  214   const auto *Container = Result.Nodes.getNodeAs<NamedDecl>("container");
tools/clang/tools/extra/clang-tidy/readability/IdentifierNamingCheck.cpp
  395     const NamedDecl *D,
  702                      const NamedDecl *Decl, SourceRange Range,
  748     NamedDecl *Decl = nullptr;
  770         if (const auto *TemplDecl = ClassDecl->getTemplatedDecl())
  809   if (const auto *Decl = Result.Nodes.getNodeAs<NamedDecl>("decl")) {
  809   if (const auto *Decl = Result.Nodes.getNodeAs<NamedDecl>("decl")) {
tools/clang/tools/extra/clang-tidy/readability/RedundantDeclarationCheck.cpp
   41   const auto *D = Result.Nodes.getNodeAs<NamedDecl>("Decl");
   41   const auto *D = Result.Nodes.getNodeAs<NamedDecl>("Decl");
tools/clang/tools/extra/clang-tidy/readability/RedundantStringInitCheck.cpp
   62   const auto *Decl = Result.Nodes.getNodeAs<NamedDecl>("decl");
   62   const auto *Decl = Result.Nodes.getNodeAs<NamedDecl>("decl");
tools/clang/tools/extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
   32   const auto *Def = Result.Nodes.getNodeAs<NamedDecl>("static-def");
   32   const auto *Def = Result.Nodes.getNodeAs<NamedDecl>("static-def");
tools/clang/tools/extra/clang-tidy/utils/NamespaceAliaser.cpp
   45   const auto *ExistingAlias = selectFirst<NamedDecl>(
   45   const auto *ExistingAlias = selectFirst<NamedDecl>(
tools/clang/tools/extra/clangd/AST.cpp
   33 getTemplateSpecializationArgLocs(const NamedDecl &ND) {
   54 bool isTemplateSpecializationKind(const NamedDecl *D,
   61 bool isTemplateSpecializationKind(const NamedDecl *D,
   70 bool isImplicitTemplateInstantiation(const NamedDecl *D) {
   74 bool isExplicitTemplateSpecialization(const NamedDecl *D) {
   87 std::string printQualifiedName(const NamedDecl &ND) {
  106 NestedNameSpecifierLoc getQualifierLoc(const NamedDecl &ND) {
  126 std::string printName(const ASTContext &Ctx, const NamedDecl &ND) {
  162 std::string printTemplateSpecializationArgs(const NamedDecl &ND) {
tools/clang/tools/extra/clangd/AST.h
   40 std::string printQualifiedName(const NamedDecl &ND);
   54 std::string printName(const ASTContext &Ctx, const NamedDecl &ND);
   60 std::string printTemplateSpecializationArgs(const NamedDecl &ND);
   96 bool isImplicitTemplateInstantiation(const NamedDecl *D);
  105 bool isExplicitTemplateSpecialization(const NamedDecl *D);
  111 NestedNameSpecifierLoc getQualifierLoc(const NamedDecl &ND);
tools/clang/tools/extra/clangd/CodeComplete.cpp
  134                      const NamedDecl *Decl,
  198       const NamedDecl *D = SemaResult->Declaration;
  268           if (const auto *D = C.SemaResult->getDeclaration())
  269             if (const auto *ND = dyn_cast<NamedDecl>(D))
  269             if (const auto *ND = dyn_cast<NamedDecl>(D))
  648 static bool isInjectedClass(const NamedDecl &D) {
  656 static bool isBlacklistedMember(const NamedDecl &D) {
 1774 bool isIndexedForCodeCompletion(const NamedDecl &ND, ASTContext &ASTCtx) {
tools/clang/tools/extra/clangd/CodeComplete.h
  276 bool isIndexedForCodeCompletion(const NamedDecl &ND, ASTContext &ASTCtx);
tools/clang/tools/extra/clangd/CodeCompletionStrings.cpp
   73 std::string getDeclComment(const ASTContext &Ctx, const NamedDecl &Decl) {
tools/clang/tools/extra/clangd/CodeCompletionStrings.h
   36 std::string getDeclComment(const ASTContext &Ctx, const NamedDecl &D);
tools/clang/tools/extra/clangd/ExpectedTypes.cpp
   46   const NamedDecl *D = R.Declaration;
tools/clang/tools/extra/clangd/FindSymbols.cpp
  131 llvm::Optional<DocumentSymbol> declToSym(ASTContext &Ctx, const NamedDecl &ND) {
  198     auto *ND = llvm::dyn_cast<NamedDecl>(D);
  198     auto *ND = llvm::dyn_cast<NamedDecl>(D);
  220   VisitKind shouldVisit(NamedDecl *D) {
tools/clang/tools/extra/clangd/FindTarget.cpp
  103       const auto *ND = cast<NamedDecl>(D);
  103       const auto *ND = cast<NamedDecl>(D);
  106         for (const NamedDecl *BaseND : Parent->lookup(ND->getDeclName()))
  112           for (const NamedDecl *BaseECD : Pattern->lookup(ECD->getDeclName()))
  194         for (auto *D : OE->decls())
  384 llvm::SmallVector<const NamedDecl *, 1>
  395   llvm::SmallVector<const NamedDecl *, 1> TemplatePatterns;
  396   llvm::SmallVector<const NamedDecl *, 1> Targets;
  402       TemplatePatterns.push_back(llvm::cast<NamedDecl>(D.first));
  407     Targets.push_back(llvm::cast<NamedDecl>(D.first));
  447     void VisitNamedDecl(const NamedDecl *ND) {
  760   for (const NamedDecl *T : R.Targets) {
tools/clang/tools/extra/clangd/FindTarget.h
   96   llvm::SmallVector<const NamedDecl *, 1> Targets;
tools/clang/tools/extra/clangd/HeaderSourceSwitch.cpp
  129     auto *ND = llvm::dyn_cast<NamedDecl>(D);
  129     auto *ND = llvm::dyn_cast<NamedDecl>(D);
tools/clang/tools/extra/clangd/IncludeFixer.cpp
   55   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
   55   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
tools/clang/tools/extra/clangd/ParsedAST.cpp
   75       if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
   75       if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
tools/clang/tools/extra/clangd/Quality.cpp
   62 static SymbolQualitySignals::SymbolCategory categorize(const NamedDecl &ND) {
  159 static bool isInstanceMember(const NamedDecl *ND) {
  261 computeScope(const NamedDecl *D) {
tools/clang/tools/extra/clangd/SemanticHighlighting.cpp
   39 llvm::Optional<HighlightingKind> kindForDecl(const NamedDecl *D) {
   41     if (auto *Templated = TD->getTemplatedDecl())
  108   for (NamedDecl *Decl : Decls) {
  193   bool VisitNamedDecl(NamedDecl *ND) {
  300   void addToken(SourceLocation Loc, const NamedDecl *D) {
tools/clang/tools/extra/clangd/XRefs.cpp
  297     if (auto *ND = dyn_cast<NamedDecl>(D))
  462     const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  462     const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  490   if (const NamedDecl *ND = dyn_cast<NamedDecl>(DC))
  490   if (const NamedDecl *ND = dyn_cast<NamedDecl>(DC))
  590   if (!Index || !llvm::isa<NamedDecl>(D))
  592   const NamedDecl &ND = *cast<NamedDecl>(D);
  592   const NamedDecl &ND = *cast<NamedDecl>(D);
  624   if (const NamedDecl *ND = llvm::dyn_cast<NamedDecl>(D)) {
  624   if (const NamedDecl *ND = llvm::dyn_cast<NamedDecl>(D)) {
  994     if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  994     if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
 1000         if (const auto *ParentND =
 1001                 dyn_cast_or_null<NamedDecl>(ND->getDeclContext()))
 1037 declToTypeHierarchyItem(ASTContext &Ctx, const NamedDecl &ND) {
tools/clang/tools/extra/clangd/index/SymbolCollector.cpp
   41 const NamedDecl &getTemplateOrThis(const NamedDecl &ND) {
   41 const NamedDecl &getTemplateOrThis(const NamedDecl &ND) {
   82 bool isPrivateProtoDecl(const NamedDecl &ND) {
  175 bool isPreferredDeclaration(const NamedDecl &ND, index::SymbolRoleSet Roles) {
  201 bool SymbolCollector::shouldCollectSymbol(const NamedDecl &ND,
  271   const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  271   const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  323   auto *OriginalDecl = dyn_cast<NamedDecl>(ASTNode.OrigD);
  419     const NamedDecl &ND, const SymbolID &ID,
  466   for (const NamedDecl *ND : ReferencedDecls) {
  551 const Symbol *SymbolCollector::addDeclaration(const NamedDecl &ND, SymbolID ID,
  625 void SymbolCollector::addDefinition(const NamedDecl &ND,
tools/clang/tools/extra/clangd/index/SymbolCollector.h
   92   static bool shouldCollectSymbol(const NamedDecl &ND, const ASTContext &ASTCtx,
  123   const Symbol *addDeclaration(const NamedDecl &, SymbolID,
  125   void addDefinition(const NamedDecl &, const Symbol &DeclSymbol);
  126   void processRelations(const NamedDecl &ND, const SymbolID &ID,
  156   llvm::DenseSet<const NamedDecl *> ReferencedDecls;
  158   llvm::DenseMap<const NamedDecl *, std::vector<DeclRef>> DeclRefs;
tools/clang/tools/extra/clangd/refactor/Rename.cpp
  103   bool IsIndexable = isa<NamedDecl>(RenameDecl) &&
  105                          cast<NamedDecl>(RenameDecl), ASTCtx, {}, false);
  142 findOccurrencesWithinFile(ParsedAST &AST, const NamedDecl *RenameDecl) {
  143   const NamedDecl *CanonicalRenameDecl =
  172   const auto *RenameDecl =
tools/clang/tools/extra/clangd/refactor/tweaks/DefineInline.cpp
  175     for (const NamedDecl *ND : Ref.Targets) {
  184     const NamedDecl *ND = Ref.Targets.front();
tools/clang/tools/extra/clangd/unittests/ExpectedTypeTest.cpp
   35   const NamedDecl *decl(llvm::StringRef Name) { return &findDecl(*AST, Name); }
   42   llvm::Optional<OpaqueType> fromCompletionResult(const NamedDecl *D) {
tools/clang/tools/extra/clangd/unittests/HeaderSourceSwitchTests.cpp
   77   if (const NamedDecl *ND = dyn_cast<NamedDecl>(arg))
   77   if (const NamedDecl *ND = dyn_cast<NamedDecl>(arg))
tools/clang/tools/extra/clangd/unittests/ParsedASTTests.cpp
   39   if (NamedDecl *ND = dyn_cast<NamedDecl>(arg))
   39   if (NamedDecl *ND = dyn_cast<NamedDecl>(arg))
   69   if (const NamedDecl *ND = dyn_cast<NamedDecl>(arg))
   69   if (const NamedDecl *ND = dyn_cast<NamedDecl>(arg))
tools/clang/tools/extra/clangd/unittests/PrintASTTests.cpp
   38     bool VisitNamedDecl(const NamedDecl *ND) {
tools/clang/tools/extra/clangd/unittests/QualityTests.cpp
  359   const NamedDecl *Foo = &findDecl(AST, "Foo");
  363   const NamedDecl *CtorDecl = &findDecl(AST, [](const NamedDecl &ND) {
  401   const NamedDecl *Foo = &findDecl(AST, "Foo::foo");
  402   const NamedDecl *Bar = &findDecl(AST, "Foo::bar");
  403   const NamedDecl *Tpl = &findDecl(AST, "Foo::tpl");
  426   const NamedDecl *CtorDecl = &findDecl(AST, [](const NamedDecl &ND) {
  430   const NamedDecl *DtorDecl = &findDecl(AST, [](const NamedDecl &ND) {
  458   const NamedDecl *Operator = &findDecl(AST, [](const NamedDecl &ND) {
tools/clang/tools/extra/clangd/unittests/SourceCodeTests.cpp
  559     const NamedDecl &Decl = findUnqualifiedDecl(AST, Name);
tools/clang/tools/extra/clangd/unittests/SymbolCollectorTests.cpp
  125     const NamedDecl &ND =
tools/clang/tools/extra/clangd/unittests/TestTU.cpp
  118 const NamedDecl &findDecl(ParsedAST &AST, llvm::StringRef QName) {
  139 const NamedDecl &findDecl(ParsedAST &AST,
  140                           std::function<bool(const NamedDecl &)> Filter) {
  143     llvm::SmallVector<const NamedDecl *, 1> Decls;
  144     bool VisitNamedDecl(const NamedDecl *ND) {
  159 const NamedDecl &findUnqualifiedDecl(ParsedAST &AST, llvm::StringRef Name) {
tools/clang/tools/extra/clangd/unittests/TestTU.h
   75 const NamedDecl &findDecl(ParsedAST &AST, llvm::StringRef QName);
   77 const NamedDecl &findDecl(ParsedAST &AST,
   78                           std::function<bool(const NamedDecl &)> Filter);
   80 const NamedDecl &findUnqualifiedDecl(ParsedAST &AST, llvm::StringRef Name);
tools/clang/tools/extra/clangd/unittests/TypeHierarchyTests.cpp
  231 const NamedDecl &findDeclWithTemplateArgs(ParsedAST &AST,
tools/clang/tools/extra/clangd/unittests/XRefsTests.cpp
 2284       if (const auto *ND = llvm::dyn_cast<NamedDecl>(D))
 2284       if (const auto *ND = llvm::dyn_cast<NamedDecl>(D))
tools/clang/tools/extra/modularize/Modularize.cpp
  612   bool VisitNamedDecl(NamedDecl *ND) {
  778   bool VisitNamedDecl(NamedDecl *ND) {
tools/clang/tools/extra/tool-template/ToolTemplate.cpp
   65     auto *D = Result.Nodes.getNodeAs<NamedDecl>("decl");
tools/clang/tools/extra/unittests/clang-doc/SerializeTest.cpp
   25   comments::FullComment *getComment(const NamedDecl *D) const {
tools/clang/tools/libclang/CIndex.cpp
 1281   if (NamedDecl *FriendD = D->getFriendDecl()) {
 3138         NamedDecl *Pack = E->getPack();
 4454   const NamedDecl *ND = dyn_cast<NamedDecl>(D);
 4454   const NamedDecl *ND = dyn_cast<NamedDecl>(D);
 4525       const NamedDecl *NS = getCursorNamespaceRef(C).first;
 4548         if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
 4548         if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
 5018       NamedDecl *Param = Params->getParam(I);
 5841       std::pair<const NamedDecl *, SourceLocation> P = getCursorNamespaceRef(C);
 6444     if (NamedDecl *Friend = cast<FriendDecl>(D)->getFriendDecl())
 6449     if (NamedDecl *Friend = cast<FriendTemplateDecl>(D)->getFriendDecl())
 7696   if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(D))
 7696   if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(D))
 7719   if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(D))
 7719   if (const NamedDecl *ND = dyn_cast_or_null<NamedDecl>(D))
tools/clang/tools/libclang/CIndexCodeCompletion.cpp
  612       NamedDecl *D = nullptr;
tools/clang/tools/libclang/CXCursor.cpp
  820 CXCursor cxcursor::MakeCursorNamespaceRef(const NamedDecl *NS,
  831 std::pair<const NamedDecl *, SourceLocation>
 1053   const NamedDecl *D = dyn_cast_or_null<NamedDecl>(getCursorDecl(cursor));
 1053   const NamedDecl *D = dyn_cast_or_null<NamedDecl>(getCursorDecl(cursor));
 1058   SmallVector<const NamedDecl *, 8> OverDecls;
 1061   for (SmallVectorImpl<const NamedDecl *>::iterator
 1431     if (const NamedDecl *namedDecl = dyn_cast_or_null<NamedDecl>(decl)) {
 1431     if (const NamedDecl *namedDecl = dyn_cast_or_null<NamedDecl>(decl)) {
tools/clang/tools/libclang/CXCursor.h
  109 CXCursor MakeCursorNamespaceRef(const NamedDecl *NS, SourceLocation Loc,
  114 std::pair<const NamedDecl *, SourceLocation> getCursorNamespaceRef(CXCursor C);
tools/clang/tools/libclang/CXIndexDataConsumer.cpp
  163     const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  163     const NamedDecl *ND = dyn_cast<NamedDecl>(D);
  197         if (auto *OrigND = dyn_cast<NamedDecl>(ASTNode.OrigD))
  206                     dyn_cast_or_null<NamedDecl>(ASTNode.Parent),
  343     const NamedDecl *BaseD = nullptr;
  426   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  426   if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
  542 bool CXIndexDataConsumer::handleDecl(const NamedDecl *D,
  825                          dyn_cast<NamedDecl>(DC), DC);
  885 bool CXIndexDataConsumer::handleReference(const NamedDecl *D, SourceLocation Loc,
  887                                       const NamedDecl *Parent,
  977                                           const NamedDecl *OrigD) {
  992           const NamedDecl *BaseD = BaseList.BaseEntities[i].Dcl;
 1009 bool CXIndexDataConsumer::markEntityOccurrenceInFile(const NamedDecl *D,
 1031 const NamedDecl *CXIndexDataConsumer::getEntityDecl(const NamedDecl *D) const {
 1031 const NamedDecl *CXIndexDataConsumer::getEntityDecl(const NamedDecl *D) const {
 1033   D = cast<NamedDecl>(D->getCanonicalDecl());
 1137 void CXIndexDataConsumer::getEntityInfo(const NamedDecl *D,
 1195 CXCursor CXIndexDataConsumer::getRefCursor(const NamedDecl *D, SourceLocation Loc) {
tools/clang/tools/libclang/CXIndexDataConsumer.h
   49   const NamedDecl *Dcl;
  413   bool handleReference(const NamedDecl *D, SourceLocation Loc, CXCursor Cursor,
  414                        const NamedDecl *Parent,
  444   bool handleDecl(const NamedDecl *D,
  454   bool handleCXXRecordDecl(const CXXRecordDecl *RD, const NamedDecl *OrigD);
  456   bool markEntityOccurrenceInFile(const NamedDecl *D, SourceLocation Loc);
  458   const NamedDecl *getEntityDecl(const NamedDecl *D) const;
  458   const NamedDecl *getEntityDecl(const NamedDecl *D) const;
  466   void getEntityInfo(const NamedDecl *D,
  476   CXCursor getRefCursor(const NamedDecl *D, SourceLocation Loc);
tools/clang/unittests/AST/ASTContextParentMapTest.cpp
   89   auto &Foo = *TU.lookup(&Ctx.Idents.get("foo")).front();
   90   auto &Bar = *cast<DeclContext>(Foo).lookup(&Ctx.Idents.get("bar")).front();
tools/clang/unittests/AST/ASTImporterFixtures.cpp
  159   SmallVector<NamedDecl *, 1> FoundDecls;
tools/clang/unittests/AST/ASTImporterTest.cpp
  299     auto *ND = dyn_cast<NamedDecl>(FromD);
  299     auto *ND = dyn_cast<NamedDecl>(FromD);
  303       if (auto *ND = dyn_cast<NamedDecl>(D))
  303       if (auto *ND = dyn_cast<NamedDecl>(D))
  591   const NamedDecl *Template = Node.getTemplatedDecl();
 1426       auto *ND = cast<NamedDecl>(D);
 1426       auto *ND = cast<NamedDecl>(D);
 4285     if (auto *ND = dyn_cast<NamedDecl>(D))
 4285     if (auto *ND = dyn_cast<NamedDecl>(D))
 4312   SmallVector<NamedDecl *, 2> FoundDecls;
 4348   SmallVector<NamedDecl *, 2> FoundDecls;
 4663   SmallVector<NamedDecl *, 2> FoundDecls;
 4747   SmallVector<NamedDecl *, 2> FoundDecls;
tools/clang/unittests/AST/ASTTypeTraitsTest.cpp
   25   return ASTNodeKind::getFromNodeKind<T>();
tools/clang/unittests/AST/DeclMatcher.h
   22   NodeType *Node = nullptr;
   26       Node = const_cast<NodeType *>(Result.Nodes.getNodeAs<NodeType>(""));
   32   NodeType *match(const Decl *D, const MatcherType &AMatcher) {
tools/clang/unittests/AST/DeclTest.cpp
   87   NamedDecl *DeclF = *DeclS->method_begin();
   88   NamedDecl *DeclG = *(++DeclS->method_begin());
tools/clang/unittests/AST/NamedDeclPrinterTest.cpp
   36   std::function<void(llvm::raw_ostream &OS, const NamedDecl *)> Printer;
   40       std::function<void(llvm::raw_ostream &OS, const NamedDecl *)> Printer)
   44     const NamedDecl *ND = Result.Nodes.getNodeAs<NamedDecl>("id");
   44     const NamedDecl *ND = Result.Nodes.getNodeAs<NamedDecl>("id");
   68     std::function<void(llvm::raw_ostream &, const NamedDecl *)> Print) {
tools/clang/unittests/AST/StructuralEquivalenceTest.cpp
   25   std::tuple<NodeType *, NodeType *> makeDecls(
   25   std::tuple<NodeType *, NodeType *> makeDecls(
   37     NodeType *D0 = FirstDeclMatcher<NodeType>().match(
   39     NodeType *D1 = FirstDeclMatcher<NodeType>().match(
   63   std::tuple<NodeType *, NodeType *> makeDecls(
   63   std::tuple<NodeType *, NodeType *> makeDecls(
   66     return makeDecls<NodeType, MatcherType>(
   73   std::tuple<NamedDecl *, NamedDecl *> makeNamedDecls(
   73   std::tuple<NamedDecl *, NamedDecl *> makeNamedDecls(
   77     return makeDecls<NamedDecl>(SrcCode0, SrcCode1, Lang, Matcher);
tools/clang/unittests/ASTMatchers/ASTMatchersTest.h
  423       if (const NamedDecl *Named = Nodes->getNodeAs<NamedDecl>(Id)) {
  423       if (const NamedDecl *Named = Nodes->getNodeAs<NamedDecl>(Id)) {
tools/clang/unittests/Frontend/FrontendActionTest.cpp
   70     virtual bool VisitNamedDecl(NamedDecl *Decl) {
tools/clang/unittests/Index/IndexTests.cpp
   80     const auto *ND = llvm::dyn_cast<NamedDecl>(D);
   80     const auto *ND = llvm::dyn_cast<NamedDecl>(D);
tools/clang/unittests/Tooling/ASTSelectionTest.cpp
   98   const auto *ND = Node.Node.get<NamedDecl>();
   98   const auto *ND = Node.Node.get<NamedDecl>();
tools/clang/unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp
   37   bool VisitNamedDecl(const NamedDecl *D);
   62   template <class T> void match(StringRef Path, const T *D) {
   72 bool LexicallyOrderedDeclVisitor::VisitNamedDecl(const NamedDecl *D) {
   81     if (const auto *ND = dyn_cast<NamedDecl>(D))
   81     if (const auto *ND = dyn_cast<NamedDecl>(D))
tools/clang/unittests/Tooling/RecursiveASTVisitorTestDeclVisitor.cpp
   64   bool VisitNamedDecl(NamedDecl *Decl) {
tools/clang/unittests/Tooling/RecursiveASTVisitorTests/TraversalScope.cpp
   19   bool VisitNamedDecl(NamedDecl *D) {
   38   auto &Foo = *TU.lookup(&Ctx.Idents.get("foo")).front();
   39   auto &Bar = *cast<DeclContext>(Foo).lookup(&Ctx.Idents.get("bar")).front();
tools/clang/unittests/Tooling/ToolingTest.cpp
  243     NamedDecl *F = dyn_cast<NamedDecl>(D);
  243     NamedDecl *F = dyn_cast<NamedDecl>(D);
tools/lldb/include/lldb/Symbol/ClangASTContext.h
  195   static CompilerType GetTypeForDecl(clang::NamedDecl *decl);
  222           clang::NamedDecl *named_decl = result[0];
  948                                            clang::NamedDecl *target);
tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
   31       llvm::SmallVectorImpl<clang::NamedDecl *> *results);
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
   58   if (NamedDecl *named_decl = dyn_cast<NamedDecl>(D)) {
   58   if (NamedDecl *named_decl = dyn_cast<NamedDecl>(D)) {
  430 void ASTResultSynthesizer::RecordPersistentDecl(NamedDecl *D) {
  451   for (clang::NamedDecl *decl : m_decls) {
  474     if (NamedDecl *NamedDecl_scratch = dyn_cast<NamedDecl>(D_scratch))
  474     if (NamedDecl *NamedDecl_scratch = dyn_cast<NamedDecl>(D_scratch))
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
  150   void RecordPersistentDecl(clang::NamedDecl *D);
  161   std::vector<clang::NamedDecl *> m_decls; ///< Persistent declarations to
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.h
  463       llvm::MapVector<clang::NamedDecl *, clang::SourceLocation> &Undefined)
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
  215     llvm::SmallVector<NamedDecl *, 1> method_decls;
  259   llvm::SmallVector<NamedDecl *, 4> name_decls;
  556     if (const NamedDecl *context_named_decl = dyn_cast<NamedDecl>(context_decl))
  556     if (const NamedDecl *context_named_decl = dyn_cast<NamedDecl>(context_decl))
  629         if (const NamedDecl *context_named_decl =
  630                 dyn_cast<NamedDecl>(context_decl))
  702     else if (const NamedDecl *context_named_decl =
  703                  dyn_cast<NamedDecl>(context.m_decl_context))
  923           std::vector<clang::NamedDecl *> decls;
  935           clang::NamedDecl *const decl_from_modules = decls[0];
  941             clang::NamedDecl *copied_named_decl =
  942                 copied_decl ? dyn_cast<clang::NamedDecl>(copied_decl) : nullptr;
  984         std::vector<clang::NamedDecl *> decls;
  998         clang::NamedDecl *copied_named_decl =
  999             copied_decl ? dyn_cast<clang::NamedDecl>(copied_decl) : nullptr;
 1102   llvm::SmallVector<NamedDecl *, 1> methods;
 1119   for (NamedDecl *named_decl : methods) {
 1398       std::vector<clang::NamedDecl *> decls;
 1438     std::vector<clang::NamedDecl *> decls;
 1585     std::vector<clang::NamedDecl *> decls;
 1629     std::vector<clang::NamedDecl *> decls;
 2088 clang::NamedDecl *NameSearchContext::AddVarDecl(const CompilerType &type) {
 2103   clang::NamedDecl *Decl = VarDecl::Create(
 2111 clang::NamedDecl *NameSearchContext::AddFunDecl(const CompilerType &type,
 2202 clang::NamedDecl *NameSearchContext::AddGenericFunDecl() {
 2218 clang::NamedDecl *
 2249   for (clang::NamedDecl *decl : result)
 2253 void NameSearchContext::AddNamedDecl(clang::NamedDecl *decl) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
  436   llvm::SmallVectorImpl<clang::NamedDecl *>
  475                     llvm::SmallVectorImpl<clang::NamedDecl *> &decls,
  487   clang::NamedDecl *AddVarDecl(const CompilerType &type);
  497   clang::NamedDecl *AddFunDecl(const CompilerType &type, bool extern_c = false);
  501   clang::NamedDecl *AddGenericFunDecl();
  508   clang::NamedDecl *AddTypeDecl(const CompilerType &compiler_type);
  523   void AddNamedDecl(clang::NamedDecl *decl);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.cpp
   22   std::vector<clang::NamedDecl *> named_decls;
   24   for (auto *named_decl : named_decls) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h
   38                              std::vector<clang::NamedDecl *> &decls) = 0;
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  238 bool ClangExpressionDeclMap::AddPersistentVariable(const NamedDecl *decl,
  351 bool ClangExpressionDeclMap::AddValueToStruct(const NamedDecl *decl,
  472 bool ClangExpressionDeclMap::GetStructElement(const NamedDecl *&decl,
  508 bool ClangExpressionDeclMap::GetFunctionInfo(const NamedDecl *decl,
  711     else if (const NamedDecl *context_named_decl =
  712                  dyn_cast<NamedDecl>(context.m_decl_context))
  822       NamedDecl *persistent_decl =
  833       NamedDecl *parser_named_decl =
  834           dyn_cast<NamedDecl>(parser_persistent_decl);
 1209     std::vector<clang::NamedDecl *> decls_from_modules;
 1390         for (clang::NamedDecl *decl : decls_from_modules) {
 1392             clang::NamedDecl *copied_decl =
 1421           std::vector<clang::NamedDecl *> decls;
 1426           clang::NamedDecl *const decl_from_modules = decls[0];
 1643   NamedDecl *var_decl = nullptr;
 1693   NamedDecl *var_decl =
 1736   NamedDecl *var_decl = context.AddVarDecl(parser_type);
 1789       const NamedDecl *named_decl = parser_vars->m_named_decl;
 1863   NamedDecl *var_decl = context.AddVarDecl(parser_clang_type);
 1898   NamedDecl *function_decl = nullptr;
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
  126   bool AddPersistentVariable(const clang::NamedDecl *decl,
  150   bool AddValueToStruct(const clang::NamedDecl *decl, ConstString name,
  207   bool GetStructElement(const clang::NamedDecl *&decl, llvm::Value *&value,
  222   bool GetFunctionInfo(const clang::NamedDecl *decl, uint64_t &ptr);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
  780         const NamedDecl *D = R.Declaration;
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
   83   FindVariableInList(ExpressionVariableList &list, const clang::NamedDecl *decl,
  125     const clang::NamedDecl
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
   83                      std::vector<clang::NamedDecl *> &decls) override;
  362                                       std::vector<clang::NamedDecl *> &decls) {
  384   for (clang::NamedDecl *named_decl : lookup_result) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
   83                                                       clang::NamedDecl *decl) {
   96 clang::NamedDecl *
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
   65   void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl);
   67   clang::NamedDecl *GetPersistentDecl(ConstString name);
   83   typedef llvm::DenseMap<const char *, clang::NamedDecl *> PersistentDeclMap;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
  116 clang::NamedDecl *IRForTarget::DeclForGlobal(const GlobalValue *global_val,
  154 clang::NamedDecl *IRForTarget::DeclForGlobal(GlobalValue *global_val) {
  236   clang::NamedDecl *result_decl = DeclForGlobal(result_global);
 1205     clang::NamedDecl *named_decl = DeclForGlobal(global_variable);
 1761     const clang::NamedDecl *decl = nullptr;
tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
  196   static clang::NamedDecl *DeclForGlobal(const llvm::GlobalValue *global_val,
  200   clang::NamedDecl *DeclForGlobal(llvm::GlobalValue *global);
tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
  557                                std::vector<clang::NamedDecl *> &decls) {
tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
   31                      std::vector<clang::NamedDecl *> &decls) override;
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
 3371         if (clang::NamedDecl *clang_imported_decl =
 3372                 llvm::dyn_cast<clang::NamedDecl>(
tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
  328 static clang::NamedDecl *
tools/lldb/source/Symbol/ClangASTContext.cpp
  205     for (auto *overridden_decl : paths.found_decls())
 1312   if (auto *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl))
 1312   if (auto *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl))
 1317 CompilerType ClangASTContext::GetTypeForDecl(clang::NamedDecl *decl) {
 1431     llvm::SmallVector<NamedDecl *, 8> &template_param_decls) {
 1492   llvm::SmallVector<NamedDecl *, 8> template_param_decls;
 1533   for (NamedDecl *decl : result) {
 1539   llvm::SmallVector<NamedDecl *, 8> template_param_decls;
 1592   llvm::SmallVector<NamedDecl *, 8> template_param_decls;
 1816     for (NamedDecl *decl : result) {
 1920                                         clang::NamedDecl *target) {
 2326     clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl_ctx);
 2326     clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl_ctx);
 2348     clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl);
 2348     clang::NamedDecl *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl);
 2390         clang::NamedDecl *lhs_named_decl =
 2391             llvm::dyn_cast<clang::NamedDecl>(lhs_decl);
 2392         clang::NamedDecl *rhs_named_decl =
 2393             llvm::dyn_cast<clang::NamedDecl>(rhs_decl);
 2415             clang::NamedDecl *lhs_named_decl =
 2416                 llvm::dyn_cast<clang::NamedDecl>(lhs_decl_ctx);
 2417             clang::NamedDecl *rhs_named_decl =
 2418                 llvm::dyn_cast<clang::NamedDecl>(rhs_decl_ctx);
 7100                                        clang::NamedDecl *canonical_decl,
 7231               for (clang::NamedDecl *path_decl : path->Decls) {
 7998           clang::NamedDecl **chain =
 7999               new (*ast->getASTContext()) clang::NamedDecl *[2];
 8018           clang::NamedDecl **chain = new (*ast->getASTContext())
 8019               clang::NamedDecl *[nested_chain_size + 1];
 9886     clang::NamedDecl *nd =
 9887         llvm::dyn_cast<NamedDecl>((clang::Decl *)opaque_decl);
 9896     clang::NamedDecl *nd =
 9897         llvm::dyn_cast<clang::NamedDecl>((clang::Decl *)opaque_decl);
10008               if (clang::NamedDecl *nd =
10009                       llvm::dyn_cast<clang::NamedDecl>(target)) {
10016           } else if (clang::NamedDecl *nd =
10017                          llvm::dyn_cast<clang::NamedDecl>(child)) {
10123                 clang::NamedDecl *nd = llvm::dyn_cast<clang::NamedDecl>(target);
10123                 clang::NamedDecl *nd = llvm::dyn_cast<clang::NamedDecl>(target);
10160     clang::NamedDecl *named_decl =
10161         llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
10171     clang::NamedDecl *named_decl =
10172         llvm::dyn_cast<clang::NamedDecl>((clang::DeclContext *)opaque_decl_ctx);
tools/lldb/source/Symbol/ClangASTImporter.cpp
  129       if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl))
  129       if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl))
  263   std::set<NamedDecl *> m_decls_to_complete;
  264   std::set<NamedDecl *> m_decls_already_completed;
  288       NamedDecl *decl = *m_decls_to_complete.begin();
  332     NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
  332     NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
  971         if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
  971         if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
 1055     if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
 1055     if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) {
tools/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp
   49     llvm::SmallVector<clang::NamedDecl *, 3> results;
tools/lldb/source/Symbol/CxxModuleHandler.cpp
  136     NamedDecl *ns = llvm::dyn_cast<NamedDecl>(foreign_ctxt);
  136     NamedDecl *ns = llvm::dyn_cast<NamedDecl>(foreign_ctxt);
  140     for (NamedDecl *named_decl : *lookup_result) {
usr/include/c++/7.4.0/bits/move.h
   72     constexpr _Tp&&
   83     constexpr _Tp&&
usr/include/c++/7.4.0/bits/std_function.h
  299       _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
  628       using _Invoker_type = _Res (*)(const _Any_data&, _ArgTypes&&...);
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
 1554     { typedef _Tp     type; };
 1558     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1580     { typedef _Tp const     type; };
 1629     { typedef _Tp   type; };
 1659     { typedef _Tp&&   type; };
 1983     { typedef _Up     type; };
 1999     { typedef typename remove_reference<_Tp>::type*     type; };
 2003     : public __add_pointer_helper<_Tp>
utils/unittest/googletest/include/gtest/gtest-printers.h
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {