Lines Matching refs:ExtZone
308 ExtractionZone ExtZone; in findExtractionZone() local
309 ExtZone.Parent = getParentOfRootStmts(CommonAnc); in findExtractionZone()
310 if (!ExtZone.Parent || ExtZone.Parent->Children.empty()) in findExtractionZone()
312 ExtZone.EnclosingFunction = findEnclosingFunction(ExtZone.Parent); in findExtractionZone()
313 if (!ExtZone.EnclosingFunction) in findExtractionZone()
317 if (ExtZone.Parent->Children.size() == 1 && in findExtractionZone()
318 !validSingleChild(ExtZone.getLastRootStmt(), ExtZone.EnclosingFunction)) in findExtractionZone()
321 computeEnclosingFuncRange(ExtZone.EnclosingFunction, SM, LangOpts)) in findExtractionZone()
322 ExtZone.EnclosingFuncRange = *FuncRange; in findExtractionZone()
323 if (auto ZoneRange = findZoneRange(ExtZone.Parent, SM, LangOpts)) in findExtractionZone()
324 ExtZone.ZoneRange = *ZoneRange; in findExtractionZone()
325 if (ExtZone.EnclosingFuncRange.isInvalid() || ExtZone.ZoneRange.isInvalid()) in findExtractionZone()
328 for (const Node *Child : ExtZone.Parent->Children) in findExtractionZone()
329 ExtZone.RootStmts.insert(Child->ASTNode.get<Stmt>()); in findExtractionZone()
331 return ExtZone; in findExtractionZone()
565 CapturedZoneInfo captureZoneInfo(const ExtractionZone &ExtZone) { in captureZoneInfo() argument
572 ExtractionZoneVisitor(const ExtractionZone &ExtZone) : ExtZone(ExtZone) { in captureZoneInfo() argument
573 TraverseDecl(const_cast<FunctionDecl *>(ExtZone.EnclosingFunction)); in captureZoneInfo()
579 bool IsRootStmt = ExtZone.isRootStmt(const_cast<const Stmt *>(S)); in captureZoneInfo()
646 const ExtractionZone &ExtZone; in captureZoneInfo() member in clang::clangd::__anonb5a792ef0111::captureZoneInfo::ExtractionZoneVisitor
653 ExtractionZoneVisitor Visitor(ExtZone); in captureZoneInfo()
655 Result.AlwaysReturns = alwaysReturns(ExtZone); in captureZoneInfo()
705 getSemicolonPolicy(ExtractionZone &ExtZone, const SourceManager &SM, in getSemicolonPolicy() argument
708 SourceRange FuncBodyRange = {ExtZone.ZoneRange.getBegin(), in getSemicolonPolicy()
709 ExtZone.ZoneRange.getEnd().getLocWithOffset(-1)}; in getSemicolonPolicy()
711 ExtZone.getLastRootStmt()->ASTNode.get<Stmt>(), FuncBodyRange, SM, in getSemicolonPolicy()
714 ExtZone.ZoneRange.setEnd(FuncBodyRange.getEnd().getLocWithOffset(1)); in getSemicolonPolicy()
752 llvm::Expected<NewFunction> getExtractedFunction(ExtractionZone &ExtZone, in getExtractedFunction() argument
755 CapturedZoneInfo CapturedInfo = captureZoneInfo(ExtZone); in getExtractedFunction()
760 NewFunction ExtractedFunc(getSemicolonPolicy(ExtZone, SM, LangOpts), in getExtractedFunction()
764 ExtZone.EnclosingFunction->getLexicalDeclContext(); in getExtractedFunction()
765 ExtractedFunc.SemanticDC = ExtZone.EnclosingFunction->getDeclContext(); in getExtractedFunction()
766 ExtractedFunc.DefinitionQualifier = ExtZone.EnclosingFunction->getQualifier(); in getExtractedFunction()
767 ExtractedFunc.Constexpr = ExtZone.EnclosingFunction->getConstexprKind(); in getExtractedFunction()
770 llvm::dyn_cast<CXXMethodDecl>(ExtZone.EnclosingFunction)) in getExtractedFunction()
773 if (ExtZone.EnclosingFunction->isOutOfLine()) { in getExtractedFunction()
777 ExtZone.EnclosingFunction->getCanonicalDecl(); in getExtractedFunction()
786 ExtractedFunc.BodyRange = ExtZone.ZoneRange; in getExtractedFunction()
787 ExtractedFunc.DefinitionPoint = ExtZone.getInsertionPoint(); in getExtractedFunction()
791 !generateReturnProperties(ExtractedFunc, *ExtZone.EnclosingFunction, in getExtractedFunction()
808 ExtractionZone ExtZone; member in clang::clangd::__anonb5a792ef0111::ExtractFunction
843 bool hasReturnStmt(const ExtractionZone &ExtZone) { in hasReturnStmt() argument
855 for (const Stmt *RootStmt : ExtZone.RootStmts) { in hasReturnStmt()
878 ExtZone = std::move(*MaybeExtZone); in prepare()
885 auto ExtractedFunc = getExtractedFunction(ExtZone, SM, LangOpts); in apply()