Home
last modified time | relevance | path

Searched refs:getLexicalDeclContext (Results 1 – 25 of 45) sorted by relevance

12

/llvm-project-15.0.7/clang/lib/Index/
H A DIndexDecl.cpp94 Parent->getLexicalDeclContext(), in handleDeclarator()
293 handleTemplateArgumentLoc(Arg, D, D->getLexicalDeclContext()); in VisitFunctionDecl()
525 if (MD->getLexicalDeclContext() == D->getLexicalDeclContext()) in VisitObjCPropertyDecl()
528 if (MD->getLexicalDeclContext() == D->getLexicalDeclContext()) in VisitObjCPropertyDecl()
602 D->getLexicalDeclContext()); in VisitNamespaceAliasDecl()
612 D->getLexicalDeclContext()); in VisitUsingDecl()
638 D->getLexicalDeclContext(), in VisitUsingDirectiveDecl()
647 D->getLexicalDeclContext()); in VisitUnresolvedUsingValueDecl()
678 D->getLexicalDeclContext()); in VisitClassTemplateSpecializationDecl()
713 TP->getLexicalDeclContext()); in indexTemplateParameters()
[all …]
H A DIndexTypeSourceInfo.cpp265 DC = Parent->getLexicalDeclContext(); in indexTypeLoc()
279 DC = Parent->getLexicalDeclContext(); in indexNestedNameSpecifierLoc()
H A DIndexBody.cpp501 DC = Parent->getLexicalDeclContext(); in indexBody()
/llvm-project-15.0.7/clang/lib/Serialization/
H A DASTCommon.cpp457 D->getLexicalDeclContext()->isDependentContext() && !isa<TagDecl>(D)) { in needsAnonymousDeclarationNumber()
471 if (D->getLexicalDeclContext()->isFunctionOrMethod()) { in needsAnonymousDeclarationNumber()
483 if (!isa<RecordDecl, ObjCInterfaceDecl>(D->getLexicalDeclContext())) in needsAnonymousDeclarationNumber()
H A DASTWriterDecl.cpp301 if (D->getDeclContext() != D->getLexicalDeclContext()) in VisitDecl()
302 Record.AddDeclRef(cast_or_null<Decl>(D->getLexicalDeclContext())); in VisitDecl()
390 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitTypedefDecl()
455 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitEnumDecl()
492 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitRecordDecl()
802 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitObjCIvarDecl()
936 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitFieldDecl()
1066 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitVarDecl()
1114 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitParmVarDecl()
1406 if (D->getDeclContext() == D->getLexicalDeclContext() && in VisitCXXMethodDecl()
/llvm-project-15.0.7/clang/lib/AST/
H A DDeclBase.cpp260 auto *DC = getFriendObjectKind() ? getLexicalDeclContext() : getDeclContext(); in isTemplated()
282 getFriendObjectKind() ? getLexicalDeclContext() : getDeclContext(); in getTemplateDepth()
287 for (const DeclContext *DC = LexicalParent ? getLexicalDeclContext() in getParentFunctionOrMethod()
333 if (DC == getLexicalDeclContext()) in setLexicalDeclContext()
369 const DeclContext *LDC = getLexicalDeclContext(); in isInLocalScopeForInstantiation()
1001 const DeclContext *DC = getLexicalDeclContext(); in isInExportDeclContext()
1447 return (D->getLexicalDeclContext() == this && in containsDecl()
1497 assert(D->getLexicalDeclContext() == this && in removeDecl()
1552 assert(D->getLexicalDeclContext() == this && in addHiddenDecl()
1885 ((!Recoverable || D->getDeclContext() != D->getLexicalDeclContext()) && in makeDeclVisibleInContextWithFlags()
H A DDecl.cpp102 return !getLexicalDeclContext()->Equals(getDeclContext()); in isOutOfLine()
2158 return getLexicalDeclContext()->isExternCContext(); in isInExternCContext()
2162 return getLexicalDeclContext()->isExternCXXContext(); in isInExternCXXContext()
3291 return getLexicalDeclContext()->isExternCContext(); in isInExternCContext()
3295 return getLexicalDeclContext()->isExternCXXContext(); in isInExternCXXContext()
3528 if (!Redecl->getLexicalDeclContext()->isTranslationUnit()) in RedeclForcesDefC99()
H A DASTImporter.cpp317 ToD->getLexicalDeclContext()->addDeclInternal(ToD); in addDeclToContexts()
322 DeclContext *FromLexicalDC = FromD->getLexicalDeclContext(); in addDeclToContexts()
324 DeclContext *ToLexicalDC = ToD->getLexicalDeclContext(); in addDeclToContexts()
1946 assert(ToDC == ToD->getLexicalDeclContext() && ToDC->containsDecl(ToD)); in ImportDeclContext()
1967 if (FromD->getDeclContext() != FromD->getLexicalDeclContext()) { in ImportDeclContext()
1969 FromD->getLexicalDeclContext()); in ImportDeclContext()
2499 cast<Decl>(D->getLexicalDeclContext()))); in VisitTypedefNameDecl()
3271 assert(RD->getLexicalDeclContext() == RD->getDeclContext()); in hasTypeDeclaredInsideFunction()
3297 assert(TD->getLexicalDeclContext() == TD->getDeclContext()); in hasAutoReturnTypeDeclaredInside()
3408 if (D->getLexicalDeclContext() == D->getDeclContext()) { in VisitFunctionDecl()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/
H A DASTTests.cpp469 D->getLexicalDeclContext(), D->getBeginLoc(), in TEST()
474 D->getLexicalDeclContext(), TargetDecl, in TEST()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cert/
H A DDontModifyStdNamespaceCheck.cpp111 D = dyn_cast_or_null<Decl>(D->getLexicalDeclContext()); in getTopLevelLexicalNamespaceDecl()
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Extract/
H A DExtract.cpp51 while (const auto *RD = dyn_cast<CXXRecordDecl>(D->getLexicalDeclContext())) in computeFunctionExtractionLocation()
/llvm-project-15.0.7/lldb/source/Plugins/ExpressionParser/Clang/
H A DCxxModuleHandler.cpp286 new_class_template->getLexicalDeclContext()); in tryInstantiateStdTemplate()
H A DClangASTImporter.cpp120 m_backups[decl] = {decl->getDeclContext(), decl->getLexicalDeclContext()}; in OverrideOne()
147 !ChainPassesThrough(decl, base, &clang::Decl::getLexicalDeclContext, in GetEscapedChild()
190 for (DeclContext *decl_context = decl->getLexicalDeclContext(); in OverrideAllDeclsFromContainingFunction()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DDeclBase.h872 DeclContext *getLexicalDeclContext() { in getLexicalDeclContext() function
877 const DeclContext *getLexicalDeclContext() const { in getLexicalDeclContext() function
878 return const_cast<Decl*>(this)->getLexicalDeclContext(); in getLexicalDeclContext()
1921 return cast<Decl>(this)->getLexicalDeclContext();
H A DDecl.h1171 if (const DeclContext *DC = getLexicalDeclContext()) in isLocalVarDecl()
1185 const DeclContext *DC = getLexicalDeclContext()->getRedeclContext(); in isFunctionOrMethodVarDecl()
1262 if (getLexicalDeclContext()->getRedeclContext()->isFileContext()) in isFileVarDecl()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaTemplateInstantiateDecl.cpp53 !OldDecl->getLexicalDeclContext()->isDependentContext()) && in SubstQualifier()
58 ? NewDecl->getLexicalDeclContext() in SubstQualifier()
865 D->getLexicalDeclContext() != Result->getLexicalDeclContext()) in getPreviousDeclForInstantiation()
1694 Inst->setLexicalDeclContext(D->getLexicalDeclContext()); in VisitClassTemplateDecl()
1695 RecordInst->setLexicalDeclContext(D->getLexicalDeclContext()); in VisitClassTemplateDecl()
1777 Inst->setLexicalDeclContext(D->getLexicalDeclContext()); in VisitVarTemplateDecl()
1778 VarInst->setLexicalDeclContext(D->getLexicalDeclContext()); in VisitVarTemplateDecl()
2559 Method->setLexicalDeclContext(D->getLexicalDeclContext()); in VisitCXXMethodDecl()
5252 NewVar->getLexicalDeclContext()->addHiddenDecl(NewVar); in BuildVariableInstantiation()
5560 Var->getLexicalDeclContext()->isRecord()) { in InstantiateVariableDefinition()
[all …]
H A DSemaAccess.cpp128 DC = Function->getLexicalDeclContext(); in EffectiveContext()
1490 DC = D->getLexicalDeclContext(); in HandleDelayedAccessCheck()
1958 = dyn_cast<ObjCImplDecl>(FD->getLexicalDeclContext())) { in IsSimplyAccessible()
H A DSemaDecl.cpp1671 if (!New->getLexicalDeclContext() in CheckRedeclarationExported()
1674 !Old->getLexicalDeclContext() in CheckRedeclarationExported()
1864 D->getLexicalDeclContext()->isDependentContext()) in ShouldWarnIfUnusedFileScopedDecl()
2576 ED->getLexicalDeclContext()->removeDecl(ED); in MergeTypedefNameDecl()
3515 auto *LexDC = NewD->getLexicalDeclContext(); in adjustDeclContextForDeclaratorDecl()
4424 OldVD->getLexicalDeclContext() == NewVD->getLexicalDeclContext(); in mergeTypeWithPrevious()
4592 !(Old->getLexicalDeclContext()->isRecord() && in MergeVarDecl()
4593 !New->getLexicalDeclContext()->isRecord())) { in MergeVarDecl()
9902 DeclContext *TagDC = TD->getLexicalDeclContext(); in ActOnFunctionDeclarator()
10617 if (!D->getLexicalDeclContext()->isDependentContext()) in shouldLinkDependentDeclWithPrevious()
[all …]
H A DSemaLookup.cpp356 DeclContext *DC = D->getLexicalDeclContext(); in getContextForScopeMatching()
1548 DeclContext *Context = Entity->getLexicalDeclContext(); in getDefiningModule()
1748 return D->getLexicalDeclContext()->isFileContext(); in hasAcceptableMemberSpecialization()
1797 DeclContext *DC = D->getLexicalDeclContext(); in isAcceptableSlow()
3906 auto *RD = cast<CXXRecordDecl>(D->getLexicalDeclContext()); in ArgumentDependentLookup()
H A DSemaModule.cpp480 for (auto *DC = D->getLexicalDeclContext(); DC; DC = DC->getLexicalParent()) in getEnclosingExportDecl()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DModuleBuilder.cpp226 if (!D->getLexicalDeclContext()->isDependentContext()) in HandleInlineFunctionDefinition()
/llvm-project-15.0.7/clang/unittests/AST/
H A DASTImporterTest.cpp2227 EXPECT_NE(ToBFInClass->getLexicalDeclContext(), in TEST_P()
2228 ToBFOutOfClass->getLexicalDeclContext()); in TEST_P()
2230 EXPECT_EQ(ToBFOutOfClass->getLexicalDeclContext(), ToTU); in TEST_P()
2294 EXPECT_NE(ToBFInClass->getLexicalDeclContext(), in TEST_P()
2295 ToBFOutOfClass->getLexicalDeclContext()); in TEST_P()
2297 EXPECT_EQ(ToBFOutOfClass->getLexicalDeclContext(), ToTU); in TEST_P()
2300 EXPECT_NE(ToDFInClass->getLexicalDeclContext(), in TEST_P()
2301 ToDFOutOfClass->getLexicalDeclContext()); in TEST_P()
2303 EXPECT_EQ(ToDFOutOfClass->getLexicalDeclContext(), ToTU); in TEST_P()
3977 ASSERT_EQ(FromRecordOfFriend->getLexicalDeclContext(), in TEST_P()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DDefineInline.cpp145 auto *TargetContext = Target->getLexicalDeclContext(); in qualifyAllDecls()
H A DExtractFunction.cpp764 ExtZone.EnclosingFunction->getLexicalDeclContext(); in getExtractedFunction()
/llvm-project-15.0.7/clang/tools/libclang/
H A DCIndex.cpp303 for (DeclContext *DeclDC = D->getLexicalDeclContext(); DeclDC; in isInLexicalContext()
388 ? (*DIt)->getLexicalDeclContext() in visitDeclsFromFileRegion()
389 : (*(DIt - 1))->getLexicalDeclContext(); in visitDeclsFromFileRegion()
402 DC = D->getLexicalDeclContext(); in visitDeclsFromFileRegion()
636 if (D->getLexicalDeclContext() != DC) in VisitDeclContext()
1056 if (!SubDecl || SubDecl->getLexicalDeclContext() != D || in VisitObjCContainerDecl()
1144 if (MD->isPropertyAccessor() && MD->getLexicalDeclContext() == CDecl) in VisitObjCPropertyDecl()
1149 if (MD->isPropertyAccessor() && MD->getLexicalDeclContext() == CDecl) in VisitObjCPropertyDecl()
8483 const DeclContext *DC = D->getLexicalDeclContext(); in clang_getCursorLexicalParent()

12