clang  5.0.0
Namespaces | Functions
USRLocFinder.cpp File Reference

Methods for finding all instances of a USR. More...

#include "clang/Tooling/Refactoring/Rename/USRLocFinder.h"
#include "clang/AST/ASTContext.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/Core/Lookup.h"
#include "clang/Tooling/Refactoring/RecursiveSymbolVisitor.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>
Include dependency graph for USRLocFinder.cpp:

Go to the source code of this file.

Namespaces

 clang
 /file This file defines classes for searching and anlyzing source code clones.
 
 clang::tooling
 

Functions

std::vector< SourceLocation > clang::tooling::getLocationsOfUSRs (const std::vector< std::string > &USRs, StringRef PrevName, Decl *Decl)
 
std::vector
< tooling::AtomicChange > 
clang::tooling::createRenameAtomicChanges (llvm::ArrayRef< std::string > USRs, llvm::StringRef NewName, Decl *TranslationUnitDecl)
 Create atomic changes for renaming all symbol references which are identified by the USRs set to a given new name. More...
 

Detailed Description

Methods for finding all instances of a USR.

Our strategy is very simple; we just compare the USR at every relevant AST node with the one provided.

Definition in file USRLocFinder.cpp.

Variable Documentation

SourceLocation Begin
ASTContext& Context

Definition at line 96 of file USRLocFinder.cpp.

SourceLocation End

Definition at line 156 of file USRLocFinder.cpp.

Referenced by clang::tooling::createRenameAtomicChanges().

const NamedDecl* FromDecl

Definition at line 158 of file USRLocFinder.cpp.

Referenced by clang::tooling::replaceNestedName().

std::vector<clang::SourceLocation> LocationsFound

Definition at line 95 of file USRLocFinder.cpp.

const std::string PrevName

Definition at line 94 of file USRLocFinder.cpp.

std::vector<RenameInfo> RenameInfos

Definition at line 386 of file USRLocFinder.cpp.

const NestedNameSpecifier* Specifier
std::vector<const UsingDecl *> UsingDecls

Definition at line 389 of file USRLocFinder.cpp.

const std::set<std::string> USRSet

Definition at line 93 of file USRLocFinder.cpp.