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

Derived Classes

tools/clang/include/clang/AST/Decl.h
  108 class TranslationUnitDecl : public Decl, public DeclContext {
  222 class ExternCContextDecl : public Decl, public DeclContext {
  523 class NamespaceDecl : public NamedDecl, public DeclContext,
 1785 class FunctionDecl : public DeclaratorDecl,
 3140 class TagDecl : public TypeDecl,
 3958 class BlockDecl : public Decl, public DeclContext {
 4147 class CapturedDecl final
 4317 class ExportDecl final : public Decl, public DeclContext {
tools/clang/include/clang/AST/DeclCXX.h
 2753 class LinkageSpecDecl : public Decl, public DeclContext {
tools/clang/include/clang/AST/DeclObjC.h
  138 class ObjCMethodDecl : public NamedDecl, public DeclContext {
  968 class ObjCContainerDecl : public NamedDecl, public DeclContext {
tools/clang/include/clang/AST/DeclOpenMP.h
  102 class OMPDeclareReductionDecl final : public ValueDecl, public DeclContext {
  217 class OMPDeclareMapperDecl final : public ValueDecl, public DeclContext {

Declarations

tools/clang/include/clang/AST/ASTImporter.h
   41 class DeclContext;
tools/clang/include/clang/AST/ASTImporterLookupTable.h
   26 class DeclContext;
tools/clang/include/clang/AST/ASTMutationListener.h
   23   class DeclContext;
tools/clang/include/clang/AST/DeclBase.h
   46 class DeclContext;
tools/clang/include/clang/AST/Type.h
  104 class DeclContext;
tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h
   24 class DeclContext;
tools/clang/include/clang/Analysis/CallGraph.h
   33 class DeclContext;
tools/clang/include/clang/Basic/Diagnostic.h
   42 class DeclContext;
tools/clang/include/clang/Basic/PartialDiagnostic.h
   32 class DeclContext;
tools/clang/include/clang/CrossTU/CrossTranslationUnit.h
   30 class DeclContext;
tools/clang/include/clang/Index/IndexDataConsumer.h
   17   class DeclContext;
tools/clang/include/clang/Sema/CodeCompleteConsumer.h
   40 class DeclContext;
tools/clang/include/clang/Sema/IdentifierResolver.h
   28 class DeclContext;
tools/clang/include/clang/Sema/Scope.h
   33 class DeclContext;
tools/clang/include/clang/Sema/Sema.h
  109   class DeclContext;
tools/clang/include/clang/Sema/Template.h
   35 class DeclContext;
tools/clang/include/clang/Sema/TypoCorrection.h
   34 class DeclContext;
tools/clang/include/clang/Serialization/ASTReader.h
   86 class DeclContext;
tools/clang/include/clang/Tooling/Core/Lookup.h
   22 class DeclContext;
tools/clang/lib/Index/IndexingContext.h
   28   class DeclContext;
tools/lldb/include/lldb/Core/ClangForward.h
   45 class DeclContext;
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
   22 class DeclContext;

References

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/Support/Casting.h
   58     return To::classof(&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);
  142   return isa_impl_wrap<X, const Y,
  165   using ret_type = To &;       // Normal case, return Ty&
  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;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  258   return cast_convert_val<X, Y,
  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;
  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) {
tools/clang/include/clang/AST/ASTContext.h
  515   llvm::DenseMap<const DeclContext *, std::unique_ptr<MangleNumberingContext>>
 2815   MangleNumberingContext &getManglingNumberContext(const DeclContext *DC);
tools/clang/include/clang/AST/ASTDumper.h
   41   void dumpLookups(const DeclContext *DC, bool DumpDecls);
tools/clang/include/clang/AST/ASTImporter.h
  284     FoundDeclsTy findDeclsInToCtx(DeclContext *DC, DeclarationName Name);
  406     llvm::Expected<DeclContext *> ImportContext(DeclContext *FromDC);
  406     llvm::Expected<DeclContext *> ImportContext(DeclContext *FromDC);
  529     HandleNameConflict(DeclarationName Name, DeclContext *DC, unsigned IDNS,
tools/clang/include/clang/AST/ASTImporterLookupTable.h
   55   using DCMap = llvm::DenseMap<DeclContext *, NameMap>;
   57   void add(DeclContext *DC, NamedDecl *ND);
   58   void remove(DeclContext *DC, NamedDecl *ND);
   68   void dump(DeclContext *DC) const;
tools/clang/include/clang/AST/ASTLambda.h
   33 inline bool isLambdaCallOperator(const DeclContext *DC) {
   62 inline bool isGenericLambdaCallOperatorSpecialization(DeclContext *DC) {
   70 inline DeclContext *getLambdaAwareParentOfDeclContext(DeclContext *DC) {
   70 inline DeclContext *getLambdaAwareParentOfDeclContext(DeclContext *DC) {
tools/clang/include/clang/AST/ASTMutationListener.h
   54   virtual void AddedVisibleDecl(const DeclContext *DC, const Decl *D) {}
tools/clang/include/clang/AST/ASTNodeTraverser.h
   94         if (const auto *DC = dyn_cast<DeclContext>(D))
   94         if (const auto *DC = dyn_cast<DeclContext>(D))
  226   void dumpDeclContext(const DeclContext *DC) {
tools/clang/include/clang/AST/CXXInheritance.h
   81   DeclContext::lookup_result Decls;
tools/clang/include/clang/AST/Decl.h
  108 class TranslationUnitDecl : public Decl, public DeclContext {
  130   static DeclContext *castToDeclContext(const TranslationUnitDecl *D) {
  133   static TranslationUnitDecl *castFromDeclContext(const DeclContext *DC) {
  222 class ExternCContextDecl : public Decl, public DeclContext {
  236   static DeclContext *castToDeclContext(const ExternCContextDecl *D) {
  239   static ExternCContextDecl *castFromDeclContext(const DeclContext *DC) {
  261   NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
  355     const DeclContext *DC = getDeclContext();
  487   LabelDecl(DeclContext *DC, SourceLocation IdentL, IdentifierInfo *II,
  494   static LabelDecl *Create(ASTContext &C, DeclContext *DC,
  496   static LabelDecl *Create(ASTContext &C, DeclContext *DC,
  523 class NamespaceDecl : public NamedDecl, public DeclContext,
  539   NamespaceDecl(ASTContext &C, DeclContext *DC, bool Inline,
  553   static NamespaceDecl *Create(ASTContext &C, DeclContext *DC,
  634   static DeclContext *castToDeclContext(const NamespaceDecl *D) {
  637   static NamespaceDecl *castFromDeclContext(const DeclContext *DC) {
  651   ValueDecl(Kind DK, DeclContext *DC, SourceLocation L,
  715   DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L,
  995   VarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1024   static VarDecl *Create(ASTContext &C, DeclContext *DC,
 1123     if (const DeclContext *DC = getLexicalDeclContext())
 1137     const DeclContext *DC = getLexicalDeclContext()->getRedeclContext();
 1565   static ImplicitParamDecl *Create(ASTContext &C, DeclContext *DC,
 1573   ImplicitParamDecl(ASTContext &C, DeclContext *DC, SourceLocation IdLoc,
 1607   ParmVarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1619   static ParmVarDecl *Create(ASTContext &C, DeclContext *DC,
 1741   void setOwningFunction(DeclContext *FD) { setDeclContext(FD); }
 1786                      public DeclContext,
 1898   FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1932   Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1943   static FunctionDecl *Create(ASTContext &C, DeclContext *DC,
 2641   static DeclContext *castToDeclContext(const FunctionDecl *D) {
 2644   static FunctionDecl *castFromDeclContext(const DeclContext *DC) {
 2697   FieldDecl(Kind DK, DeclContext *DC, SourceLocation StartLoc,
 2712   static FieldDecl *Create(const ASTContext &C, DeclContext *DC,
 2867   EnumConstantDecl(DeclContext *DC, SourceLocation L,
 2906   IndirectFieldDecl(ASTContext &C, DeclContext *DC, SourceLocation L,
 2915   static IndirectFieldDecl *Create(ASTContext &C, DeclContext *DC,
 2965   TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
 3007   TypedefNameDecl(Kind DK, ASTContext &C, DeclContext *DC,
 3095   TypedefDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 3100   static TypedefDecl *Create(ASTContext &C, DeclContext *DC,
 3118   TypeAliasDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 3124   static TypeAliasDecl *Create(ASTContext &C, DeclContext *DC,
 3141                 public DeclContext,
 3173   TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC,
 3390   static DeclContext *castToDeclContext(const TagDecl *D) {
 3394   static TagDecl *castFromDeclContext(const DeclContext *DC) {
 3438   EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 3507   static EnumDecl *Create(ASTContext &C, DeclContext *DC,
 3698   RecordDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC,
 3703   static RecordDecl *Create(const ASTContext &C, TagKind TK, DeclContext *DC,
 3927   FileScopeAsmDecl(DeclContext *DC, StringLiteral *asmstring,
 3934   static FileScopeAsmDecl *Create(ASTContext &C, DeclContext *DC,
 3958 class BlockDecl : public Decl, public DeclContext {
 4025   BlockDecl(DeclContext *DC, SourceLocation CaretLoc);
 4028   static BlockDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation L);
 4138   static DeclContext *castToDeclContext(const BlockDecl *D) {
 4141   static BlockDecl *castFromDeclContext(const DeclContext *DC) {
 4149       public DeclContext,
 4166   explicit CapturedDecl(DeclContext *DC, unsigned NumParams);
 4181   static CapturedDecl *Create(ASTContext &C, DeclContext *DC,
 4234   static DeclContext *castToDeclContext(const CapturedDecl *D) {
 4237   static CapturedDecl *castFromDeclContext(const DeclContext *DC) {
 4271   ImportDecl(DeclContext *DC, SourceLocation StartLoc, Module *Imported,
 4274   ImportDecl(DeclContext *DC, SourceLocation StartLoc, Module *Imported,
 4281   static ImportDecl *Create(ASTContext &C, DeclContext *DC,
 4287   static ImportDecl *CreateImplicit(ASTContext &C, DeclContext *DC,
 4317 class ExportDecl final : public Decl, public DeclContext {
 4326   ExportDecl(DeclContext *DC, SourceLocation ExportLoc)
 4331   static ExportDecl *Create(ASTContext &C, DeclContext *DC,
 4355   static DeclContext *castToDeclContext(const ExportDecl *D) {
 4358   static ExportDecl *castFromDeclContext(const DeclContext *DC) {
 4365   EmptyDecl(DeclContext *DC, SourceLocation L) : Decl(Empty, DC, L) {}
 4370   static EmptyDecl *Create(ASTContext &C, DeclContext *DC,
tools/clang/include/clang/AST/DeclBase.h
  250     DeclContext *SemanticDC;
  251     DeclContext *LexicalDC;
  267   llvm::PointerUnion<DeclContext*, MultipleDC*> DeclCtx;
  269   bool isInSemaDC() const { return DeclCtx.is<DeclContext*>(); }
  276   DeclContext *getSemanticDC() const {
  277     return DeclCtx.get<DeclContext*>();
  351                      DeclContext *Parent, std::size_t Extra = 0);
  358   static ModuleOwnershipKind getModuleOwnershipKindForChildOf(DeclContext *DC) {
  379   Decl(Kind DK, DeclContext *DC, SourceLocation L)
  438   DeclContext *getDeclContext() {
  443   const DeclContext *getDeclContext() const {
  828   DeclContext *getLexicalDeclContext() {
  833   const DeclContext *getLexicalDeclContext() const {
  843   void setDeclContext(DeclContext *DC);
  845   void setLexicalDeclContext(DeclContext *DC);
  870   const DeclContext *getParentFunctionOrMethod() const;
  871   DeclContext *getParentFunctionOrMethod() {
 1128   static DeclContext *castToDeclContext(const Decl *);
 1129   static Decl *castFromDeclContext(const DeclContext *);
 1158   void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
 1158   void setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
 1779   DeclContext *getParent() {
 1782   const DeclContext *getParent() const {
 1795   DeclContext *getLexicalParent() {
 1798   const DeclContext *getLexicalParent() const {
 1802   DeclContext *getLookupParent();
 1804   const DeclContext *getLookupParent() const {
 1903   bool Equals(const DeclContext *DC) const {
 1909   bool Encloses(const DeclContext *DC) const;
 1925   DeclContext *getPrimaryContext();
 1926   const DeclContext *getPrimaryContext() const {
 1933   DeclContext *getRedeclContext();
 1934   const DeclContext *getRedeclContext() const {
 1939   DeclContext *getEnclosingNamespaceContext();
 1940   const DeclContext *getEnclosingNamespaceContext() const {
 1956   bool InEnclosingNamespaceSetOf(const DeclContext *NS) const;
 1981   void collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts);
 2052     DeclContext::decl_iterator Current;
 2069         std::iterator_traits<DeclContext::decl_iterator>::difference_type;
 2082     explicit specific_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
 2128     DeclContext::decl_iterator Current;
 2147         std::iterator_traits<DeclContext::decl_iterator>::difference_type;
 2160     explicit filtered_decl_iterator(DeclContext::decl_iterator C) : Current(C) {
 2316   using ddiag_range = llvm::iterator_range<DeclContext::ddiag_iterator>;
 2385   static bool classof(const DeclContext *D) { return true; }
 2447   void buildLookupImpl(DeclContext *DCtx, bool Internal);
 2462   static const ToTy *doit(const DeclContext *Val) {
 2466   static ToTy *doit(DeclContext *Val) {
 2474   static const ToTy *doit(const DeclContext *Val) {
 2478   static ToTy *doit(DeclContext *Val) {
 2489 struct isa_impl<To, ::clang::DeclContext> {
 2490   static bool doit(const ::clang::DeclContext &Val) {
 2498                         const ::clang::DeclContext,const ::clang::DeclContext> {
 2498                         const ::clang::DeclContext,const ::clang::DeclContext> {
 2499   static const ToTy &doit(const ::clang::DeclContext &Val) {
 2505 struct cast_convert_val<ToTy, ::clang::DeclContext, ::clang::DeclContext> {
 2505 struct cast_convert_val<ToTy, ::clang::DeclContext, ::clang::DeclContext> {
 2506   static ToTy &doit(::clang::DeclContext &Val) {
 2513                      const ::clang::DeclContext*, const ::clang::DeclContext*> {
 2513                      const ::clang::DeclContext*, const ::clang::DeclContext*> {
 2514   static const ToTy *doit(const ::clang::DeclContext *Val) {
 2520 struct cast_convert_val<ToTy, ::clang::DeclContext*, ::clang::DeclContext*> {
 2520 struct cast_convert_val<ToTy, ::clang::DeclContext*, ::clang::DeclContext*> {
 2521   static ToTy *doit(::clang::DeclContext *Val) {
 2528 struct cast_convert_val< ::clang::DeclContext, FromTy, FromTy> {
 2529   static ::clang::DeclContext &doit(const FromTy &Val) {
 2535 struct cast_convert_val< ::clang::DeclContext, FromTy*, FromTy*> {
 2536   static ::clang::DeclContext *doit(const FromTy *Val) {
 2542 struct cast_convert_val< const ::clang::DeclContext, FromTy, FromTy> {
 2543   static const ::clang::DeclContext &doit(const FromTy &Val) {
 2549 struct cast_convert_val< const ::clang::DeclContext, FromTy*, FromTy*> {
 2550   static const ::clang::DeclContext *doit(const FromTy *Val) {
tools/clang/include/clang/AST/DeclCXX.h
   91   AccessSpecDecl(AccessSpecifier AS, DeclContext *DC,
  119                                 DeclContext *DC, SourceLocation ASLoc,
  483   CXXRecordDecl(Kind K, TagKind TK, const ASTContext &C, DeclContext *DC,
  544   static CXXRecordDecl *Create(const ASTContext &C, TagKind TK, DeclContext *DC,
  549   static CXXRecordDecl *CreateLambda(const ASTContext &C, DeclContext *DC,
 1455   bool isCurrentInstantiation(const DeclContext *CurContext) const;
 1851   CXXDeductionGuideDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1871   Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 2753 class LinkageSpecDecl : public Decl, public DeclContext {
 2778   LinkageSpecDecl(DeclContext *DC, SourceLocation ExternLoc,
 2782   static LinkageSpecDecl *Create(ASTContext &C, DeclContext *DC,
 2826   static DeclContext *castToDeclContext(const LinkageSpecDecl *D) {
 2830   static LinkageSpecDecl *castFromDeclContext(const DeclContext *DC) {
 2860   DeclContext *CommonAncestor;
 2862   UsingDirectiveDecl(DeclContext *DC, SourceLocation UsingLoc,
 2867                      DeclContext *CommonAncestor)
 2912   DeclContext *getCommonAncestor() { return CommonAncestor; }
 2913   const DeclContext *getCommonAncestor() const { return CommonAncestor; }
 2925   static UsingDirectiveDecl *Create(ASTContext &C, DeclContext *DC,
 2931                                     DeclContext *CommonAncestor);
 2968   NamespaceAliasDecl(ASTContext &C, DeclContext *DC,
 2985   static NamespaceAliasDecl *Create(ASTContext &C, DeclContext *DC,
 3095   UsingShadowDecl(Kind K, ASTContext &C, DeclContext *DC, SourceLocation Loc,
 3103   static UsingShadowDecl *Create(ASTContext &C, DeclContext *DC,
 3186   ConstructorUsingShadowDecl(ASTContext &C, DeclContext *DC, SourceLocation Loc,
 3215   static ConstructorUsingShadowDecl *Create(ASTContext &C, DeclContext *DC,
 3293   UsingDecl(DeclContext *DC, SourceLocation UL,
 3394   static UsingDecl *Create(ASTContext &C, DeclContext *DC,
 3435   UsingPackDecl(DeclContext *DC, NamedDecl *InstantiatedFrom,
 3465   static UsingPackDecl *Create(ASTContext &C, DeclContext *DC,
 3509   UnresolvedUsingValueDecl(DeclContext *DC, QualType Ty,
 3558     Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc,
 3604   UnresolvedUsingTypenameDecl(DeclContext *DC, SourceLocation UsingLoc,
 3648     Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc,
 3674   StaticAssertDecl(DeclContext *DC, SourceLocation StaticAssertLoc,
 3686   static StaticAssertDecl *Create(ASTContext &C, DeclContext *DC,
 3727   BindingDecl(DeclContext *DC, SourceLocation IdLoc, IdentifierInfo *Id)
 3735   static BindingDecl *Create(ASTContext &C, DeclContext *DC,
 3781   DecompositionDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 3800   static DecompositionDecl *Create(ASTContext &C, DeclContext *DC,
 3849   MSPropertyDecl(DeclContext *DC, SourceLocation L, DeclarationName N,
 3859   static MSPropertyDecl *Create(ASTContext &C, DeclContext *DC,
tools/clang/include/clang/AST/DeclContextInternals.h
  143   DeclContext::lookup_result getLookupResult() {
tools/clang/include/clang/AST/DeclFriend.h
   84   FriendDecl(DeclContext *DC, SourceLocation L, FriendUnion Friend,
  111   static FriendDecl *Create(ASTContext &C, DeclContext *DC,
tools/clang/include/clang/AST/DeclLookups.h
   75 inline DeclContext::lookups_range DeclContext::lookups() const {
   76   DeclContext *Primary = const_cast<DeclContext*>(this)->getPrimaryContext();
   88 inline DeclContext::lookups_range
   90   DeclContext *Primary = const_cast<DeclContext*>(this)->getPrimaryContext();
tools/clang/include/clang/AST/DeclObjC.h
  138 class ObjCMethodDecl : public NamedDecl, public DeclContext {
  173                  DeclContext *contextDecl, bool isInstance = true,
  233          DeclContext *contextDecl, bool isInstance = true,
  523   static DeclContext *castToDeclContext(const ObjCMethodDecl *D) {
  527   static ObjCMethodDecl *castFromDeclContext(const DeclContext *DC) {
  572   ObjCTypeParamDecl(ASTContext &ctx, DeclContext *dc,
  588   static ObjCTypeParamDecl *Create(ASTContext &ctx, DeclContext *dc,
  798   ObjCPropertyDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
  810   static ObjCPropertyDecl *Create(ASTContext &C, DeclContext *DC,
  956   static ObjCPropertyDecl *findPropertyDecl(const DeclContext *DC,
  968 class ObjCContainerDecl : public NamedDecl, public DeclContext {
  979   ObjCContainerDecl(Kind DK, DeclContext *DC, IdentifierInfo *Id,
 1137   static DeclContext *castToDeclContext(const ObjCContainerDecl *D) {
 1141   static ObjCContainerDecl *castFromDeclContext(const DeclContext *DC) {
 1252   ObjCInterfaceDecl(const ASTContext &C, DeclContext *DC, SourceLocation AtLoc,
 1284   static ObjCInterfaceDecl *Create(const ASTContext &C, DeclContext *DC,
 2012   ObjCAtDefsFieldDecl(DeclContext *DC, SourceLocation StartLoc,
 2022   static ObjCAtDefsFieldDecl *Create(ASTContext &C, DeclContext *DC,
 2080   ObjCProtocolDecl(ASTContext &C, DeclContext *DC, IdentifierInfo *Id,
 2112   static ObjCProtocolDecl *Create(ASTContext &C, DeclContext *DC,
 2300   ObjCCategoryDecl(DeclContext *DC, SourceLocation AtLoc,
 2313   static ObjCCategoryDecl *Create(ASTContext &C, DeclContext *DC,
 2431   ObjCImplDecl(Kind DK, DeclContext *DC,
 2502   ObjCCategoryImplDecl(DeclContext *DC, IdentifierInfo *Id,
 2516   static ObjCCategoryImplDecl *Create(ASTContext &C, DeclContext *DC,
 2572   ObjCImplementationDecl(DeclContext *DC,
 2593   static ObjCImplementationDecl *Create(ASTContext &C, DeclContext *DC,
 2732   ObjCCompatibleAliasDecl(DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
 2739   static ObjCCompatibleAliasDecl *Create(ASTContext &C, DeclContext *DC,
 2790   ObjCPropertyImplDecl(DeclContext *DC, SourceLocation atLoc, SourceLocation L,
 2803   static ObjCPropertyImplDecl *Create(ASTContext &C, DeclContext *DC,
tools/clang/include/clang/AST/DeclOpenMP.h
   49   OMPThreadPrivateDecl(Kind DK, DeclContext *DC, SourceLocation L) :
   63   static OMPThreadPrivateDecl *Create(ASTContext &C, DeclContext *DC,
  102 class OMPDeclareReductionDecl final : public ValueDecl, public DeclContext {
  134   OMPDeclareReductionDecl(Kind DK, DeclContext *DC, SourceLocation L,
  145   Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name,
  200   static DeclContext *castToDeclContext(const OMPDeclareReductionDecl *D) {
  203   static OMPDeclareReductionDecl *castFromDeclContext(const DeclContext *DC) {
  217 class OMPDeclareMapperDecl final : public ValueDecl, public DeclContext {
  233   OMPDeclareMapperDecl(Kind DK, DeclContext *DC, SourceLocation L,
  249   static OMPDeclareMapperDecl *Create(ASTContext &C, DeclContext *DC,
  297   static DeclContext *castToDeclContext(const OMPDeclareMapperDecl *D) {
  300   static OMPDeclareMapperDecl *castFromDeclContext(const DeclContext *DC) {
  316   OMPCapturedExprDecl(ASTContext &C, DeclContext *DC, IdentifierInfo *Id,
  325   static OMPCapturedExprDecl *Create(ASTContext &C, DeclContext *DC,
  356   OMPRequiresDecl(Kind DK, DeclContext *DC, SourceLocation L)
  376   static OMPRequiresDecl *Create(ASTContext &C, DeclContext *DC,
  442   OMPAllocateDecl(Kind DK, DeclContext *DC, SourceLocation L)
  470   static OMPAllocateDecl *Create(ASTContext &C, DeclContext *DC,
tools/clang/include/clang/AST/DeclTemplate.h
  392   TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name,
  397   TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name,
  835   RedeclarableTemplateDecl(Kind DK, ASTContext &C, DeclContext *DC,
  984   FunctionTemplateDecl(ASTContext &C, DeclContext *DC, SourceLocation L,
 1093   static FunctionTemplateDecl *Create(ASTContext &C, DeclContext *DC,
 1165   TemplateTypeParmDecl(DeclContext *DC, SourceLocation KeyLoc,
 1171   static TemplateTypeParmDecl *Create(const ASTContext &C, DeclContext *DC,
 1285   NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation StartLoc,
 1292   NonTypeTemplateParmDecl(DeclContext *DC, SourceLocation StartLoc,
 1301   Create(const ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1306   Create(const ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 1459   TemplateTemplateParmDecl(DeclContext *DC, SourceLocation L,
 1465   TemplateTemplateParmDecl(DeclContext *DC, SourceLocation L,
 1477   static TemplateTemplateParmDecl *Create(const ASTContext &C, DeclContext *DC,
 1482   static TemplateTemplateParmDecl *Create(const ASTContext &C, DeclContext *DC,
 1604   BuiltinTemplateDecl(const ASTContext &C, DeclContext *DC,
 1614   static BuiltinTemplateDecl *Create(const ASTContext &C, DeclContext *DC,
 1689                                   DeclContext *DC, SourceLocation StartLoc,
 1702   Create(ASTContext &Context, TagKind TK, DeclContext *DC,
 1922                                          DeclContext *DC,
 1942   Create(ASTContext &Context, TagKind TK, DeclContext *DC,
 2098   ClassTemplateDecl(ASTContext &C, DeclContext *DC, SourceLocation L,
 2128   static ClassTemplateDecl *Create(ASTContext &C, DeclContext *DC,
 2284   FriendTemplateDecl(DeclContext *DC, SourceLocation Loc,
 2296   Create(ASTContext &Context, DeclContext *DC, SourceLocation Loc,
 2345   TypeAliasTemplateDecl(ASTContext &C, DeclContext *DC, SourceLocation L,
 2394   static TypeAliasTemplateDecl *Create(ASTContext &C, DeclContext *DC,
 2430       DeclContext *DC, SourceLocation Loc, CXXMethodDecl *FD,
 2451   Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, CXXMethodDecl *FD,
 2541   VarTemplateSpecializationDecl(Kind DK, ASTContext &Context, DeclContext *DC,
 2556   Create(ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 2764       ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 2782   Create(ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 2917   VarTemplateDecl(ASTContext &C, DeclContext *DC, SourceLocation L,
 2949   static VarTemplateDecl *Create(ASTContext &C, DeclContext *DC,
 3050   ConceptDecl(DeclContext *DC, SourceLocation L, DeclarationName Name,
 3055   static ConceptDecl *Create(ASTContext &C, DeclContext *DC,
tools/clang/include/clang/AST/DependentDiagnostic.h
   41                                      DeclContext *Parent,
  107                                      DeclContext *Parent,
  175 inline DeclContext::ddiag_range DeclContext::ddiags() const {
tools/clang/include/clang/AST/Expr.h
 4269   DeclContext *ParentContext;
 4275                 SourceLocation RParenLoc, DeclContext *Context);
 4307   const DeclContext *getParentContext() const { return ParentContext; }
 4308   DeclContext *getParentContext() { return ParentContext; }
tools/clang/include/clang/AST/ExprCXX.h
 1209   DeclContext *UsedContext;
 1212       DeclContext *UsedContext)
 1231                                    DeclContext *UsedContext) {
 1244   const DeclContext *getUsedContext() const { return UsedContext; }
 1245   DeclContext *getUsedContext() { return UsedContext; }
 1287   DeclContext *UsedContext;
 1290                      FieldDecl *Field, QualType Ty, DeclContext *UsedContext);
 1298                                     FieldDecl *Field, DeclContext *UsedContext) {
 1316   const DeclContext *getUsedContext() const { return UsedContext; }
 1317   DeclContext *getUsedContext() { return UsedContext; }
tools/clang/include/clang/AST/ExternalASTMerger.h
   53     DeclContext *DC;
   57   typedef std::map<const DeclContext *, DCOrigin> OriginMap;
  143   bool FindExternalVisibleDeclsByName(const DeclContext *DC,
  148   FindExternalLexicalDecls(const DeclContext *DC,
  159   bool CanComplete(DeclContext *DC);
  163   void MaybeRecordOrigin(const DeclContext *ToDC, DCOrigin Origin);
  166   void ForceRecordOrigin(const DeclContext *ToDC, DCOrigin Origin);
  185   void RecordOriginImpl(const DeclContext *ToDC, DCOrigin Origin,
  191   void ForEachMatchingDC(const DeclContext *DC, CallbackType Callback);
tools/clang/include/clang/AST/ExternalASTSource.h
  154   FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name);
  160   virtual void completeVisibleDeclsMap(const DeclContext *DC);
  209   FindExternalLexicalDecls(const DeclContext *DC,
  215   void FindExternalLexicalDecls(const DeclContext *DC,
  330   SetExternalVisibleDeclsForName(const DeclContext *DC,
  335   SetNoExternalVisibleDeclsForName(const DeclContext *DC,
tools/clang/include/clang/AST/LexicallyOrderedRecursiveASTVisitor.h
   79   bool TraverseDeclContextHelper(DeclContext *DC) {
tools/clang/include/clang/AST/Mangle.h
  125   void mangleBlock(const DeclContext *DC, const BlockDecl *BD,
tools/clang/include/clang/AST/ODRHash.h
   92   static bool isWhitelistedDecl(const Decl* D, const DeclContext *Parent);
tools/clang/include/clang/AST/RecursiveASTVisitor.h
  525   bool TraverseDeclContextHelper(DeclContext *DC);
 1384 bool RecursiveASTVisitor<Derived>::TraverseDeclContextHelper(DeclContext *DC) {
tools/clang/include/clang/AST/Type.h
 1231                                const DeclContext *dc,
 2392   getObjCSubstitutions(const DeclContext *dc) const;
tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 5987   const DeclContext *DC = Node.getDeclContext();
tools/clang/include/clang/Analysis/Analyses/UninitializedValues.h
  124 void runUninitializedVariablesAnalysis(const DeclContext &dc, const CFG &cfg,
tools/clang/include/clang/Analysis/CallGraph.h
  102   void addNodesForBlocks(DeclContext *D);
tools/clang/include/clang/Basic/Diagnostic.h
 1243     std::is_same<typename std::remove_const<T>::type, DeclContext>::value,
 1243     std::is_same<typename std::remove_const<T>::type, DeclContext>::value,
 1245 operator<<(const DiagnosticBuilder &DB, T *DC) {
tools/clang/include/clang/Basic/PartialDiagnostic.h
  384   typename std::enable_if<std::is_same<T, DeclContext>::value,
  384   typename std::enable_if<std::is_same<T, DeclContext>::value,
  386   operator<<(const PartialDiagnostic &PD, T *DC) {
tools/clang/include/clang/CrossTU/CrossTranslationUnit.h
  191   const T *findDefInDeclContext(const DeclContext *DC,
tools/clang/include/clang/Index/IndexDataConsumer.h
   32     const DeclContext *ContainerDC;
tools/clang/include/clang/Parse/Parser.h
  954         P.Actions.ActOnObjCTemporaryExitContainerContext(cast<DeclContext>(DC));
  958         P.Actions.ActOnObjCReenterContainerContext(cast<DeclContext>(DC));
tools/clang/include/clang/Sema/CodeCompleteConsumer.h
  337   using VisitedContextSet = llvm::SmallPtrSet<DeclContext *, 8>;
  413   void addVisitedContext(DeclContext *Ctx) {
  646   llvm::DenseMap<const DeclContext *, StringRef> ParentNames;
  663   StringRef getParentName(const DeclContext *DC);
  737   void addParentContext(const DeclContext *DC);
tools/clang/include/clang/Sema/ExternalSemaSource.h
  205                                      DeclContext *MemberContext,
tools/clang/include/clang/Sema/IdentifierResolver.h
  155   bool isDeclInScope(Decl *D, DeclContext *Ctx, Scope *S = nullptr,
tools/clang/include/clang/Sema/Lookup.h
  787   virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
  794   virtual void EnteredContext(DeclContext *Ctx) {}
tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h
   96   bool FindExternalVisibleDeclsByName(const DeclContext *DC,
  101   void completeVisibleDeclsMap(const DeclContext *DC) override;
  109   FindExternalLexicalDecls(const DeclContext *DC,
  338                              DeclContext *MemberContext,
tools/clang/include/clang/Sema/Scope.h
  199   DeclContext *Entity;
  327   DeclContext *getEntity() const { return Entity; }
  328   void setEntity(DeclContext *E) { Entity = E; }
tools/clang/include/clang/Sema/Sema.h
  389   DeclContext *CurContext;
  393   DeclContext *OriginalLexicalContext;
  782     DeclContext *SavedContext;
  787     ContextRAII(Sema &S, DeclContext *ContextToPush, bool NewThisContext = true)
  828     SynthesizedFunctionScope(Sema &S, DeclContext *DC)
 1105   getCurrentMangleNumberContext(const DeclContext *DC);
 1437   Scope *getScopeForContext(DeclContext *Ctx);
 2104   bool DiagnoseClassNameShadow(DeclContext *DC, DeclarationNameInfo Info);
 2105   bool diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC,
 2117   static bool adjustContextForLocalExternDecl(DeclContext *&DC);
 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,
 2166   NamedDecl* ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
 2202   ParmVarDecl *BuildParmVarDeclForTypedef(DeclContext *DC,
 2205   ParmVarDecl *CheckParameter(DeclContext *DC, SourceLocation StartLoc,
 2658   void ActOnObjCTemporaryExitContainerContext(DeclContext *DC);
 2659   void ActOnObjCReenterContainerContext(DeclContext *DC);
 2688   DeclContext *getContainingDC(DeclContext *DC);
 2688   DeclContext *getContainingDC(DeclContext *DC);
 2691   void PushDeclContext(Scope *S, DeclContext *DC);
 2696   void EnterDeclaratorContext(Scope *S, DeclContext *DC);
 2703   DeclContext *getFunctionLevelDeclContext();
 2730   bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S = nullptr,
 2735   static Scope *getScopeForDeclContext(Scope *S, DeclContext *DC);
 3074   typedef llvm::SmallSetVector<DeclContext   *, 16> AssociatedNamespaceSet;
 3521                              DeclContext *MemberContext, bool EnteringContext,
 3544   bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
 3546   bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
 3604   void LookupVisibleDecls(DeclContext *Ctx, LookupNameKind Kind,
 3620                              DeclContext *MemberContext = nullptr,
 3631                                DeclContext *MemberContext = nullptr,
 3689   void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S,
 3859                                        DeclContext *lexicalDC = nullptr);
 4912                                 DeclContext *ParentContext);
 5779   bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC);
 5781   DeclContext *computeDeclContext(QualType T);
 5782   DeclContext *computeDeclContext(const CXXScopeSpec &SS,
 6577   void PerformDependentDiagnostics(const DeclContext *Pattern,
 8363   SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner,
 8366   Decl *SubstDecl(Decl *D, DeclContext *Owner,
 8476                              DeclContext *Owner,
 8500   DeclContext *FindInstantiatedContext(SourceLocation Loc, DeclContext *DC,
 8500   DeclContext *FindInstantiatedContext(SourceLocation Loc, DeclContext *DC,
 8705                       DeclContext *lexicalDC = nullptr);
 9414                                               DeclContext *Owner = nullptr);
 9427       Scope *S, DeclContext *DC, DeclarationName Name,
 9452       Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType,
11515   DeclContext *getCurLexicalContext() const {
11519   const DeclContext *getCurObjCLexicalContext() const {
11520     const DeclContext *DC = getCurLexicalContext();
tools/clang/include/clang/Sema/SemaInternal.h
   96                          DeclContext *MemberContext,
  113   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
  209       DeclContext* DeclCtx;
  214     typedef SmallVector<DeclContext*, 4> DeclContextList;
  227     static DeclContextList buildContextChain(DeclContext *Start);
  233     NamespaceSpecifierSet(ASTContext &Context, DeclContext *CurContext,
  238     void addNameSpecifier(DeclContext *Ctx);
  308   DeclContext *MemberContext;
tools/clang/include/clang/Sema/Template.h
  422     DeclContext *Owner;
  443     TemplateDeclInstantiator(Sema &SemaRef, DeclContext *Owner,
tools/clang/include/clang/Sema/TypoCorrection.h
  393   DeclContext *CurContext;
tools/clang/include/clang/Serialization/ASTReader.h
  546   llvm::DenseMap<std::pair<DeclContext *, IdentifierInfo *>, NamedDecl *>
  571   llvm::DenseMap<const DeclContext*, std::pair<ModuleFile*, LexicalContents>>
  578   llvm::DenseMap<const DeclContext *,
  615                                      uint64_t Offset, DeclContext *DC);
 1118   llvm::SmallPtrSet<DeclContext*, 2> DiagnosedOdrMergeFailures;
 1142   llvm::DenseMap<DeclContext *, DeclContext *> MergedDeclContexts;
 1142   llvm::DenseMap<DeclContext *, DeclContext *> MergedDeclContexts;
 1261   getLoadedLookupTables(DeclContext *Primary) const;
 1887   T *ReadDeclAs(ModuleFile &F, const RecordData &R, unsigned &I) {
 1888     return cast_or_null<T>(GetDecl(ReadDeclID(F, R, I)));
 1913   bool FindExternalVisibleDeclsByName(const DeclContext *DC,
 1930   FindExternalLexicalDecls(const DeclContext *DC,
 2316   void completeVisibleDeclsMap(const DeclContext *DC) override;
 2434   bool readLexicalDeclContextStorage(uint64_t Offset, DeclContext *DC) {
 2541   T *readDeclAs() {
 2542     return Reader->ReadDeclAs<T>(*F, Record, Idx);
tools/clang/include/clang/Serialization/ASTWriter.h
  409   llvm::SmallSetVector<const DeclContext *, 16> UpdatedDeclContexts;
  487   bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC);
  488   bool isLookupResultEntirelyExternal(StoredDeclsList &Result, DeclContext *DC);
  490   void GenerateNameLookupTable(const DeclContext *DC,
  492   uint64_t WriteDeclContextLexicalBlock(ASTContext &Context, DeclContext *DC);
  493   uint64_t WriteDeclContextVisibleBlock(ASTContext &Context, DeclContext *DC);
  502   void WriteDeclContextVisibleUpdate(const DeclContext *DC);
  714   void AddedVisibleDecl(const DeclContext *DC, const Decl *D) override;
tools/clang/include/clang/Tooling/Core/Lookup.h
   43                               const DeclContext *UseContext,
tools/clang/lib/ARCMigrate/ObjCMT.cpp
  623       DeclContext::lookup_result R = IDecl->lookup(Property->getDeclName());
  655       DeclContext::lookup_result R = ImpDecl->lookup(MD->getDeclName());
 1855     for (DeclContext::decl_iterator D = TU->decls_begin(), DEnd = TU->decls_end();
 1887         DeclContext::decl_iterator N = D;
 1901         DeclContext::decl_iterator N = D;
tools/clang/lib/ARCMigrate/TransEmptyStatementsAndDealloc.cpp
  196   DeclContext *DC = Ctx.getTranslationUnitDecl();
  200   typedef DeclContext::specific_decl_iterator<ObjCImplementationDecl>
tools/clang/lib/ARCMigrate/TransProperties.cpp
  102     typedef DeclContext::specific_decl_iterator<ObjCPropertyImplDecl>
tools/clang/lib/ARCMigrate/Transforms.cpp
  520   DeclContext *DC = Ctx.getTranslationUnitDecl();
  524   typedef DeclContext::specific_decl_iterator<ObjCImplementationDecl>
tools/clang/lib/AST/ASTContext.cpp
  447   const DeclContext *DC = ObjCMethod->getDeclContext();
 9877     const DeclContext *LexicalContext = VD->getParentFunctionOrMethod();
10261 ASTContext::getManglingNumberContext(const DeclContext *DC) {
tools/clang/lib/AST/ASTDiagnostic.cpp
  424       DeclContext *DC = reinterpret_cast<DeclContext *> (Val);
tools/clang/lib/AST/ASTDumper.cpp
   25 void ASTDumper::dumpLookups(const DeclContext *DC, bool DumpDecls) {
   30     const DeclContext *Primary = DC->getPrimaryContext();
  214   const DeclContext *DC = this;
tools/clang/lib/AST/ASTImporter.cpp
  357         NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
  357         NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
  362     Error ImportDeclContext(DeclContext *FromDC, bool ForceImport = false);
  364         Decl *From, DeclContext *&ToDC, DeclContext *&ToLexicalDC);
  364         Decl *From, DeclContext *&ToDC, DeclContext *&ToLexicalDC);
 1542     NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
 1542     NamedDecl *D, DeclContext *&DC, DeclContext *&LexicalDC,
 1546   DeclContext *OrigDC = D->getDeclContext();
 1662 ASTNodeImporter::ImportDeclContext(DeclContext *FromDC, bool ForceImport) {
 1724   DeclContext *ToDC = *ToDCOrErr;
 1748     Decl *FromD, DeclContext *&ToDC, DeclContext *&ToLexicalDC) {
 1748     Decl *FromD, DeclContext *&ToDC, DeclContext *&ToLexicalDC) {
 2096   DeclContext *DC, *LexicalDC;
 2135   DeclContext *DC = *DCOrErr;
 2154   DeclContext *DC = *DCOrErr;
 2155   DeclContext *LexicalDC = DC;
 2179   DeclContext *DC, *LexicalDC;
 2258   DeclContext *DC, *LexicalDC;
 2297   DeclContext *DC, *LexicalDC;
 2392   DeclContext *DC, *LexicalDC;
 2448   DeclContext *DC, *LexicalDC;
 2487   DeclContext *DC, *LexicalDC;
 2582   DeclContext *DC = nullptr, *LexicalDC = nullptr;
 2811   DeclContext *DC, *LexicalDC;
 3008   DeclContext *DC, *LexicalDC;
 3362   DeclContext *DC, *LexicalDC;
 3447   DeclContext *DC, *LexicalDC;
 3517   DeclContext *DC, *LexicalDC;
 3590   DeclContext *DC, *LexicalDC;
 3655   DeclContext *DC, *LexicalDC;
 3793   DeclContext *DC = Importer.getToContext().getTranslationUnitDecl();
 3837   DeclContext *DC = Importer.getToContext().getTranslationUnitDecl();
 3879   DeclContext *DC, *LexicalDC;
 4004   DeclContext *DC, *LexicalDC;
 4036   DeclContext *DC, *LexicalDC;
 4185   DeclContext *DC, *LexicalDC;
 4229   DeclContext *DC, *LexicalDC;
 4263   DeclContext *DC, *LexicalDC;
 4314   DeclContext *DC, *LexicalDC;
 4356   DeclContext *DC, *LexicalDC;
 4399   DeclContext *DC, *LexicalDC;
 4436   DeclContext *DC, *LexicalDC;
 4609   DeclContext *DC, *LexicalDC;
 4669     DeclContext *DC, *LexicalDC;
 4714     DeclContext *DC, *LexicalDC;
 4785   DeclContext *DC, *LexicalDC;
 4872   DeclContext *DC, *LexicalDC;
 5039   DeclContext *DC, *LexicalDC;
 5158   DeclContext *DC, *LexicalDC;
 5333   DeclContext *DC, *LexicalDC;
 5428   DeclContext *DC, *LexicalDC;
 5559   DeclContext *DC, *LexicalDC;
 7829   DeclContext *ReDC = DC->getRedeclContext();
 7835     DeclContext::lookup_result NoloadLookupResult = ReDC->noload_lookup(Name);
 8058 Expected<DeclContext *> ASTImporter::ImportContext(DeclContext *FromDC) {
 8058 Expected<DeclContext *> ASTImporter::ImportContext(DeclContext *FromDC) {
 8065   auto *ToDC = cast<DeclContext>(*ToDCOrErr);
 8065   auto *ToDC = cast<DeclContext>(*ToDCOrErr);
 8588   auto *FromDC = cast<DeclContext>(From);
 8588   auto *FromDC = cast<DeclContext>(From);
 8713                                                           DeclContext *DC,
tools/clang/lib/AST/ASTImporterLookupTable.cpp
   71 void ASTImporterLookupTable::add(DeclContext *DC, NamedDecl *ND) {
   77 void ASTImporterLookupTable::remove(DeclContext *DC, NamedDecl *ND) {
   86   DeclContext *DC = ND->getDeclContext()->getPrimaryContext();
   88   DeclContext *ReDC = DC->getRedeclContext()->getPrimaryContext();
   95   DeclContext *DC = ND->getDeclContext()->getPrimaryContext();
   97   DeclContext *ReDC = DC->getRedeclContext()->getPrimaryContext();
  116 void ASTImporterLookupTable::dump(DeclContext *DC) const {
  134     DeclContext *DC = Entry.first;
tools/clang/lib/AST/CXXInheritance.cpp
  140 CXXRecordDecl::isCurrentInstantiation(const DeclContext *CurContext) const {
  528   DeclContext::lookup_result DirectResult = lookup(Name);
tools/clang/lib/AST/CommentSema.cpp
  687     const DeclContext *Ctx = FD->getDeclContext();
tools/clang/lib/AST/Decl.cpp
  303   const DeclContext *DC = D->getDeclContext();
  716       for (const DeclContext *DC = D->getDeclContext();
 1181 LinkageInfo LinkageComputer::getLVForClosure(const DeclContext *DC,
 1581   const DeclContext *Ctx = getDeclContext();
 1597   using ContextsTy = SmallVector<const DeclContext *, 8>;
 1607   for (const DeclContext *DC : llvm::reverse(Contexts)) {
 1948 VarDecl::VarDecl(Kind DK, ASTContext &C, DeclContext *DC,
 1965 VarDecl *VarDecl::Create(ASTContext &C, DeclContext *DC,
 2032   const DeclContext *DC = D.getDeclContext();
 2048   const DeclContext *DC = D.getDeclContext();
 2657 ParmVarDecl *ParmVarDecl::Create(ASTContext &C, DeclContext *DC,
 2764 FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC,
 3040   for (const DeclContext *DC = getDeclContext();
 3927 FieldDecl *FieldDecl::Create(const ASTContext &C, DeclContext *DC,
 4038 TagDecl::TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC,
 4156 EnumDecl::EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 4173 EnumDecl *EnumDecl::Create(ASTContext &C, DeclContext *DC,
 4288                        DeclContext *DC, SourceLocation StartLoc,
 4308 RecordDecl *RecordDecl::Create(const ASTContext &C, TagKind TK, DeclContext *DC,
 4457 BlockDecl::BlockDecl(DeclContext *DC, SourceLocation CaretLoc)
 4570 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC,
 4575 LabelDecl *LabelDecl::Create(ASTContext &C, DeclContext *DC,
 4606 ImplicitParamDecl *ImplicitParamDecl::Create(ASTContext &C, DeclContext *DC,
 4623 FunctionDecl *FunctionDecl::Create(ASTContext &C, DeclContext *DC,
 4643 BlockDecl *BlockDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) {
 4651 CapturedDecl::CapturedDecl(DeclContext *DC, unsigned NumParams)
 4655 CapturedDecl *CapturedDecl::Create(ASTContext &C, DeclContext *DC,
 4688 IndirectFieldDecl::IndirectFieldDecl(ASTContext &C, DeclContext *DC,
 4701 IndirectFieldDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
 4722 TypedefDecl *TypedefDecl::Create(ASTContext &C, DeclContext *DC,
 4772 TypeAliasDecl *TypeAliasDecl::Create(ASTContext &C, DeclContext *DC,
 4802 FileScopeAsmDecl *FileScopeAsmDecl::Create(ASTContext &C, DeclContext *DC,
 4817 EmptyDecl *EmptyDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L) {
 4840 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc,
 4850 ImportDecl::ImportDecl(DeclContext *DC, SourceLocation StartLoc,
 4856 ImportDecl *ImportDecl::Create(ASTContext &C, DeclContext *DC,
 4864 ImportDecl *ImportDecl::CreateImplicit(ASTContext &C, DeclContext *DC,
 4902 ExportDecl *ExportDecl::Create(ASTContext &C, DeclContext *DC,
tools/clang/lib/AST/DeclBase.cpp
   94                          DeclContext *Parent, std::size_t Extra) {
  248   if (auto *AsDC = dyn_cast<DeclContext>(this))
  254 const DeclContext *Decl::getParentFunctionOrMethod() const {
  255   for (const DeclContext *DC = getDeclContext();
  295 void Decl::setDeclContext(DeclContext *DC) {
  299 void Decl::setLexicalDeclContext(DeclContext *DC) {
  323 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
  323 void Decl::setDeclContextsImpl(DeclContext *SemaDC, DeclContext *LexicalDC,
  336   const DeclContext *LDC = getLexicalDeclContext();
  348   for (const DeclContext *DC = getDeclContext(); DC; DC = DC->getParent()) {
  358   const DeclContext *DC = getDeclContext();
  366   DeclContext *DC = getDeclContext();
  858 Decl *Decl::castFromDeclContext (const DeclContext *D) {
  877 DeclContext *Decl::castToDeclContext(const Decl *D) {
  946 static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); }
  973 template <class T> static Decl *getNonClosureContext(T *D) {
 1040 DeclContext *DeclContext::getLookupParent() {
 1057   const DeclContext *Ctx = this;
 1130 static bool isLinkageSpecContext(const DeclContext *DC,
 1145   const DeclContext *DC = this;
 1159 bool DeclContext::Encloses(const DeclContext *DC) const {
 1169 DeclContext *DeclContext::getPrimaryContext() {
 1237 DeclContext::collectAllContexts(SmallVectorImpl<DeclContext *> &Contexts){
 1322 DeclContext::lookup_result
 1323 ExternalASTSource::SetNoExternalVisibleDeclsForName(const DeclContext *DC,
 1337 DeclContext::lookup_result
 1338 ExternalASTSource::SetExternalVisibleDeclsForName(const DeclContext *DC,
 1385 DeclContext::decl_iterator DeclContext::decls_begin() const {
 1480     auto *DC = D->getDeclContext();
 1551   SmallVector<DeclContext *, 2> Contexts;
 1556     for (auto *DC : Contexts) {
 1568   for (auto *DC : Contexts)
 1580 void DeclContext::buildLookupImpl(DeclContext *DCtx, bool Internal) {
 1600     if (auto *InnerCtx = dyn_cast<DeclContext>(D))
 1600     if (auto *InnerCtx = dyn_cast<DeclContext>(D))
 1608 DeclContext::lookup_result
 1614   const DeclContext *PrimaryContext = getPrimaryContext();
 1673 DeclContext::lookup_result
 1679   DeclContext *PrimaryContext = getPrimaryContext();
 1698     SmallVector<DeclContext *, 2> Contexts;
 1700     for (auto *Context : Contexts)
 1744 DeclContext *DeclContext::getRedeclContext() {
 1745   DeclContext *Ctx = this;
 1762 DeclContext *DeclContext::getEnclosingNamespaceContext() {
 1763   DeclContext *Ctx = this;
 1773   DeclContext *DC = this;
 1781 bool DeclContext::InEnclosingNamespaceSetOf(const DeclContext *O) const {
 1800   DeclContext *PrimaryDC = this->getPrimaryContext();
 1801   DeclContext *DeclDC = D->getDeclContext()->getPrimaryContext();
 1908 DeclContext::udir_range DeclContext::using_directives() const {
 1959                                                  DeclContext *Parent,
tools/clang/lib/AST/DeclCXX.cpp
  118                              DeclContext *DC, SourceLocation StartLoc,
  126                                      DeclContext *DC, SourceLocation StartLoc,
  141 CXXRecordDecl::CreateLambda(const ASTContext &C, DeclContext *DC,
 1395 static bool allLookupResultsAreTheSame(const DeclContext::lookup_result &R) {
 1407   DeclContext::lookup_result Calls = RD.lookup(Name);
 1436   DeclContext::lookup_result Invoker = lookup(Name);
 1773   DeclContext::lookup_result R = lookup(Name);
 1801 static bool isDeclContextInNamespace(const DeclContext *DC) {
 1952     ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
 2205   DeclContext::lookup_result R = getDeclContext()->lookup(getDeclName());
 2655 LinkageSpecDecl::LinkageSpecDecl(DeclContext *DC, SourceLocation ExternLoc,
 2667                                          DeclContext *DC,
 2683 UsingDirectiveDecl *UsingDirectiveDecl::Create(ASTContext &C, DeclContext *DC,
 2689                                                DeclContext *CommonAncestor) {
 2710 NamespaceDecl::NamespaceDecl(ASTContext &C, DeclContext *DC, bool Inline,
 2722 NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC,
 2777 NamespaceAliasDecl *NamespaceAliasDecl::Create(ASTContext &C, DeclContext *DC,
 2801 UsingShadowDecl::UsingShadowDecl(Kind K, ASTContext &C, DeclContext *DC,
 2831 ConstructorUsingShadowDecl::Create(ASTContext &C, DeclContext *DC,
 2880 UsingDecl *UsingDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation UL,
 2901 UsingPackDecl *UsingPackDecl::Create(ASTContext &C, DeclContext *DC,
 2922 UnresolvedUsingValueDecl::Create(ASTContext &C, DeclContext *DC,
 2950 UnresolvedUsingTypenameDecl::Create(ASTContext &C, DeclContext *DC,
 2971 StaticAssertDecl *StaticAssertDecl::Create(ASTContext &C, DeclContext *DC,
 2989 BindingDecl *BindingDecl::Create(ASTContext &C, DeclContext *DC,
 3019 DecompositionDecl *DecompositionDecl::Create(ASTContext &C, DeclContext *DC,
 3059 MSPropertyDecl *MSPropertyDecl::Create(ASTContext &C, DeclContext *DC,
tools/clang/lib/AST/DeclFriend.cpp
   34 FriendDecl *FriendDecl::Create(ASTContext &C, DeclContext *DC,
tools/clang/lib/AST/DeclObjC.cpp
   67 ObjCContainerDecl::ObjCContainerDecl(Kind DK, DeclContext *DC,
  176 ObjCPropertyDecl::findPropertyDecl(const DeclContext *DC,
  197   DeclContext::lookup_result R = DC->lookup(propertyID);
  199   for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E;
  255         ObjCPropertyDecl::findPropertyDecl(cast<DeclContext>(this), PropertyId,
  379       ObjCPropertyDecl::findPropertyDecl(cast<DeclContext>(this), PropertyId,
  781                                DeclContext *contextDecl, bool isInstance,
  812     DeclContext *contextDecl, bool isInstance, bool isVariadic,
  843   const DeclContext *DC = getDeclContext();
 1384 ObjCTypeParamDecl *ObjCTypeParamDecl::Create(ASTContext &ctx, DeclContext *dc,
 1456                                              DeclContext *DC,
 1480 ObjCInterfaceDecl::ObjCInterfaceDecl(const ASTContext &C, DeclContext *DC,
 1825 *ObjCAtDefsFieldDecl::Create(ASTContext &C, DeclContext *DC,
 1844 ObjCProtocolDecl::ObjCProtocolDecl(ASTContext &C, DeclContext *DC,
 1855 ObjCProtocolDecl *ObjCProtocolDecl::Create(ASTContext &C, DeclContext *DC,
 1973 ObjCCategoryDecl::ObjCCategoryDecl(DeclContext *DC, SourceLocation AtLoc,
 1986 ObjCCategoryDecl *ObjCCategoryDecl::Create(ASTContext &C, DeclContext *DC,
 2044 ObjCCategoryImplDecl::Create(ASTContext &C, DeclContext *DC,
 2148 ObjCImplementationDecl::Create(ASTContext &C, DeclContext *DC,
 2199 ObjCCompatibleAliasDecl::Create(ASTContext &C, DeclContext *DC,
 2218 ObjCPropertyDecl *ObjCPropertyDecl::Create(ASTContext &C, DeclContext *DC,
 2247                                                    DeclContext *DC,
tools/clang/lib/AST/DeclOpenMP.cpp
   29                                                    DeclContext *DC,
   61 OMPAllocateDecl *OMPAllocateDecl::Create(ASTContext &C, DeclContext *DC,
  104 OMPRequiresDecl *OMPRequiresDecl::Create(ASTContext &C, DeclContext *DC,
  135     Kind DK, DeclContext *DC, SourceLocation L, DeclarationName Name,
  145     ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName Name,
  175 OMPDeclareMapperDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L,
  234 OMPCapturedExprDecl *OMPCapturedExprDecl::Create(ASTContext &C, DeclContext *DC,
tools/clang/lib/AST/DeclPrinter.cpp
   59     void VisitDeclContext(DeclContext *DC, bool Indent = true);
  212   const DeclContext *DC = this;
  367 void DeclPrinter::VisitDeclContext(DeclContext *DC, bool Indent) {
  375   for (DeclContext::decl_iterator D = DC->decls_begin(), DEnd = DC->decls_end();
  465       DeclContext::decl_iterator Next = D;
tools/clang/lib/AST/DeclTemplate.cpp
  132                                        DeclContext *Owner) {
  165 TemplateDecl::TemplateDecl(Kind DK, DeclContext *DC, SourceLocation L,
  280                                                    DeclContext *DC,
  285   AdoptTemplateParameterList(Params, cast<DeclContext>(Decl));
  379                                              DeclContext *DC,
  384   AdoptTemplateParameterList(Params, cast<DeclContext>(Decl));
  513 TemplateTypeParmDecl::Create(const ASTContext &C, DeclContext *DC,
  565     DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, unsigned D,
  582 NonTypeTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
  592     const ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
  643     DeclContext *DC, SourceLocation L, unsigned D, unsigned P,
  655 TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
  664 TemplateTemplateParmDecl::Create(const ASTContext &C, DeclContext *DC,
  743                                 DeclContext *DC, SourceLocation StartLoc,
  763                                         DeclContext *DC,
  852 ConceptDecl *ConceptDecl::Create(ASTContext &C, DeclContext *DC,
  876                                        DeclContext *DC,
  895 Create(ASTContext &Context, TagKind TK,DeclContext *DC,
  932 FriendTemplateDecl::Create(ASTContext &Context, DeclContext *DC,
  949                                                      DeclContext *DC,
  998 VarTemplateDecl *VarTemplateDecl::Create(ASTContext &C, DeclContext *DC,
 1094     Kind DK, ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 1110     ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 1160     ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 1176     ASTContext &Context, DeclContext *DC, SourceLocation StartLoc,
 1199 createMakeIntegerSeqParameterList(const ASTContext &C, DeclContext *DC) {
 1246 createTypePackElementParameterList(const ASTContext &C, DeclContext *DC) {
 1267     const ASTContext &C, DeclContext *DC, BuiltinTemplateKind BTK) {
 1280 BuiltinTemplateDecl::BuiltinTemplateDecl(const ASTContext &C, DeclContext *DC,
tools/clang/lib/AST/Expr.cpp
  788     const DeclContext *Ctx = FD->getDeclContext();
  859     for (const DeclContext *DC = CD->getParent(); DC; DC = DC->getParent())
 2152                              DeclContext *ParentContext)
 2176   const DeclContext *Context;
tools/clang/lib/AST/ExprCXX.cpp
  994                                        DeclContext *UsedContext)
tools/clang/lib/AST/ExprConstant.cpp
  599       for (const DeclContext *DC = Callee; DC; DC = DC->getParent())
tools/clang/lib/AST/ExternalASTMerger.cpp
   38 const DeclContext *CanonicalizeDC(const DeclContext *DC) {
   38 const DeclContext *CanonicalizeDC(const DeclContext *DC) {
   44 Source<const DeclContext *>
   45 LookupSameContext(Source<TranslationUnitDecl *> SourceTU, const DeclContext *DC,
   51   Source<const DeclContext *> SourceParentDC =
   65   DeclContext::lookup_result SearchResult =
   81     if (isa<DeclContext>(SearchResultDecl) &&
   83       return cast<DeclContext>(SearchResultDecl)->getPrimaryContext();
  201     if (auto *ToDC = dyn_cast<DeclContext>(To)) {
  201     if (auto *ToDC = dyn_cast<DeclContext>(To)) {
  207                << " from (DeclContext*)" << (void*)llvm::cast<DeclContext>(From)
  210       Source<DeclContext *> FromDC(
  211           cast<DeclContext>(From)->getPrimaryContext());
  280 void ExternalASTMerger::ForEachMatchingDC(const DeclContext *DC,
  344 bool ExternalASTMerger::CanComplete(DeclContext *Interface) {
  358 bool IsSameDC(const DeclContext *D1, const DeclContext *D2) {
  358 bool IsSameDC(const DeclContext *D1, const DeclContext *D2) {
  369 void ExternalASTMerger::MaybeRecordOrigin(const DeclContext *ToDC,
  373   Source<const DeclContext *> FoundFromDC =
  386 void ExternalASTMerger::ForceRecordOrigin(const DeclContext *ToDC,
  391 void ExternalASTMerger::RecordOriginImpl(const DeclContext *ToDC, DCOrigin Origin,
  439     std::pair<const DeclContext *, DCOrigin> Origin = *OI;
  479 bool ExternalASTMerger::FindExternalVisibleDeclsByName(const DeclContext *DC,
  531     const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
tools/clang/lib/AST/ExternalASTSource.cpp
  109 ExternalASTSource::FindExternalVisibleDeclsByName(const DeclContext *DC,
  114 void ExternalASTSource::completeVisibleDeclsMap(const DeclContext *DC) {}
  117     const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
tools/clang/lib/AST/ItaniumMangle.cpp
   41 static const DeclContext *getEffectiveDeclContext(const Decl *D) {
   62   const DeclContext *DC = D->getDeclContext();
   79 static const DeclContext *getEffectiveParentContext(const DeclContext *DC) {
   79 static const DeclContext *getEffectiveParentContext(const DeclContext *DC) {
   83 static bool isLocalContainerContext(const DeclContext *DC) {
   88   const DeclContext *DC = getEffectiveDeclContext(D);
  121   typedef std::pair<const DeclContext*, IdentifierInfo*> DiscriminatorKeyTy;
  198       const DeclContext *DC = getEffectiveDeclContext(ND);
  494   void mangleNestedName(const NamedDecl *ND, const DeclContext *DC,
  501   void manglePrefix(const DeclContext *DC, bool NoFunction=false);
  616     const DeclContext *DC = getEffectiveDeclContext(D);
  762 static const DeclContext *IgnoreLinkageSpecDecls(const DeclContext *DC) {
  762 static const DeclContext *IgnoreLinkageSpecDecls(const DeclContext *DC) {
  782 static bool isStdNamespace(const DeclContext *DC) {
  856   const DeclContext *DC = getEffectiveDeclContext(ND);
  939   const DeclContext *DC = IgnoreLinkageSpecDecls(getEffectiveDeclContext(TD));
 1502                                       const DeclContext *DC,
 1555   const DeclContext *DC = getEffectiveDeclContext(RD ? RD : D);
 1650   const DeclContext *DC = getEffectiveDeclContext(Block);
 1819 void CXXNameMangler::manglePrefix(const DeclContext *DC, bool NoFunction) {
tools/clang/lib/AST/Linkage.h
  131   LinkageInfo getLVForClosure(const DeclContext *DC, Decl *ContextDecl,
tools/clang/lib/AST/Mangle.cpp
  231 void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD,
tools/clang/lib/AST/MicrosoftMangle.cpp
   70 static const DeclContext *
   82 static const DeclContext *getEffectiveDeclContext(const Decl *D) {
   89   if (const auto *LDADC = getLambdaDefaultArgumentDeclContext(D))
   99   const DeclContext *DC = D->getDeclContext();
  108 static const DeclContext *getEffectiveParentContext(const DeclContext *DC) {
  108 static const DeclContext *getEffectiveParentContext(const DeclContext *DC) {
  126   typedef std::pair<const DeclContext *, IdentifierInfo *> DiscriminatorKeyTy;
  198     const DeclContext *DC = getEffectiveDeclContext(ND);
  463     const DeclContext *DC = getEffectiveDeclContext(D);
 1045   const DeclContext *DC = getEffectiveDeclContext(ND);
 1133         if (const auto *LDADC = getLambdaDefaultArgumentDeclContext(ND)) {
tools/clang/lib/AST/ODRHash.cpp
  438 bool ODRHash::isWhitelistedDecl(const Decl *D, const DeclContext *Parent) {
  471   const DeclContext *DC = Record;
  519   const DeclContext *DC = Function;
tools/clang/lib/AST/QualTypeNames.cpp
  189   const DeclContext *DC = D->getDeclContext();
  269   const DeclContext *DC = Decl->getDeclContext()->getRedeclContext();
tools/clang/lib/AST/TemplateBase.cpp
  130     if (DeclContext *DC = dyn_cast<DeclContext>(getAsDecl()))
  130     if (DeclContext *DC = dyn_cast<DeclContext>(getAsDecl()))
  170     if (DeclContext *DC = dyn_cast<DeclContext>(getAsDecl()))
  170     if (DeclContext *DC = dyn_cast<DeclContext>(getAsDecl()))
tools/clang/lib/AST/TextNodeDumper.cpp
  268       const auto *DC = dyn_cast<DeclContext>(D);
  268       const auto *DC = dyn_cast<DeclContext>(D);
tools/clang/lib/AST/Type.cpp
 1421                                        const DeclContext *dc,
 1443                                const DeclContext *dc) const {
tools/clang/lib/AST/TypePrinter.cpp
  121     void AppendScope(DeclContext *DC, raw_ostream &OS);
 1109 void TypePrinter::AppendScope(DeclContext *DC, raw_ostream &OS) {
tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
  474   const DeclContext *Ctx = Node.getDeclContext();
tools/clang/lib/Analysis/AnalysisDeclContext.cpp
  328   const DeclContext *DC = D->getDeclContext()->getEnclosingNamespaceContext();
  333   while (const DeclContext *Parent = ND->getParent()) {
  585   llvm::SmallPtrSet<const DeclContext *, 4> IgnoredContexts;
tools/clang/lib/Analysis/CFG.cpp
  161   const DeclContext *DC1 = Decl1->getDeclContext();
  162   const DeclContext *DC2 = Decl2->getDeclContext();
tools/clang/lib/Analysis/CallGraph.cpp
  140 void CallGraph::addNodesForBlocks(DeclContext *D) {
  145     if (auto *DC = dyn_cast<DeclContext>(I))
  145     if (auto *DC = dyn_cast<DeclContext>(I))
tools/clang/lib/Analysis/ThreadSafetyCommon.cpp
  280     const DeclContext *D = PV->getDeclContext();
tools/clang/lib/Analysis/UninitializedValues.cpp
   43 static bool isTrackedVar(const VarDecl *vd, const DeclContext *dc) {
   66   void computeMap(const DeclContext &dc);
   77 void DeclToIndex::computeMap(const DeclContext &dc) {
   79   DeclContext::specific_decl_iterator<VarDecl> I(dc.decls_begin()),
  129   void computeSetOfDeclarations(const DeclContext &dc);
  159 void CFGBlockValues::computeSetOfDeclarations(const DeclContext &dc) {
  312 static FindVarResult findVar(const Expr *E, const DeclContext *DC) {
  336   const DeclContext *DC;
  346   ClassifyRefs(AnalysisDeclContext &AC) : DC(cast<DeclContext>(AC.getDecl())) {}
  544     return ::isTrackedVar(vd, cast<DeclContext>(ac.getDecl()));
  548     return ::findVar(ex, cast<DeclContext>(ac.getDecl()));
  902     const DeclContext &dc,
tools/clang/lib/CodeGen/Address.h
  108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGBlocks.cpp
 2953     DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
tools/clang/lib/CodeGen/CGCUDANV.cpp
  276   DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
tools/clang/lib/CodeGen/CGDebugInfo.cpp
  282   const DeclContext *DC = OMD->getDeclContext();
 3308   const DeclContext *DC = VD->isStaticDataMember() ? VD->getLexicalDeclContext()
tools/clang/lib/CodeGen/CGDecl.cpp
  202   const DeclContext *DC = D.getDeclContext();
  204     DC = cast<DeclContext>(CD->getNonClosureContext());
 1110     else if (const DeclContext *DC = D.getParentFunctionOrMethod())
tools/clang/lib/CodeGen/CGExpr.cpp
 2481            dyn_cast_or_null<DeclContext>(CGF.CurCodeDecl);
tools/clang/lib/CodeGen/CGObjCGNU.cpp
 1225         DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
 2303       DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
tools/clang/lib/CodeGen/CGObjCMac.cpp
 6356   DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
 1230 static FieldDecl *addFieldToRecordDecl(ASTContext &C, DeclContext *DC,
 6565               if (isa<EmptyDecl>(D) || isa<DeclContext>(D) ||
tools/clang/lib/CodeGen/CGVTables.cpp
 1025     const DeclContext *DC = RD;
tools/clang/lib/CodeGen/CodeGenFunction.h
 4220     const DeclContext *dc = method->getDeclContext();
tools/clang/lib/CodeGen/CodeGenModule.cpp
 1120     MangleCtx.mangleBlock(cast<DeclContext>(D), BD, Out);
 3299   DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
 4676         DeclContext *DC = TranslationUnitDecl::castToDeclContext(TUDecl);
 5204 void CodeGenModule::EmitDeclContext(const DeclContext *DC) {
tools/clang/lib/CodeGen/CodeGenModule.h
 1409   void EmitDeclContext(const DeclContext *DC);
tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
 1663   const DeclContext *DC = RD->getDeclContext();
tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp
  787   llvm::DenseMap<const DeclContext *, GuardInfo> GuardVariableMap;
  788   llvm::DenseMap<const DeclContext *, GuardInfo> ThreadLocalGuardVariableMap;
  789   llvm::DenseMap<const DeclContext *, unsigned> ThreadSafeGuardNumMap;
tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
  210     auto *DeclCtx = D->getDeclContext();
tools/clang/lib/CrossTU/CrossTranslationUnit.cpp
  208 CrossTranslationUnitContext::findDefInDeclContext(const DeclContext *DC,
  212     const auto *SubDC = dyn_cast<DeclContext>(D);
  212     const auto *SubDC = dyn_cast<DeclContext>(D);
tools/clang/lib/Frontend/ASTConsumers.cpp
   83         if (DeclContext *DC = dyn_cast<DeclContext>(D)) {
   83         if (DeclContext *DC = dyn_cast<DeclContext>(D)) {
tools/clang/lib/Frontend/ASTUnit.cpp
  899   DeclContext *DC = D->getDeclContext();
tools/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
  138   HandleDecls(const llvm::iterator_range<DeclContext::decl_iterator> &Decls,
tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
  495                 llvm::SmallPtrSetImpl<const DeclContext *> &InnerContexts);
  744     for (DeclContext::decl_iterator DI = LSD->decls_begin(),
 3036     const DeclContext *DC = FD->getDeclContext();
 3064         const DeclContext *DC = FD->getDeclContext();
 4476                 llvm::SmallPtrSetImpl<const DeclContext *> &InnerContexts) {
 4480         InnerContexts.insert(cast<DeclContext>(CBE->getBlockDecl()));
 5461     llvm::SmallPtrSet<const DeclContext *, 8> InnerContexts;
tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp
  406                 llvm::SmallPtrSetImpl<const DeclContext *> &InnerContexts);
  676     for (DeclContext::decl_iterator DI = LSD->decls_begin(),
 3663                 llvm::SmallPtrSetImpl<const DeclContext *> &InnerContexts) {
 3667         InnerContexts.insert(cast<DeclContext>(CBE->getBlockDecl()));
 4583     llvm::SmallPtrSet<const DeclContext *, 8> InnerContexts;
tools/clang/lib/Index/IndexBody.cpp
   21   const DeclContext *ParentDC;
   31               const NamedDecl *Parent, const DeclContext *DC)
  461       const auto *DC = D->getDeclContext();
  472                                 const DeclContext *DC) {
tools/clang/lib/Index/IndexDecl.cpp
   56                                  const DeclContext *DC) {
  588     const DeclContext *DC = D->getDeclContext()->getRedeclContext();
  599     const DeclContext *DC = D->getDeclContext()->getRedeclContext();
  616     const DeclContext *DC = D->getDeclContext()->getRedeclContext();
  625     const DeclContext *DC = D->getDeclContext()->getRedeclContext();
  742   if (!Visitor.Handled && isa<DeclContext>(D))
  743     return indexDeclContext(cast<DeclContext>(D));
  748 bool IndexingContext::indexDeclContext(const DeclContext *DC) {
tools/clang/lib/Index/IndexTypeSourceInfo.cpp
   20   const DeclContext *ParentDC;
   28               const DeclContext *DC, bool isBase, bool isIBType)
  211                                           const DeclContext *DC,
  222                                    const DeclContext *DC,
  235                                                   const DeclContext *DC) {
tools/clang/lib/Index/IndexingContext.cpp
   60                                  const DeclContext *DC) {
   75                                       const DeclContext *DC,
  240 static bool isDeclADefinition(const Decl *D, const DeclContext *ContainerDC, ASTContext &Ctx) {
  357                                            const DeclContext *ContainerDC) {
tools/clang/lib/Index/IndexingContext.h
   76                   const DeclContext *DC = nullptr);
   80                        const DeclContext *DC,
  103                            const DeclContext *DC = nullptr,
  108                     const DeclContext *DC = nullptr,
  114                                    const DeclContext *DC = nullptr);
  116   bool indexDeclContext(const DeclContext *DC);
  119                  const DeclContext *DC = nullptr);
  133                             const DeclContext *ContainerDC);
tools/clang/lib/Index/USRGeneration.cpp
   82   void VisitDeclContext(const DeclContext *D);
  197 void USRGenerator::VisitDeclContext(const DeclContext *DC) {
  385   const DeclContext *container = D->getDeclContext();
  582   const DeclContext *DC = D->getDeclContext();
tools/clang/lib/Parse/ParseExpr.cpp
 2428       DeclContext *CodeDC = Actions.CurContext;
tools/clang/lib/Parse/ParseTemplate.cpp
 1465     ContainingDC(DeclContext *DC, bool ShouldPush) : Pair(DC, ShouldPush) {}
 1466     llvm::PointerIntPair<DeclContext *, 1, bool> Pair;
 1467     DeclContext *getDC() { return Pair.getPointer(); }
 1471   DeclContext *DD = FunD;
 1472   DeclContext *NextContaining = Actions.getContainingDC(DD);
tools/clang/lib/Sema/AnalysisBasedWarnings.cpp
 2039   if (cast<DeclContext>(D)->isDependentContext())
 2192       runUninitializedVariablesAnalysis(*cast<DeclContext>(D), *cfg, AC,
tools/clang/lib/Sema/CodeCompleteConsumer.cpp
  357 StringRef CodeCompletionTUInfo::getParentName(const DeclContext *DC) {
  373   SmallVector<const DeclContext *, 2> Contexts;
  394       const DeclContext *CurDC = Contexts[I - 1];
  465 void CodeCompletionBuilder::addParentContext(const DeclContext *DC) {
tools/clang/lib/Sema/IdentifierResolver.cpp
   99 bool IdentifierResolver::isDeclInScope(Decl *D, DeclContext *Ctx, Scope *S,
  138   DeclContext *DCtx = D->getDeclContext()->getRedeclContext();
tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp
  104 FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name) {
  111 void MultiplexExternalSemaSource::completeVisibleDeclsMap(const DeclContext *DC){
  117     const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
  318                                      DeclContext *MemberContext,
tools/clang/lib/Sema/Scope.cpp
  193   if (const DeclContext *DC = getEntity())
tools/clang/lib/Sema/Sema.cpp
  786   for (DeclContext::decl_iterator I = RD->decls_begin(),
 1251 DeclContext *Sema::getFunctionLevelDeclContext() {
 1252   DeclContext *DC = CurContext;
 1272   DeclContext *DC = getFunctionLevelDeclContext();
 1277   DeclContext *DC = getFunctionLevelDeclContext();
 1284   DeclContext *DC = getFunctionLevelDeclContext();
 1613 Scope *Sema::getScopeForContext(DeclContext *Ctx) {
 1623       if (DeclContext *Entity = S->getEntity())
tools/clang/lib/Sema/SemaAccess.cpp
   66   DeclContext *DC = D->getDeclContext();
   83   explicit EffectiveContext(DeclContext *DC)
  134   DeclContext *getInnerContext() const {
  140   DeclContext *Inner;
  215     DeclContext *IC = S.computeDeclContext(getBaseObjectType());
  264   const DeclContext *FromDC = From->getDeclContext()->getPrimaryContext();
  265   const DeclContext *ToDC = To->getDeclContext()->getPrimaryContext();
  329 static bool MightInstantiateTo(Sema &S, DeclContext *Context,
  330                                DeclContext *Friend) {
 1125     DeclContext *DC = D->getDeclContext();
 1396   DeclContext *DC = EC.getInnerContext();
 1473   DeclContext *DC = D->getDeclContext();
 1479     DC = cast<DeclContext>(TD->getTemplatedDecl());
tools/clang/lib/Sema/SemaCXXScopeSpec.cpp
   28                                                 DeclContext *CurContext) {
   53 DeclContext *Sema::computeDeclContext(QualType T) {
   74 DeclContext *Sema::computeDeclContext(const CXXScopeSpec &SS,
  200                                       DeclContext *DC) {
  390   DeclContext *LookupCtx = nullptr;
  497   DeclContext *LookupCtx = nullptr;
  798     DeclContext *DC = LookupCtx ? LookupCtx : CurContext;
 1074   DeclContext *DC = computeDeclContext(SS, true);
tools/clang/lib/Sema/SemaChecking.cpp
 5556   DeclContext *Caller = S.CurContext;
13107       DeclContext *DC = Param->getDeclContext();
tools/clang/lib/Sema/SemaCodeComplete.cpp
  168   llvm::DenseMap<std::pair<DeclContext *, /*Name*/uintptr_t>, ShadowMapEntry>
  300   bool CheckHiddenResult(Result &R, DeclContext *CurContext,
  310   void MaybeAddResult(Result R, DeclContext *CurContext = nullptr);
  323   void AddResult(Result R, DeclContext *CurContext, NamedDecl *Hiding,
  339   void addVisitedContext(DeclContext *Ctx) {
  665 getRequiredQualification(ASTContext &Context, const DeclContext *CurContext,
  666                          const DeclContext *TargetContext) {
  667   SmallVector<const DeclContext *, 4> TargetParents;
  669   for (const DeclContext *CommonAncestor = TargetContext;
  681     const DeclContext *Parent = TargetParents.pop_back_val();
  781 bool ResultBuilder::CheckHiddenResult(Result &R, DeclContext *CurContext,
  789   const DeclContext *HiddenCtx =
  942   const DeclContext *LexicalDC = ND->getLexicalDeclContext();
  953   const DeclContext *DC = ND->getDeclContext()->getRedeclContext();
 1011 static DeclContext::lookup_result getConstructors(ASTContext &Context,
 1055 void ResultBuilder::MaybeAddResult(Result R, DeclContext *CurContext) {
 1153     const DeclContext *Ctx = R.Declaration->getDeclContext();
 1229 void ResultBuilder::AddResult(Result R, DeclContext *CurContext,
 1276     const DeclContext *Ctx = R.Declaration->getDeclContext();
 1585   DeclContext *InitialLookupCtx;
 1594       ResultBuilder &Results, DeclContext *InitialLookupCtx,
 1613   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
 1620   void EnteredContext(DeclContext *Ctx) override {
 1625   bool IsAccessible(NamedDecl *ND, DeclContext *Ctx) {
 3950 static void MaybeAddOverrideCalls(Sema &S, DeclContext *InContext,
 3953   DeclContext *CurContext = S.CurContext;
 4240                            EnumDecl *Enum, DeclContext *CurContext,
 4479                   bool AllowNullaryMethods, DeclContext *CurContext,
 4683           if (DeclContext *Ctx = DepScope->getEntity()) {
 5368   DeclContext *Ctx = computeDeclContext(SS, /*EnteringContext=*/true);
 5465   DeclContext *Ctx = S->getEntity();
 5485     for (DeclContext::specific_decl_iterator<NamespaceDecl>
 5712   DeclContext *DC = S->getEntity();
 6191                            DeclContext *CurContext,
 7071 static void AddProtocolResults(DeclContext *Ctx, DeclContext *CurContext,
 7071 static void AddProtocolResults(DeclContext *Ctx, DeclContext *CurContext,
 7134 static void AddInterfaceResults(DeclContext *Ctx, DeclContext *CurContext,
 7134 static void AddInterfaceResults(DeclContext *Ctx, DeclContext *CurContext,
 8179     if (DeclContext *DC = S->getEntity())
tools/clang/lib/Sema/SemaCoroutine.cpp
  318   DeclContext *LookupCtx = S.computeDeclContext(CoroHandleType);
tools/clang/lib/Sema/SemaDecl.cpp
  240   for (DeclContext *DC = S.CurContext;
  295   DeclContext *LookupCtx = nullptr;
  525 synthesizeCurrentNestedNameSpecifier(ASTContext &Context, DeclContext *DC) {
  545 findRecordWithDependentBasesOfEnclosingMethod(const DeclContext *DC) {
  693       } else if (DeclContext *DC = computeDeclContext(*SS, false)) {
  746   else if (DeclContext *DC = computeDeclContext(*SS, false))
 1253 DeclContext *Sema::getContainingDC(DeclContext *DC) {
 1253 DeclContext *Sema::getContainingDC(DeclContext *DC) {
 1289 void Sema::PushDeclContext(Scope *S, DeclContext *DC) {
 1324 void Sema::EnterDeclaratorContext(Scope *S, DeclContext *DC) {
 1468       DeclContext *IDC = (*I)->getLexicalDeclContext()->getRedeclContext();
 1482 bool Sema::isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S,
 1487 Scope *Sema::getScopeForDeclContext(Scope *S, DeclContext *DC) {
 1488   DeclContext *TargetDC = DC->getPrimaryContext();
 1490     if (DeclContext *ScopeDC = S->getEntity())
 1499                                             DeclContext*,
 1504 void Sema::FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S,
 1615   const DeclContext *DC = D->getDeclContext();
 2078   DeclContext *Parent = Context.getTranslationUnitDecl();
 2118   DeclContext *SavedContext = CurContext;
 3034   const DeclContext *DC = Old->getDeclContext();
 3122   auto *NamedDC = NewD->getDeclContext()->getRedeclContext();
 3123   auto *SemaDC = OldD->getDeclContext()->getRedeclContext();
 3131   auto *LexDC = NewD->getLexicalDeclContext();
 4654                                          DeclContext *Owner,
 4693 InjectAnonymousStructOrUnionMembers(Sema &SemaRef, Scope *S, DeclContext *Owner,
 4815   DeclContext *Owner = Record->getDeclContext();
 4836       DeclContext *OwnerScope = Owner->getRedeclContext();
 5400 bool Sema::DiagnoseClassNameShadow(DeclContext *DC,
 5431 bool Sema::diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC,
 5434   DeclContext *Cur = CurContext;
 5538   DeclContext *DC = CurContext;
 5887 Sema::ActOnTypedefDeclarator(Scope* S, Declarator& D, DeclContext* DC,
 5974 Sema::ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *NewTD,
 6031 isOutOfScopePreviousDeclaration(NamedDecl *PrevDecl, DeclContext *DC,
 6046     DeclContext *OuterContext = DC->getRedeclContext();
 6051     DeclContext *PrevOuterContext = PrevDecl->getDeclContext();
 6406   const DeclContext *DC = VD->getDeclContext()->getRedeclContext();
 6418   const DeclContext *DC = FD->getDeclContext()->getRedeclContext();
 6446 bool Sema::adjustContextForLocalExternDecl(DeclContext *&DC) {
 6479     Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo,
 6600   DeclContext *OriginalDC = DC;
 7186                                                 const DeclContext *OldDC) {
 7261   DeclContext *NewDC = D->getDeclContext();
 7291   DeclContext *OldDC = ShadowedDecl->getDeclContext()->getRedeclContext();
 7319         for (DeclContext *ParentDC = NewDC;
 7368     const DeclContext *OldDC = ShadowedDecl->getDeclContext();
 7408   const DeclContext *OldDC = ShadowedDecl->getDeclContext();
 7459       DeclContext::lookup_result R =
 7461       for (DeclContext::lookup_result::iterator I = R.begin(), E = R.end();
 7968   DeclContext *NewDC = NewFD->getDeclContext();
 8145                                            DeclContext *DC, QualType &R,
 8544 static DeclContext *getTagInjectionContext(DeclContext *DC) {
 8544 static DeclContext *getTagInjectionContext(DeclContext *DC) {
 8564 Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
 8597   DeclContext *OriginalDC = DC;
 8969       DeclContext *PrototypeTagContext =
 8982         DeclContext *TagDC = TD->getLexicalDeclContext();
12752   const DeclContext *DC = VD->getDeclContext();
13089 ParmVarDecl *Sema::BuildParmVarDeclForTypedef(DeclContext *DC,
13144 ParmVarDecl *Sema::CheckParameter(DeclContext *DC, SourceLocation StartLoc,
14639   DeclContext *DC = ND->getDeclContext()->getRedeclContext();
14670 static bool isAcceptableTagRedeclContext(Sema &S, DeclContext *OldDC,
14671                                          DeclContext *NewDC) {
14795   DeclContext *SearchDC = CurContext;
14796   DeclContext *DC = CurContext;
14954       DeclContext *EnclosingNS = SearchDC->getEnclosingNamespaceContext();
14959         DeclContext *DC = ND->getDeclContext()->getRedeclContext();
15586     DeclContext *DC = New->getDeclContext()->getRedeclContext();
15660   DeclContext *OCD = cast<DeclContext>(IDecl);
15660   DeclContext *OCD = cast<DeclContext>(IDecl);
15738 void Sema::ActOnObjCTemporaryExitContainerContext(DeclContext *DC) {
15744 void Sema::ActOnObjCReenterContainerContext(DeclContext *DC) {
tools/clang/lib/Sema/SemaDeclAttr.cpp
 1756   const DeclContext *Ctx = D->getDeclContext()->getRedeclContext();
 5125   const DeclContext *DC = Method->getDeclContext();
 5198   DeclContext *Ctx = D->getDeclContext();
 7389     DeclContext *SavedContext = CurContext;
 7577       const DeclContext *DC = ECD->getDeclContext();
tools/clang/lib/Sema/SemaDeclCXX.cpp
  443   DeclContext *ScopeDC = New->isLocalExternDecl()
  718   DeclContext *const DC = CurContext;
 2327     DeclContext *DC = computeDeclContext(*SS, true);
 2355     DeclContext *DC = computeDeclContext(*SS, true);
 3322       if (DeclContext *DC = computeDeclContext(SS, false))
 4034   DeclContext::lookup_result Result = ClassDecl->lookup(MemberOrBase);
 4124         DeclContext *DC = computeDeclContext(SS, false);
 6336     DeclContext::lookup_result R = Record->lookup(Record->getDeclName());
 6337     for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E;
 8278   DeclContext::lookup_result R = DC->lookup(MD->getDeclName());
 8279   for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E; ++I) {
 9365     DeclContext *Parent = CurContext->getRedeclContext();
 9399     DeclContext *Parent = CurContext->getRedeclContext();
 9773 static bool IsUsingDirectiveInToplevelContext(DeclContext *CurContext) {
 9811     if (DeclContext *DC = S.computeDeclContext(SS, false)) {
 9889     DeclContext *CommonAncestor = NS;
 9917   DeclContext *Ctx = S->getEntity();
10051     DeclContext *OrigDC = Orig->getDeclContext();
10465   DeclContext *LookupContext = computeDeclContext(SS);
10777   DeclContext *NamedContext = computeDeclContext(SS);
13523     DeclContext::lookup_result Lookup =
13679   const DeclContext *DC = FnDecl->getDeclContext()->getRedeclContext();
14873   DeclContext *DC;
14949     DeclContext *LookupDC = DC;
tools/clang/lib/Sema/SemaDeclObjC.cpp
  150       DeclContext *DC = NewMethod->getDeclContext();
 4701     cast<DeclContext>(ClassDecl)->addDecl(ObjCMethod);
tools/clang/lib/Sema/SemaExpr.cpp
 1888   DeclContext *Ctx =
 1939   DeclContext *DC = SS.isEmpty() ? CurContext : nullptr;
 2203     if (DeclContext *DC = computeDeclContext(SS, false)) {
 2414   DeclContext *DC = computeDeclContext(SS, false);
 2942                                    ValueDecl *var, DeclContext *DC);
 3218   if (cast<DeclContext>(currentDecl)->isDependentContext())
 4166         DeclContext *DC = nullptr;
 4783         DeclContext *DC = nullptr;
 5452   DeclContext *Parent = FDecl->getParent();
 5507     const DeclContext *const DC = S.getFunctionLevelDeclContext();
 5565   DeclContext *EnclosingFunctionCtx = S.CurContext->getParent()->getParent();
10880       DeclContext *DC = CurContext;
11471   DeclContext *DC = S.CurContext, *Prev = nullptr;
11610     if (const DeclContext *DC = S.getFunctionLevelDeclContext()) {
12454         DeclContext *Ctx = dcl->getDeclContext();
15657                                    ValueDecl *var, DeclContext *DC) {
15658   DeclContext *VarDC = var->getDeclContext();
15729 static DeclContext *getParentOfCapturingContextOrNull(DeclContext *DC, VarDecl *Var,
15729 static DeclContext *getParentOfCapturingContextOrNull(DeclContext *DC, VarDecl *Var,
16027   DeclContext *VarDC = Var->getDeclContext();
16031   DeclContext *DC = CurContext;
16074     DeclContext *ParentDC = getParentOfCapturingContextOrNull(DC, Var,
tools/clang/lib/Sema/SemaExprCXX.cpp
  161   DeclContext *LookupCtx = nullptr;
  190     DeclContext *DC = computeDeclContext(SS, EnteringContext);
  281         if (DeclContext *Ctx = computeDeclContext(SS, EnteringContext)) {
  369       const DeclContext *Ctx = S->getEntity();
  972     DeclContext *CurSemaContext, ASTContext &ASTCtx) {
  976   DeclContext *CurDC = CurSemaContext;
 1082   DeclContext *DC = getFunctionLevelDeclContext();
 2770   DeclContext *GlobalCtx = Context.getTranslationUnitDecl();
 2773   DeclContext::lookup_result R = GlobalCtx->lookup(Name);
 2774   for (DeclContext::lookup_iterator Alloc = R.begin(), AllocEnd = R.end();
 7461   DeclContext *DC = S.CurContext;
 8028   DeclContext *DC = CurContext;
tools/clang/lib/Sema/SemaExprMember.cpp
   92   DeclContext *DC = SemaRef.getFunctionLevelDeclContext();
  207   DeclContext *FunctionLevelDC = SemaRef.getFunctionLevelDeclContext();
  569     DeclContext *DC = (*I)->getDeclContext();
  665   DeclContext *DC = RDecl;
 1007     DeclContext *DC = (SS.isSet()
tools/clang/lib/Sema/SemaExprObjC.cpp
 1265   DeclContext *DC = getFunctionLevelDeclContext();
tools/clang/lib/Sema/SemaInit.cpp
 2497       DeclContext::lookup_result Lookup = RT->getDecl()->lookup(FieldName);
 3867                            DeclContext::lookup_result Ctors,
 4047   DeclContext::lookup_result Ctors = S.LookupConstructors(DestRecordDecl);
 6127   DeclContext::lookup_result Ctors = S.LookupConstructors(Class);
 6269   DeclContext::lookup_result Ctors =
 6713   const DeclContext *DC = D->getDeclContext();
tools/clang/lib/Sema/SemaLambda.cpp
   83   DeclContext *EnclosingDC =
  245   DeclContext *DC = CurContext;
  263 static bool isInInlineFunction(const DeclContext *DC) {
  276 Sema::getCurrentMangleNumberContext(const DeclContext *DC) {
  295       if (const DeclContext *LexicalDC
tools/clang/lib/Sema/SemaLookup.cpp
   57     const DeclContext *Nominated;
   58     const DeclContext *CommonAncestor;
   61     UnqualUsingEntry(const DeclContext *Nominated,
   62                      const DeclContext *CommonAncestor)
   66     const DeclContext *getCommonAncestor() const {
   70     const DeclContext *getNominatedNamespace() const {
   80       bool operator()(const UnqualUsingEntry &E, const DeclContext *DC) {
   84       bool operator()(const DeclContext *DC, const UnqualUsingEntry &E) {
   98     llvm::SmallPtrSet<DeclContext*, 8> visited;
  108       DeclContext *InnermostFileDC = InnermostFileScope->getEntity();
  115         DeclContext *Ctx = S->getEntity();
  133     void visit(DeclContext *DC, DeclContext *EffectiveDC) {
  133     void visit(DeclContext *DC, DeclContext *EffectiveDC) {
  143     void visit(UsingDirectiveDecl *UD, DeclContext *EffectiveDC) {
  144       DeclContext *NS = UD->getNominatedNamespace();
  155     void addUsingDirectives(DeclContext *DC, DeclContext *EffectiveDC) {
  155     void addUsingDirectives(DeclContext *DC, DeclContext *EffectiveDC) {
  156       SmallVector<DeclContext*, 4> queue;
  159           DeclContext *NS = UD->getNominatedNamespace();
  180     void addUsingDirective(UsingDirectiveDecl *UD, DeclContext *EffectiveDC) {
  183       DeclContext *Common = UD->getNominatedNamespace();
  199     getNamespacesFor(DeclContext *DC) const {
  350 static DeclContext *getContextForScopeMatching(Decl *D) {
  354   DeclContext *DC = D->getLexicalDeclContext();
  637     for (DeclContext::lookup_iterator DI = I->Decls.begin(),
  790     DeclContext *Parent = Context.getTranslationUnitDecl();
  946                                                    const DeclContext *DC) {
  999 static bool LookupDirect(Sema &S, LookupResult &R, const DeclContext *DC) {
 1008   DeclContext::lookup_result DR = DC->lookup(R.getLookupName());
 1102                    DeclContext *NS, UnqualUsingDirectiveSet &UDirs) {
 1121   if (DeclContext *Ctx = S->getEntity())
 1133 static std::pair<DeclContext *, bool> findOuterContext(Scope *S) {
 1134   DeclContext *DC = S->getEntity();
 1135   DeclContext *Lexical = nullptr;
 1180   DeclContext *Semantic = DC;
 1226       if (DeclContext *DC = PreS->getEntity())
 1259   DeclContext *OutsideOfTemplateParamDC = nullptr;
 1265     DeclContext *Ctx = S->getEntity();
 1323       DeclContext *OuterCtx;
 1367             for (DeclContext *UCtx = Ctx; UCtx; UCtx = UCtx->getParent()) {
 1453     DeclContext *Ctx = S->getEntity();
 1466       DeclContext *OuterCtx;
 1542   DeclContext *Context = Entity->getLexicalDeclContext();
 1700   DeclContext *DC = D->getLexicalDeclContext();
 1977           DeclContext *DC = nullptr;
 1989               DeclContext *LastDC
 2052                                                  DeclContext *StartDC) {
 2060   llvm::SmallPtrSet<DeclContext*, 8> Visited;
 2193 bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
 2209     DeclContext *Context;
 2211     QualifiedLookupInScope(DeclContext *ctx) : Context(ctx) {
 2349         DeclContext::lookup_iterator FirstD = FirstPath->Decls.begin();
 2350         DeclContext::lookup_iterator CurrentD = Path->Decls.begin();
 2430 bool Sema::LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
 2472     if (DeclContext *DC = computeDeclContext(*SS, EnteringContext)) {
 2551     DeclContext::lookup_iterator Found = Paths->front().Decls.begin();
 2642                                       DeclContext *Ctx) {
 2690         DeclContext *Ctx = ClassTemplate->getDeclContext();
 2733   DeclContext *Ctx = Class->getDeclContext();
 2751     DeclContext *Ctx = Spec->getSpecializedTemplate()->getDeclContext();
 2794         DeclContext *BaseCtx = BaseDecl->getDeclContext();
 2875       DeclContext *Ctx = Enum->getDeclContext();
 3196   DeclContext::lookup_result R = RD->lookup(Name);
 3308 DeclContext::lookup_result Sema::LookupConstructors(CXXRecordDecl *Class) {
 3545   for (auto *NS : AssociatedNamespaces) {
 3557     DeclContext::lookup_result R = NS->lookup(Name);
 3621   llvm::SmallPtrSet<DeclContext *, 8> VisitedContexts;
 3628   bool visitedContext(DeclContext *Ctx) {
 3632   bool alreadyVisitedContext(DeclContext *Ctx) {
 3743   void lookupVisibleDecls(Sema &SemaRef, DeclContext *Ctx,
 3756   void lookupInDeclContext(DeclContext *Ctx, LookupResult &Result,
 3964     DeclContext *Entity = nullptr;
 3970       DeclContext *OuterCtx = findOuterContext(S).first; // FIXME
 3972       for (DeclContext *Ctx = Entity; Ctx && !Ctx->Equals(OuterCtx);
 4046 void Sema::LookupVisibleDecls(DeclContext *Ctx, LookupNameKind Kind,
 4101                                       DeclContext *MemberContext,
 4187                                        DeclContext *Ctx, bool InBaseClass) {
 4347   DeclContext *TempMemberContext = MemberContext;
 4399       DeclContext *Ctx = NSI.DeclCtx;
 4474     ASTContext &Context, DeclContext *CurContext, CXXScopeSpec *CurScopeSpec)
 4486   for (DeclContext *C : llvm::reverse(CurContextChain)) {
 4492   SpecifierInfo SI = {cast<DeclContext>(Context.getTranslationUnitDecl()),
 4501   for (DeclContext *DC = Start->getPrimaryContext(); DC != nullptr;
 4515   for (DeclContext *C : llvm::reverse(DeclChain)) {
 4529     DeclContext *Ctx) {
 4536   for (DeclContext *C : llvm::reverse(CurContextChain)) {
 4596                                       DeclContext *MemberContext,
 4800     DeclContext *MemberContext, bool EnteringContext,
 4872   DeclContext *QualifiedDC = MemberContext;
 4977                                  DeclContext *MemberContext,
tools/clang/lib/Sema/SemaModule.cpp
   23                                      SourceLocation ImportLoc, DeclContext *DC,
  454     for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) {
  495     for (auto *DC = CurContext; DC; DC = DC->getLexicalParent()) {
  549   for (const DeclContext *DC = CurContext; DC; DC = DC->getLexicalParent()) {
  585 static bool checkExportedDeclContext(Sema &S, DeclContext *DC,
  675   if (auto *DC = dyn_cast<DeclContext>(D))
  675   if (auto *DC = dyn_cast<DeclContext>(D))
  682 static bool checkExportedDeclContext(Sema &S, DeclContext *DC,
tools/clang/lib/Sema/SemaObjCProperty.cpp
  117   DeclContext::lookup_result R = Proto->lookup(Prop->getDeclName());
  184                           DeclContext *lexicalDC) {
  238       DeclContext::lookup_result R = Super->lookup(Res->getDeclName());
  399   auto *OldDC = OldProperty->getDeclContext();
  428   DeclContext *DC = CurContext;
  579                                            DeclContext *lexicalDC){
  620   DeclContext *DC = CDecl;
 1113         DeclContext::lookup_result R = Ext->lookup(property->getDeclName());
tools/clang/lib/Sema/SemaOpenMP.cpp
 1103   DeclContext *DC = SemaRef.CurContext;
 2598     ArrayRef<OMPClause *> Clauses, DeclContext *Owner) {
 3616             DeclContext *VDC = VD->getDeclContext();
12766   for (auto *NS : AssociatedNamespaces) {
12778     DeclContext::lookup_result R = NS->lookup(Id.getName());
15579     Scope *S, DeclContext *DC, DeclarationName Name,
15834     Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType,
16153   DeclContext *CurLexicalContext = getCurLexicalContext();
tools/clang/lib/Sema/SemaOverload.cpp
12100   for (DeclContext *DC = SemaRef.CurContext; DC; DC = DC->getParent()) {
12141         DeclContext *Std = SemaRef.getStdNamespace();
tools/clang/lib/Sema/SemaStmt.cpp
 2059   DeclContext *DC = SemaRef.CurContext;
 4171   DeclContext *DC = CurContext;
 4254   DeclContext *DC = CurContext;
 4325   DeclContext *DC = CapturedDecl::castToDeclContext(CD);
 4355   DeclContext *DC = CapturedDecl::castToDeclContext(CD);
tools/clang/lib/Sema/SemaTemplate.cpp
  340   DeclContext *LookupCtx = nullptr;
  575   DeclContext *LookupCtx = nullptr;
  676   DeclContext *DC = getFunctionLevelDeclContext();
 1379   DeclContext *SemanticContext;
 1467       DeclContext *OutermostContext = CurContext;
 1485         DeclContext *LookupContext = SemanticContext;
 1691       DeclContext *DC = SemanticContext->getRedeclContext();
 1748   DeclContext *DC = Template->getDeclContext();
 2046   DeclContext *DC = Template->getDeclContext();
 3315       for (DeclContext *Ctx = CurContext; Ctx; Ctx = Ctx->getLookupParent()) {
 3453     DeclContext *LookupCtx = computeDeclContext(SS, /*EnteringContext*/false);
 4335   DeclContext *DC;
 4390   DeclContext *LookupCtx = nullptr;
 7384   DeclContext *Ctx = S->getEntity();
 7498   DeclContext *SpecializedContext =
 7500   DeclContext *DC = S.CurContext->getRedeclContext();
 8052   DeclContext *DC = CurContext;
 8335   DeclContext *FDLookupContext = FD->getDeclContext()->getRedeclContext();
 8405   DeclContext *FDLookupContext = FD->getDeclContext()->getRedeclContext();
 8831   DeclContext *OrigContext= D->getDeclContext()->getEnclosingNamespaceContext();
 8832   DeclContext *CurContext = S.CurContext->getRedeclContext();
 9975   DeclContext *Ctx = computeDeclContext(SS);
10338   DeclContext *DC = CurContext;
tools/clang/lib/Sema/SemaTemplateDeduction.cpp
 2694 static DeclContext *getAsDeclContextOrEnclosing(Decl *D) {
 2695   if (auto *DC = dyn_cast<DeclContext>(D))
 2695   if (auto *DC = dyn_cast<DeclContext>(D))
 3362   DeclContext *Owner = FunctionTemplate->getDeclContext();
 3951   DeclContext *CallingCtx = CurContext;
tools/clang/lib/Sema/SemaTemplateInstantiate.cpp
   66   DeclContext *Ctx = dyn_cast<DeclContext>(D);
   66   DeclContext *Ctx = dyn_cast<DeclContext>(D);
  913       if (auto *DC = dyn_cast<DeclContext>(Old))
  913       if (auto *DC = dyn_cast<DeclContext>(Old))
 1012       DeclContext *Owner = OrigTPL->getParam(0)->getDeclContext();
 2861         DeclContext::lookup_result Lookup =
tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
   31   const DeclContext *DC = D->getDeclContext();
  814     DeclContext::lookup_result Found = Owner->lookup(Pattern->getDeclName());
  888   DeclContext *DC = Owner;
 1336     DeclContext::lookup_result Found = Owner->lookup(Pattern->getDeclName());
 1348   DeclContext *DC = Owner;
 1396         DeclContext *DCParent = DC->getParent();
 1502   DeclContext::lookup_result Found
 1535     DeclContext::lookup_result Found = Owner->lookup(Pattern->getDeclName());
 1545   DeclContext *DC = Owner;
 1587   DeclContext::lookup_result Found = Owner->lookup(VarTemplate->getDeclName());
 1818   DeclContext *DC;
 1861   DeclContext *LexicalDC = Owner;
 2132   DeclContext *DC = Owner;
 3484 Decl *Sema::SubstDecl(Decl *D, DeclContext *Owner,
 3541 Sema::SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner,
 4485     LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner,
 5271 DeclContext *Sema::FindInstantiatedContext(SourceLocation Loc, DeclContext* DC,
 5271 DeclContext *Sema::FindInstantiatedContext(SourceLocation Loc, DeclContext* DC,
 5275     return cast_or_null<DeclContext>(ID);
 5308   DeclContext *ParentDC = D->getDeclContext();
 5410     DeclContext *DC = CurContext;
 5524       DeclContext::lookup_result Found = ParentDC->lookup(Name);
 5673 void Sema::PerformDependentDiagnostics(const DeclContext *Pattern,
tools/clang/lib/Sema/SemaType.cpp
 3765   for (DeclContext *ctx = S.CurContext; ctx; ctx = ctx->getParent()) {
 5101       DeclContext *DC = S.computeDeclContext(D.getCXXScopeSpec());
tools/clang/lib/Sema/TreeTransform.h
 1081     DeclContext *DC = SemaRef.computeDeclContext(SS, false);
 3229     DeclContext::lookup_result Lookup = TUDecl->lookup(DeclarationName(&Name));
tools/clang/lib/Serialization/ASTCommon.cpp
  262 const DeclContext *
  263 serialization::getDefinitiveDeclContext(const DeclContext *DC) {
tools/clang/lib/Serialization/ASTCommon.h
   85 const DeclContext *getDefinitiveDeclContext(const DeclContext *DC);
   85 const DeclContext *getDefinitiveDeclContext(const DeclContext *DC);
   96 template<typename Fn> void numberAnonymousDeclsWithin(const DeclContext *DC,
tools/clang/lib/Serialization/ASTReader.cpp
 1147                                               DeclContext *DC) {
 2952         DeclContext *DC = Ctx->getTranslationUnitDecl();
 3146       DeclContext *TU = ContextObj->getTranslationUnitDecl();
 7612   const DeclContext *DC = D->getDeclContext()->getRedeclContext();
 7636         auto *DC = cast<DeclContext>(DCDecl);
 7636         auto *DC = cast<DeclContext>(DCDecl);
 7933     const DeclContext *DC, llvm::function_ref<bool(Decl::Kind)> IsKindWeWant,
 8050 ASTReader::FindExternalVisibleDeclsByName(const DeclContext *DC,
 8076 void ASTReader::completeVisibleDeclsMap(const DeclContext *DC) {
 8100 ASTReader::getLoadedLookupTables(DeclContext *Primary) const {
 9937       DeclContext *SemaDC = cast<DeclContext>(GetDecl(Info.SemaDC));
 9937       DeclContext *SemaDC = cast<DeclContext>(GetDecl(Info.SemaDC));
 9938       DeclContext *LexicalDC = cast<DeclContext>(GetDecl(Info.LexicalDC));
 9938       DeclContext *LexicalDC = cast<DeclContext>(GetDecl(Info.LexicalDC));
10127     DeclContext *CanonDef = D->getDeclContext();
tools/clang/lib/Serialization/ASTReaderDecl.cpp
  144     T *ReadDeclAs() {
  145       return Record.readDeclAs<T>();
  179     static DeclContext *getPrimaryDCForAnonymousDecl(DeclContext *LexicalDC);
  179     static DeclContext *getPrimaryDCForAnonymousDecl(DeclContext *LexicalDC);
  182                                                  DeclContext *DC,
  184     static void setAnonymousDeclForMerging(ASTReader &Reader, DeclContext *DC,
  252     static DeclContext *getPrimaryContextForMerging(ASTReader &Reader,
  253                                                     DeclContext *DC);
  409     std::pair<uint64_t, uint64_t> VisitDeclContext(DeclContext *DC);
  574     auto *SemaDC = ReadDeclAs<DeclContext>();
  574     auto *SemaDC = ReadDeclAs<DeclContext>();
  575     auto *LexicalDC = ReadDeclAs<DeclContext>();
  575     auto *LexicalDC = ReadDeclAs<DeclContext>();
  578     DeclContext *MergedSemaDC = Reader.MergedDeclContexts.lookup(SemaDC);
 1636   D->CommonAncestor = ReadDeclAs<DeclContext>();
 2350 ASTDeclReader::VisitDeclContext(DeclContext *DC) {
 3130 DeclContext *ASTDeclReader::getPrimaryContextForMerging(ASTReader &Reader,
 3131                                                         DeclContext *DC) {
 3175     DeclContext *DC = New->getDeclContext()->getRedeclContext();
 3185   DeclContext *DC = New->getDeclContext()->getRedeclContext();
 3194   } else if (DeclContext *MergeDC = getPrimaryContextForMerging(Reader, DC)) {
 3224 DeclContext *
 3225 ASTDeclReader::getPrimaryDCForAnonymousDecl(DeclContext *LexicalDC) {
 3249                                                      DeclContext *DC,
 3262   auto *PrimaryDC = getPrimaryDCForAnonymousDecl(DC);
 3276                                                DeclContext *DC, unsigned Index,
 3300   DeclContext *DC = D->getDeclContext()->getRedeclContext();
 3353   } else if (DeclContext *MergeDC = getPrimaryContextForMerging(Reader, DC)) {
 3354     DeclContext::lookup_result R = MergeDC->noload_lookup(Name);
 3355     for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E; ++I) {
 3902   if (auto *DC = dyn_cast<DeclContext>(D)) {
 3902   if (auto *DC = dyn_cast<DeclContext>(D)) {
 4038     auto *DC = cast<DeclContext>(D)->getPrimaryContext();
 4038     auto *DC = cast<DeclContext>(D)->getPrimaryContext();
tools/clang/lib/Serialization/ASTReaderStmt.cpp
   95     T *ReadDeclAs() {
   96       return Record.readDeclAs<T>();
 1050   E->ParentContext = ReadDeclAs<DeclContext>();
 1589   E->UsedContext = ReadDeclAs<DeclContext>();
 1596   E->UsedContext = ReadDeclAs<DeclContext>();
tools/clang/lib/Serialization/ASTWriter.cpp
 3230                                                  DeclContext *DC) {
 4001                                        DeclContext *DC) {
 4007                                                DeclContext *DC) {
 4016 ASTWriter::GenerateNameLookupTable(const DeclContext *ConstDC,
 4023   auto *DC = const_cast<DeclContext*>(ConstDC);
 4159     DeclContext::lookup_result Result = DC->noload_lookup(Name);
 4198                                                  DeclContext *DC) {
 4217     SmallVector<std::pair<DeclarationName, DeclContext::lookup_result>, 16>
 4229       DeclContext::lookup_result Result = NameAndResult.second;
 4288 void ASTWriter::WriteDeclContextVisibleUpdate(const DeclContext *DC) {
 4300     DC = cast<DeclContext>(Chain->getKeyDeclaration(cast<Decl>(DC)));
 6353 void ASTWriter::AddedVisibleDecl(const DeclContext *DC, const Decl *D) {
tools/clang/lib/Serialization/ASTWriterDecl.cpp
  128     void VisitDeclContext(DeclContext *DC);
  288   if (DeclContext *DC = dyn_cast<DeclContext>(D))
  288   if (DeclContext *DC = dyn_cast<DeclContext>(D))
  319     auto *DC = D->getDeclContext();
 1698 void ASTDeclWriter::VisitDeclContext(DeclContext *DC) {
tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp
  819   DeclContext::lookup_result R = CatDecl->getClassInterface()->lookup(ID);
  820   for (DeclContext::lookup_iterator I = R.begin(), E = R.end(); I != E; ++I) {
tools/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp
  253   DeclContext::lookup_result Result = AssertionResultDecl->lookup(SuccessII);
tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp
  736   const DeclContext *DC = D->getDeclContext();
tools/clang/lib/StaticAnalyzer/Checkers/ObjCUnusedIVarsChecker.cpp
   96 static void Scan(IvarUsageMap &M, const DeclContext *C, const FileID FID,
tools/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
  111   const DeclContext *NamespaceCtx = FD->getEnclosingNamespaceContext();
  467   const DeclContext *NamespaceCtx = FD->getEnclosingNamespaceContext();
tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
  387     const DeclContext *Ctx = FD->getDeclContext();
tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp
  820                                       const DeclContext *DC,
  824       if (cast<DeclContext>(SFC->getDecl()) == DC)
  877     const DeclContext *DC = D->getDeclContext();
tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
  710     const DeclContext *DC = OMD->getDeclContext();
tools/clang/lib/Tooling/ASTDiff/ASTDiff.cpp
  152                               const DeclContext *Context) const;
  359                                   const DeclContext *Context) const {
  383 static const DeclContext *getEnclosingDeclContext(ASTContext &AST,
tools/clang/lib/Tooling/Core/Lookup.cpp
   47 usingFromDifferentCanonicalNamespace(const DeclContext *FromContext,
   48                                      const DeclContext *UseContext) {
   83 static StringRef getBestNamespaceSubstr(const DeclContext *DeclA,
  127                                                const DeclContext &UseContext,
  185                                        const DeclContext *UseContext,
tools/clang/tools/clang-extdef-mapping/ClangExtDefMapGen.cpp
   72   if (const auto *DC = dyn_cast<DeclContext>(D))
   72   if (const auto *DC = dyn_cast<DeclContext>(D))
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.cpp
   78   const auto *CurrentContext = llvm::cast<DeclContext>(InnerNs);
   78   const auto *CurrentContext = llvm::cast<DeclContext>(InnerNs);
  267 bool isNestedDeclContext(const DeclContext *D, const DeclContext *Context) {
  267 bool isNestedDeclContext(const DeclContext *D, const DeclContext *Context) {
  278                              const DeclContext *DeclCtx, SourceLocation Loc) {
  304       const auto *DC = llvm::dyn_cast<DeclContext>(&Scope);
  304       const auto *DC = llvm::dyn_cast<DeclContext>(&Scope);
  773     const DeclContext *DeclCtx, SourceLocation Start, SourceLocation End,
  775   const auto *NsDeclContext = DeclCtx->getEnclosingNamespaceContext();
  958     const DeclContext *UseContext, const NamedDecl *From,
tools/clang/tools/extra/clang-change-namespace/ChangeNamespace.h
   74       const DeclContext *DeclContext, SourceLocation Start, SourceLocation End,
   84                       const DeclContext *UseContext, const NamedDecl *From,
tools/clang/tools/extra/clang-doc/Serialize.cpp
  360   const auto *DC = dyn_cast<DeclContext>(D);
  360   const auto *DC = dyn_cast<DeclContext>(D);
tools/clang/tools/extra/clang-include-fixer/IncludeFixer.cpp
  186     CorrectionCandidateCallback &CCC, DeclContext *MemberContext,
  218     for (const auto *Context = S->getEntity(); Context;
tools/clang/tools/extra/clang-include-fixer/IncludeFixer.h
  107                                     DeclContext *MemberContext,
tools/clang/tools/extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp
   48   for (const auto *Context = ND->getDeclContext(); Context;
tools/clang/tools/extra/clang-move/HelperDeclRefGraph.cpp
   91   const auto *DC = D->getDeclContext();
tools/clang/tools/extra/clang-move/Move.cpp
   37   const auto *Context = Node.getDeclContext();
   40   while (const auto *NextContext = Context->getParent()) {
  354   for (const auto *Context = D->getDeclContext(); Context;
tools/clang/tools/extra/clang-tidy/bugprone/ArgumentCommentCheck.cpp
  190     const DeclContext *Ctx = Method->getDeclContext();
tools/clang/tools/extra/clang-tidy/bugprone/ForwardDeclarationNamespaceCheck.cpp
   84   const DeclContext *ParentDecl1 = Decl1->getLexicalParent();
   85   const DeclContext *ParentDecl2 = Decl2->getLexicalParent();
  104   const auto *ParentDecl = Decl->getLexicalParent();
tools/clang/tools/extra/clang-tidy/llvm/PreferRegisterOverUnsignedCheck.cpp
   40   const DeclContext *Context = UserVarDecl->getDeclContext();
tools/clang/tools/extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
  115       const auto *DC = MD->getDeclContext();
tools/clang/tools/extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
   34   const clang::DeclContext *DC = Node.getDeclContext();
tools/clang/tools/extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
   59   const DeclContext *D = Node.getDeclContext();
tools/clang/tools/extra/clang-tidy/modernize/UseAutoCheck.cpp
  189   const DeclContext *D = Node.getDeclContext();
tools/clang/tools/extra/clang-tidy/readability/NonConstParameterCheck.cpp
   42     if (const DeclContext *D = Parm->getParentFunctionOrMethod()) {
tools/clang/tools/extra/clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp
   38   const DeclContext *DC = Def->getDeclContext();
tools/clang/tools/extra/clangd/AST.cpp
  191 std::string printNamespaceScope(const DeclContext &DC) {
  192   for (const auto *Ctx = &DC; Ctx != nullptr; Ctx = Ctx->getParent())
  238 std::string printType(const QualType QT, const DeclContext & Context){
tools/clang/tools/extra/clangd/AST.h
   43 std::string printNamespaceScope(const DeclContext &DC);
   78 std::string printType(const QualType QT, const DeclContext & Context);
tools/clang/tools/extra/clangd/CodeComplete.cpp
  549   for (auto *Context : CCContext.getVisitedContexts()) {
tools/clang/tools/extra/clangd/FindSymbols.cpp
  213     auto *Scope = llvm::dyn_cast<DeclContext>(D);
  213     auto *Scope = llvm::dyn_cast<DeclContext>(D);
tools/clang/tools/extra/clangd/FindTarget.cpp
  104       if (const DeclContext *Parent = dyn_cast_or_null<DeclContext>(
  104       if (const DeclContext *Parent = dyn_cast_or_null<DeclContext>(
tools/clang/tools/extra/clangd/HeaderSourceSwitch.cpp
  138       if (auto *Scope = llvm::dyn_cast<DeclContext>(ND)) {
  138       if (auto *Scope = llvm::dyn_cast<DeclContext>(ND)) {
tools/clang/tools/extra/clangd/IncludeFixer.cpp
   53   void EnteredContext(DeclContext *Ctx) override { Visited.push_back(Ctx); }
   55   void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
   58   std::vector<DeclContext *> takeVisitedContexts() {
   63   std::vector<DeclContext *> Visited;
  315   for (const auto *Ctx : Collector.takeVisitedContexts()) {
  334                              DeclContext *MemberContext, bool EnteringContext,
tools/clang/tools/extra/clangd/Quality.cpp
  263   const DeclContext *DC = D->getDeclContext();
tools/clang/tools/extra/clangd/Selection.cpp
  515 const DeclContext& SelectionTree::Node::getDeclContext() const {
  520         if (auto *DC = dyn_cast<DeclContext>(Current))
tools/clang/tools/extra/clangd/Selection.h
  106     const DeclContext& getDeclContext() const;
tools/clang/tools/extra/clangd/XRefs.cpp
  460   const DeclContext *DC = D->getDeclContext();
  484   const DeclContext *DC = D->getDeclContext();
tools/clang/tools/extra/clangd/index/SymbolCollector.cpp
  221   const auto *DeclCtx = ND.getDeclContext();
tools/clang/tools/extra/clangd/refactor/tweaks/ExtractFunction.cpp
  280     std::string render(const DeclContext *Context) const;
  290   const DeclContext *EnclosingFuncContext;
  351 std::string NewFunction::Parameter::render(const DeclContext *Context) const {
tools/clang/tools/extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
   65   const DeclContext *TargetCtx;
   97 const DeclContext *visibleContext(const DeclContext *D) {
   97 const DeclContext *visibleContext(const DeclContext *D) {
tools/clang/tools/extra/clangd/unittests/TestTU.cpp
  131   const DeclContext *Scope = Ctx.getTranslationUnitDecl();
  134     Scope = &cast<DeclContext>(LookupDecl(*Scope, *NameIt));
tools/clang/tools/libclang/CIndex.cpp
  291 static bool isInLexicalContext(Decl *D, DeclContext *DC) {
  295   for (DeclContext *DeclDC = D->getLexicalDeclContext();
  336   DeclContext *CurDC = nullptr;
  346     CurDC = dyn_cast<DeclContext>(D);
  378   DeclContext *DC = DIt == Decls.begin() ? (*DIt)->getLexicalDeclContext()
  620 bool CursorVisitor::VisitDeclContext(DeclContext *DC) {
  621   DeclContext::decl_iterator I = DC->decls_begin(), E = DC->decls_end();
  625   SaveAndRestore<DeclContext::decl_iterator*> DI_saved(DI_current, &I);
  626   SaveAndRestore<DeclContext::decl_iterator> DE_saved(DE_current, E);
 1115     ObjCPropertyDecl::findPropertyDecl(cast<DeclContext>(ID), PropertyId,
 8051       const DeclContext *DC = D->getDeclContext();
 8071       const DeclContext *DC = D->getLexicalDeclContext();
tools/clang/tools/libclang/CIndexHigh.cpp
  227   if (const DeclContext *DC = Dcl->getParentFunctionOrMethod()) {
tools/clang/tools/libclang/CXIndexDataConsumer.cpp
   27   const DeclContext *LexicalDC;
   31                       const DeclContext *lexicalDC)
  210     const DeclContext *LexicalDC = ASTNode.ContainerDC;
  214           LexicalDC = dyn_cast<DeclContext>(SymRel.RelatedSymbol);
  545                                  const DeclContext *LexicalDC,
  546                                  const DeclContext *SemaDC) {
  830                                                  const DeclContext *LexicalDC) {
  888                                       const DeclContext *DC,
  942 void CXIndexDataConsumer::addContainerInMap(const DeclContext *DC,
 1053 const DeclContext *
 1055   const DeclContext *DC = dyn_cast<DeclContext>(D);
 1055   const DeclContext *DC = dyn_cast<DeclContext>(D);
 1070 CXIndexDataConsumer::getClientContainerForDC(const DeclContext *DC) const {
 1188 void CXIndexDataConsumer::getContainerInfo(const DeclContext *DC,
tools/clang/tools/libclang/CXIndexDataConsumer.h
   61   const DeclContext *DC;
  283   typedef llvm::DenseMap<const DeclContext *, CXIdxClientContainer>
  403                                    const DeclContext *LexicalDC);
  415                        const DeclContext *DC,
  425   CXIdxClientContainer getClientContainerForDC(const DeclContext *DC) const;
  426   void addContainerInMap(const DeclContext *DC, CXIdxClientContainer container);
  447                   const DeclContext *LexicalDC = nullptr,
  448                   const DeclContext *SemaDC = nullptr);
  460   const DeclContext *getEntityContainer(const Decl *D) const;
  470   void getContainerInfo(const DeclContext *DC, ContainerInfo &ContInfo);
tools/clang/tools/libclang/CursorVisitor.h
  100   DeclContext::decl_iterator *DI_current;
  101   DeclContext::decl_iterator DE_current;
  203   bool VisitDeclContext(DeclContext *DC);
tools/clang/unittests/AST/ASTContextParentMapTest.cpp
   90   auto &Bar = *cast<DeclContext>(Foo).lookup(&Ctx.Idents.get("bar")).front();
tools/clang/unittests/AST/ASTImporterTest.cpp
 4017   auto *DC = A0->getDeclContext();
 4283 static Decl *findInDeclListOfDC(DeclContext *DC, DeclarationName Name) {
 4305   DeclContext *FooDC = Foo->getDeclContext();
 4306   DeclContext *FooLexicalDC = Foo->getLexicalDeclContext();
 4341   DeclContext *FooDC = Foo->getDeclContext();
 4342   DeclContext *FooLexicalDC = Foo->getLexicalDeclContext();
 4382   auto Res = LT.lookup(cast<DeclContext>(A), VName);
 4387   Res = LT.lookup(cast<DeclContext>(B), VName);
 4661   auto TemplateDC = cast<DeclContext>(Template->getTemplatedDecl());
 4672   cast<DeclContext>(Spec)->getRedeclContext()->localUncachedLookup(Name,
 4677   Res = LT.lookup(cast<DeclContext>(Spec), Name);
tools/clang/unittests/AST/ExternalASTSourceTest.cpp
   69     bool FindExternalVisibleDeclsByName(const DeclContext *,
tools/clang/unittests/Frontend/FrontendActionTest.cpp
  206                              DeclContext *MemberContext, bool EnteringContext,
tools/clang/unittests/Sema/CodeCompleteTest.cpp
   65     for (const auto *Context : VisitedContexts)
tools/clang/unittests/Sema/ExternalSemaSourceTest.cpp
  110                              DeclContext *MemberContext, bool EnteringContext,
  114       DeclContext *DestContext = nullptr;
  152                              DeclContext *MemberContext, bool EnteringContext,
  156       DeclContext *DestContext = nullptr;
tools/clang/unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp
   85     if (isa<DeclContext>(D) || isa<TemplateDecl>(D))
tools/clang/unittests/Tooling/RecursiveASTVisitorTests/TraversalScope.cpp
   39   auto &Bar = *cast<DeclContext>(Foo).lookup(&Ctx.Idents.get("bar")).front();
tools/lldb/include/lldb/Symbol/ClangASTContext.h
  125   static void DumpDeclContextHiearchy(clang::DeclContext *decl_ctx);
  176   static clang::DeclContext *GetDeclContextForType(clang::QualType type);
  178   static clang::DeclContext *GetDeclContextForType(const CompilerType &type);
  182   static clang::DeclContext *GetTranslationUnitDecl(clang::ASTContext *ast);
  184   clang::DeclContext *GetTranslationUnitDecl() {
  204                        clang::DeclContext *decl_context = nullptr) {
  218         clang::DeclContext::lookup_result result =
  261   CompilerType CreateRecordType(clang::DeclContext *decl_ctx,
  285   CreateFunctionTemplateDecl(clang::DeclContext *decl_ctx,
  294   CreateClassTemplateDecl(clang::DeclContext *decl_ctx,
  302       clang::DeclContext *decl_ctx,
  310   static clang::DeclContext *
  313   static clang::DeclContext *
  327   CompilerType CreateObjCClass(const char *name, clang::DeclContext *decl_ctx,
  344   GetUniqueNamespaceDeclaration(const char *name, clang::DeclContext *decl_ctx,
  349                                 clang::DeclContext *decl_ctx,
  355   CreateFunctionDeclaration(clang::DeclContext *decl_ctx, const char *name,
  391   clang::ParmVarDecl *CreateParameterDeclaration(clang::DeclContext *decl_ctx,
  409                                      clang::DeclContext *decl_ctx,
  488   static clang::DeclContext *
  794   uint32_t CountDeclLevels(clang::DeclContext *frame_decl_ctx,
  795                            clang::DeclContext *child_decl_ctx,
  937       clang::DeclContext *decl_ctx, lldb::AccessType access_type,
  941   clang::BlockDecl *CreateBlockDeclaration(clang::DeclContext *ctx);
  944   CreateUsingDirectiveDeclaration(clang::DeclContext *decl_ctx,
  947   clang::UsingDecl *CreateUsingDeclaration(clang::DeclContext *current_decl_ctx,
  950   clang::VarDecl *CreateVariableDeclaration(clang::DeclContext *decl_context,
tools/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
   30       void *baton, const clang::DeclContext *DC, clang::DeclarationName Name,
   81   virtual void MaterializeVisibleDecls(const clang::DeclContext *decl_ctx) {}
   84       const clang::DeclContext *DC,
   89   FindExternalVisibleDeclsByName(const clang::DeclContext *decl_ctx,
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp
   21   clang::DeclContext *decl_ctx = llvm::dyn_cast<clang::DeclContext>(decl);
   21   clang::DeclContext *decl_ctx = llvm::dyn_cast<clang::DeclContext>(decl);
   43 ASTDumper::ASTDumper(clang::DeclContext *decl_ctx) {
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.h
   23   ASTDumper(clang::DeclContext *decl_ctx);
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
  200                                                 DeclContext *DC) {
  402 void ASTResultSynthesizer::RecordPersistentTypes(DeclContext *FunDeclCtx) {
  403   typedef DeclContext::specific_decl_iterator<TypeDecl> TypeDeclIterator;
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
  128   bool SynthesizeBodyResult(clang::CompoundStmt *Body, clang::DeclContext *DC);
  135   void RecordPersistentTypes(clang::DeclContext *FunDeclCtx);
tools/lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.h
   61   bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
   66   void completeVisibleDeclsMap(const clang::DeclContext *DC) override {
   84       const clang::DeclContext *DC,
  328   bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
  336   void completeVisibleDeclsMap(const clang::DeclContext *DC) override {
  343       const clang::DeclContext *DC,
  557               clang::DeclContext *MemberContext, bool EnteringContext,
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
  173     const DeclContext *decl_ctx, DeclarationName clang_decl_name) {
  311     DeclContext *decl_ctx = tag_decl->getDeclContext();
  518     const DeclContext *decl_context,
  611   const DeclContext *original_decl_context =
  612       dyn_cast<DeclContext>(original_decl);
 1174   const DeclContext *decl_ctx(context.m_decl_context);
 2136   clang::DeclContext *context = const_cast<DeclContext *>(m_decl_context);
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
   58   void MaterializeVisibleDecls(const clang::DeclContext *DC) { return; }
   84   bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
   99       const clang::DeclContext *DC,
  217     bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC,
  223         const clang::DeclContext *DC,
  443   const clang::DeclContext
  476                     clang::DeclarationName &name, const clang::DeclContext *dc)
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
 1113             clang::DeclContext *clang_decl_ctx =
 1258         clang::DeclContext *frame_decl_ctx =
 1317             clang::DeclContext *func_decl_ctx =
 1917         clang::DeclContext *src_decl_context =
tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
   32   bool FindExternalVisibleDeclsByName(const clang::DeclContext *decl_ctx,
   63       clang::DeclContext::lookup_result result =
  583     clang::DeclContext::lookup_result lookup_result =
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  200     clang::DeclContext *defn_decl_ctx = GetCachedClangDeclContextForDIE(die);
  209                                         clang::DeclContext *decl_ctx,
  378     clang::DeclContext *context =
  404       if (clang::DeclContext *decl_ctx =
  680         clang::DeclContext *defn_decl_ctx =
  781     clang::DeclContext *containing_decl_ctx =
  913               clang::DeclContext *spec_clang_decl_ctx =
  932               clang::DeclContext *abs_clang_decl_ctx =
 1481       clang::DeclContext *defn_decl_ctx =
 1493     clang::DeclContext *decl_ctx =
 2209   clang::DeclContext *clang_decl_ctx = GetClangDeclContextForDIE(die);
 2217   clang::DeclContext *clang_decl_ctx =
 2398         clang::DeclContext *containing_decl_ctx =
 3070     clang::DeclContext *containing_decl_ctx, const DWARFDIE &parent_die,
 3353       clang::DeclContext *decl_context =
 3368         clang::DeclContext *decl_context =
 3387         clang::DeclContext *decl_context =
 3408 clang::DeclContext *
 3411     clang::DeclContext *decl_ctx = GetCachedClangDeclContextForDIE(die);
 3499 clang::DeclContext *
 3521       clang::DeclContext *decl_context =
 3545       clang::DeclContext *containing_decl_ctx =
 3583 clang::DeclContext *DWARFASTParserClang::GetClangDeclContextContainingDIE(
 3593     clang::DeclContext *clang_decl_ctx =
 3601 clang::DeclContext *
 3611 void DWARFASTParserClang::LinkDeclContextToDIE(clang::DeclContext *decl_ctx,
 3743       clang::DeclContext *src_decl_ctx =
 3787           clang::DeclContext *src_decl_ctx =
 3842         clang::DeclContext *src_decl_ctx =
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
   77   typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *>
   79   typedef std::multimap<const clang::DeclContext *, const DWARFDIE>
   93   clang::DeclContext *GetDeclContextForBlock(const DWARFDIE &die);
  118   ParseChildParameters(clang::DeclContext *containing_decl_ctx,
  138   clang::DeclContext *GetClangDeclContextForDIE(const DWARFDIE &die);
  140   clang::DeclContext *GetClangDeclContextContainingDIE(const DWARFDIE &die,
  148   clang::DeclContext *GetCachedClangDeclContextForDIE(const DWARFDIE &die);
  150   void LinkDeclContextToDIE(clang::DeclContext *decl_ctx, const DWARFDIE &die);
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  214 std::pair<clang::DeclContext *, std::string>
  235   clang::DeclContext *context = m_clang.GetTranslationUnitDecl();
  438     clang::DeclContext *scope = GetParentDeclContext(id);
  485 clang::DeclContext *PdbAstBuilder::GetOrCreateDeclContextForUid(PdbSymUid uid) {
  500 std::pair<clang::DeclContext *, std::string>
  532 clang::DeclContext *
  576 clang::DeclContext *PdbAstBuilder::GetParentDeclContext(PdbSymUid uid) {
  770   clang::DeclContext *context = nullptr;
  808                                         clang::DeclContext &context) {
  818   clang::DeclContext *scope = GetParentDeclContext(block_id);
  832                                                   clang::DeclContext &scope) {
  853   clang::DeclContext *scope = GetOrCreateDeclContextForUid(scope_id);
  877   clang::DeclContext *scope = GetParentDeclContext(id);
  987   clang::DeclContext *parent = GetParentDeclContext(PdbSymUid(func_id));
 1101   clang::DeclContext *decl_context = nullptr;
 1165 static bool isTagDecl(clang::DeclContext &context) {
 1169 static bool isFunctionDecl(clang::DeclContext &context) {
 1173 static bool isBlockDecl(clang::DeclContext &context) {
 1198     clang::DeclContext *context = nullptr;
 1295 void PdbAstBuilder::ParseDeclsForSimpleContext(clang::DeclContext &context) {
 1314 void PdbAstBuilder::ParseDeclsForContext(clang::DeclContext &context) {
 1348 PdbAstBuilder::ToCompilerDeclContext(clang::DeclContext &context) {
 1356 clang::DeclContext *
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
   60   clang::DeclContext *GetOrCreateDeclContextForUid(PdbSymUid uid);
   61   clang::DeclContext *GetParentDeclContext(PdbSymUid uid);
   69   void ParseDeclsForContext(clang::DeclContext &context);
   79   CompilerDeclContext ToCompilerDeclContext(clang::DeclContext &context);
   81   clang::DeclContext *FromCompilerDeclContext(CompilerDeclContext context);
  113                                      clang::DeclContext &scope);
  114   clang::DeclContext *
  118                                                  clang::DeclContext &context);
  121   void ParseDeclsForSimpleContext(clang::DeclContext &context);
  125   std::pair<clang::DeclContext *, std::string>
  127   std::pair<clang::DeclContext *, std::string>
tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
  890   clang::DeclContext *context = m_ast->FromCompilerDeclContext(decl_ctx);
 1519   clang::DeclContext *context =
 1529   clang::DeclContext *context = m_ast->GetParentDeclContext(PdbSymUid(uid));
tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
  330                          const clang::DeclContext &decl_context,
  334   clang::DeclContext::lookup_result result = decl_context.lookup(decl_name);
  974 clang::DeclContext *
  977     clang::DeclContext *result =
  994   clang::DeclContext *result =
 1003 clang::DeclContext *PDBASTParser::GetDeclContextContainingSymbol(
 1035   clang::DeclContext *curr_context = m_ast.GetTranslationUnitDecl();
 1042         if (clang::DeclContext *child_context =
 1078     const clang::DeclContext *decl_context) {
 1102 PDBASTParser::FindNamespaceDecl(const clang::DeclContext *parent,
tools/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.h
   53   clang::DeclContext *
   55   clang::DeclContext *
   58   void ParseDeclsForDeclContext(const clang::DeclContext *decl_context);
   60   clang::NamespaceDecl *FindNamespaceDecl(const clang::DeclContext *parent,
   72   typedef llvm::DenseMap<clang::DeclContext *, NamespacesSet>
   74   typedef llvm::DenseMap<clang::DeclContext *, lldb::user_id_t>
tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
 1697   clang::DeclContext *decl_context = nullptr;
tools/lldb/source/Symbol/ClangASTContext.cpp
 1265 clang::DeclContext *
 1351     DeclContext *decl_ctx, AccessType access_type, const char *name, int kind,
 1436   DeclContext *const decl_context =
 1487     clang::DeclContext *decl_ctx, clang::FunctionDecl *func_decl,
 1520     DeclContext *decl_ctx, lldb::AccessType access_type, const char *class_name,
 1531   clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name);
 1610     DeclContext *decl_ctx, ClassTemplateDecl *class_template_decl, int kind,
 1753                                               DeclContext *decl_ctx,
 1805     const char *name, DeclContext *decl_ctx, bool is_inline) {
 1815     clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name);
 1865     clang::ASTContext *ast, const char *name, clang::DeclContext *decl_ctx,
 1875 ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) {
 1885 clang::DeclContext *FindLCABetweenDecls(clang::DeclContext *left,
 1885 clang::DeclContext *FindLCABetweenDecls(clang::DeclContext *left,
 1886                                         clang::DeclContext *right,
 1887                                         clang::DeclContext *root) {
 1891   std::set<clang::DeclContext *> path_left;
 1892   for (clang::DeclContext *d = left; d != nullptr; d = d->getParent())
 1895   for (clang::DeclContext *d = right; d != nullptr; d = d->getParent())
 1903     clang::DeclContext *decl_ctx, clang::NamespaceDecl *ns_decl) {
 1919 ClangASTContext::CreateUsingDeclaration(clang::DeclContext *current_decl_ctx,
 1936     clang::DeclContext *decl_context, const char *name, clang::QualType type) {
 2054     DeclContext *decl_ctx, const char *name,
 2124     clang::DeclContext *decl_ctx, const char *name,
 2228 ClangASTContext::CreateEnumerationType(const char *name, DeclContext *decl_ctx,
 2322 void ClangASTContext::DumpDeclContextHiearchy(clang::DeclContext *decl_ctx) {
 2368       clang::DeclContext *lhs_decl_ctx = lhs_decl->getDeclContext();
 2369       clang::DeclContext *rhs_decl_ctx = rhs_decl->getDeclContext();
 2504 clang::DeclContext *
 2506   return llvm::dyn_cast<clang::DeclContext>(cxx_method_decl);
 2509 clang::DeclContext *
 2511   return llvm::dyn_cast<clang::DeclContext>(objc_method_decl);
 2550 clang::DeclContext *
 2555 clang::DeclContext *
 2953   clang::DeclContext *decl_ctx = ClangASTContext::GetASTContext(getASTContext())
 4778     clang::DeclContext *decl_ctx =
 4887     clang::DeclContext *decl_ctx =
 9814     clang::DeclContext *decl_ctx, lldb::AccessType access_type,
 9976     DeclContext *root_decl_ctx = (DeclContext *)opaque_decl_ctx;
 9977     std::set<DeclContext *> searched;
 9978     std::multimap<DeclContext *, DeclContext *> search_queue;
 9978     std::multimap<DeclContext *, DeclContext *> search_queue;
 9981     for (clang::DeclContext *decl_context = root_decl_ctx;
 9998             clang::DeclContext *from = ud->getCommonAncestor();
10069 uint32_t ClangASTContext::CountDeclLevels(clang::DeclContext *frame_decl_ctx,
10070                                           clang::DeclContext *child_decl_ctx,
10074     std::set<DeclContext *> searched;
10075     std::multimap<DeclContext *, DeclContext *> search_queue;
10075     std::multimap<DeclContext *, DeclContext *> search_queue;
10079     clang::DeclContext *parent_decl_ctx = child_decl_ctx->getParent();
10083     for (clang::DeclContext *decl_ctx = frame_decl_ctx; decl_ctx != nullptr;
10111             clang::DeclContext *ns = ud->getNominatedNamespace();
10115             clang::DeclContext *from = ud->getCommonAncestor();
10184     clang::DeclContext *decl_ctx = (clang::DeclContext *)opaque_decl_ctx;
10223   auto *decl_ctx = (clang::DeclContext *)opaque_decl_ctx;
10224   auto *other = (clang::DeclContext *)other_opaque_decl_ctx;
10238 clang::DeclContext *
tools/lldb/source/Symbol/ClangASTImporter.cpp
  150     clang::DeclContext *decl_context;
  151     clang::DeclContext *lexical_decl_context;
  168       clang::Decl *decl, clang::DeclContext *base,
  171     for (DeclContext *decl_ctx = (decl->*contextFromDecl)(); decl_ctx;
  182                                clang::DeclContext *base = nullptr) {
  187                               &clang::DeclContext::getParent) ||
  189                               &clang::DeclContext::getLexicalParent)) {
  193       base = clang::dyn_cast<clang::DeclContext>(decl);
  200     if (clang::DeclContext *context =
  201             clang::dyn_cast<clang::DeclContext>(decl)) {
  232     for (DeclContext *decl_context = decl->getLexicalDeclContext();
  234       DeclContext *redecl_context = decl_context->getRedeclContext();
  865   const DeclContext *parent_context = decl->getDeclContext();
tools/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp
   46     const clang::DeclContext *decl_ctx,
   90     const clang::DeclContext *decl_ctx,
tools/lldb/source/Symbol/CxxModuleHandler.cpp
   47 static void makeScopes(Sema &sema, DeclContext *ctxt,
   65 emulateLookupInCtxt(Sema &sema, llvm::StringRef name, DeclContext *ctxt) {
   96   MissingDeclContext(DeclContext *context, std::string error)
   99   DeclContext *m_context;
  117 static llvm::Expected<DeclContext *>
  118 getEqualLocalDeclContext(Sema &sema, DeclContext *foreign_ctxt) {
  129   llvm::Expected<DeclContext *> parent =
  141       if (DeclContext *DC = llvm::dyn_cast<DeclContext>(named_decl))
  141       if (DeclContext *DC = llvm::dyn_cast<DeclContext>(named_decl))
  201   llvm::Expected<DeclContext *> to_context =
tools/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
   37   std::vector<const clang::DeclContext *> GetDeclContextToDIEMapKeys() {
   38     std::vector<const clang::DeclContext *> keys;
   58   std::vector<clang::DeclContext *> decl_ctxs = {
usr/include/c++/7.4.0/type_traits
 1554     { typedef _Tp     type; };
 1558     { typedef _Tp     type; };
 1983     { typedef _Up     type; };
utils/unittest/googletest/include/gtest/gtest-printers.h
  407                     T* p, ::std::ostream* os) {
  416     if (IsTrue(ImplicitlyConvertible<T*, const void*>::value)) {