#include "clang/Tooling/Refactoring/Rename/USRLocFinder.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Refactoring/Lookup.h"
#include "clang/Tooling/Refactoring/RecursiveSymbolVisitor.h"
#include "clang/Tooling/Refactoring/Rename/SymbolName.h"
#include "clang/Tooling/Refactoring/Rename/USRFinder.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include <cstddef>
#include <set>
#include <string>
#include <vector>
usingnamespacellvm;
namespace clang {
namespace tooling {
namespace {
bool IsValidEditLoc(const clang::SourceManager& SM, clang::SourceLocation Loc) { … }
class USRLocFindingASTVisitor
: public RecursiveSymbolVisitor<USRLocFindingASTVisitor> { … };
SourceLocation StartLocationForType(TypeLoc TL) { … }
SourceLocation EndLocationForType(TypeLoc TL) { … }
NestedNameSpecifier *GetNestedNameForType(TypeLoc TL) { … }
class RenameLocFinder : public RecursiveASTVisitor<RenameLocFinder> { … };
}
SymbolOccurrences getOccurrencesOfUSRs(ArrayRef<std::string> USRs,
StringRef PrevName, Decl *Decl) { … }
std::vector<tooling::AtomicChange>
createRenameAtomicChanges(llvm::ArrayRef<std::string> USRs,
llvm::StringRef NewName, Decl *TranslationUnitDecl) { … }
}
}