Lines Matching refs:RenameDecl
176 bool isExcluded(const NamedDecl &RenameDecl) { in isExcluded() argument
177 if (isProtoFile(RenameDecl.getLocation(), in isExcluded()
178 RenameDecl.getASTContext().getSourceManager())) in isExcluded()
185 return StdSymbols->count(printQualifiedName(RenameDecl)); in isExcluded()
201 llvm::Optional<ReasonToReject> renameable(const NamedDecl &RenameDecl, in renameable() argument
207 if (llvm::isa<NamespaceDecl>(&RenameDecl)) in renameable()
209 if (const auto *FD = llvm::dyn_cast<FunctionDecl>(&RenameDecl)) { in renameable()
214 if (RenameDecl.getParentFunctionOrMethod()) in renameable()
217 if (isExcluded(RenameDecl)) in renameable()
221 auto &ASTCtx = RenameDecl.getASTContext(); in renameable()
224 isInsideMainFile(RenameDecl.getBeginLoc(), ASTCtx.getSourceManager()); in renameable()
233 RenameDecl, RenameDecl.getASTContext(), SymbolCollector::Options(), in renameable()
250 auto OtherFile = getOtherRefFile(RenameDecl, MainFilePath, *Index); in renameable()
265 if (const auto *S = llvm::dyn_cast<CXXMethodDecl>(&RenameDecl)) { in renameable()
393 llvm::Optional<InvalidName> checkName(const NamedDecl &RenameDecl, in checkName() argument
398 auto &ASTCtx = RenameDecl.getASTContext(); in checkName()
405 if (RenameDecl.getKind() != Decl::Function) { in checkName()
406 if (auto *Conflict = lookupSiblingWithName(ASTCtx, RenameDecl, NewName)) in checkName()
419 renameWithinFile(ParsedAST &AST, const NamedDecl &RenameDecl, in renameWithinFile() argument
425 for (SourceLocation Loc : findOccurrencesWithinFile(AST, RenameDecl)) { in renameWithinFile()
462 findOccurrencesOutsideFile(const NamedDecl &RenameDecl, in findOccurrencesOutsideFile() argument
467 RQuest.IDs.insert(getSymbolID(&RenameDecl)); in findOccurrencesOutsideFile()
487 RenameDecl.getQualifiedNameAsString()); in findOccurrencesOutsideFile()
513 const NamedDecl &RenameDecl, llvm::StringRef MainFilePath, in renameOutsideFile() argument
517 auto AffectedFiles = findOccurrencesOutsideFile(RenameDecl, MainFilePath, in renameOutsideFile()
531 adjustRenameRanges(*AffectedFileCode, RenameDecl.getNameAsString(), in renameOutsideFile()
533 RenameDecl.getASTContext().getLangOpts()); in renameOutsideFile()
639 const auto &RenameDecl = **DeclsUnderCursor.begin(); in rename() local
640 const auto *ID = RenameDecl.getIdentifier(); in rename()
645 auto Invalid = checkName(RenameDecl, RInputs.NewName); in rename()
649 auto Reject = renameable(RenameDecl, RInputs.MainFilePath, RInputs.Index, in rename()
663 auto MainFileRenameEdit = renameWithinFile(AST, RenameDecl, RInputs.NewName); in rename()
675 if (!Opts.AllowCrossFile || RenameDecl.getParentFunctionOrMethod()) { in rename()
689 RenameDecl, RInputs.MainFilePath, RInputs.NewName, *RInputs.Index, in rename()