clang  6.0.0svn
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/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>
Include dependency graph for USRLocFinder.cpp:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::tooling
 

Functions

SymbolOccurrences clang::tooling::getOccurrencesOfUSRs (ArrayRef< std::string > USRs, StringRef PrevName, Decl *Decl)
 Finds the symbol occurrences for the symbol that's identified by the given USR set. More...
 
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

◆ Begin

SourceLocation Begin

Definition at line 154 of file USRLocFinder.cpp.

Referenced by clang::PreprocessingRecord::addPreprocessedEntity(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::BumpVector< CFGElement >::begin(), clang::BumpVector< CFGElement >::capacity(), clang::Decl::classofKind(), clang::BumpVector< CFGElement >::clear(), clang::UnresolvedLookupExpr::Create(), Diag(), clang::CodeGen::CodeGenFunction::EmitMSVCBuiltinExpr(), findLinesForRange(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::ConstantAggregateBuilderBase::finishArray(), clang::CodeGen::ConstantAggregateBuilderBase::finishStruct(), clang::ASTContext::getOverloadedTemplateName(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::UsingDecl::getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), clang::comments::Lexer::getSpelling(), clang::OverloadExpr::getTrailingASTTemplateKWAndArgsInfo(), clang::ASTContext::getUnqualifiedObjCPointerType(), hasOnlyNonStaticMemberFunctions(), hasSuperInitCall(), highlightRange(), clang::OverloadExpr::initializeResults(), clang::PreprocessingRecord::isEntityInFileID(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), clang::tooling::Replacements::operator==(), clang::OverloadExpr::OverloadExpr(), ParseAlignPragma(), clang::Decl::printGroup(), clang::BumpVector< CFGElement >::size(), clang::CodeGen::ConstantAggregateBuilderBase::size(), and clang::vfs::YAMLVFSWriter::write().

◆ End

SourceLocation End

Definition at line 156 of file USRLocFinder.cpp.

Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), checkIfClauses(), clang::Preprocessor::checkModuleIsAvailable(), collectAllSubModulesWithUmbrellaHeader(), collectModuleHeaderIncludes(), clang::UnresolvedLookupExpr::Create(), diagnoseObjCLiteralComparison(), diagnoseRedundantReturnTypeQualifiers(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::BumpVector< CFGElement >::empty(), clang::BumpVector< CFGElement >::end(), clang::RopePieceBTree::erase(), clang::RewriteRope::erase(), evenFlexibleArraySize(), FindConflictEnd(), clang::format::FindCursorIndex(), findLinesForRange(), findPlaceholderEnd(), findVCToolChainViaEnvironment(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), GenerateMinimalPathDiagnostic(), clang::Designator::getArrayRange(), clang::Lexer::getAsCharRange(), clang::driver::tools::Clang::getBaseInputStem(), clang::Preprocessor::GetCurDirLookup(), clang::ento::PathDiagnosticLocationPair::getEnd(), clang::format::getLengthToMatchingParen(), clang::CXXConstructExpr::getLocEnd(), clang::CXXPseudoDestructorExpr::getLocEnd(), clang::InitListExpr::getLocEnd(), clang::driver::Driver::GetNamedOutputPath(), clang::NumericLiteralParser::getRadix(), getRangeForType(), clang::tooling::getRangeSize(), clang::TemplateTemplateParmDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), clang::OverloadExpr::getTrailingASTTemplateKWAndArgsInfo(), clang::NestedNameSpecifierLoc::getTypeLoc(), clang::ASTContext::getUnqualifiedObjCPointerType(), clang::Preprocessor::HandlePragmaIncludeAlias(), clang::Preprocessor::HandlePragmaModuleBuild(), hasOnlyNonStaticMemberFunctions(), hasSuperInitCall(), highlightRange(), clang::vfs::recursive_directory_iterator::increment(), clang::format::WhitespaceManager::Change::indentAndNestingLevel(), clang::PreprocessingRecord::isEntityInFileID(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), llvm::yaml::MappingTraits< clang::tooling::AtomicChange >::mapping(), clang::tooling::Replacements::operator==(), ParseAlignPragma(), clang::BumpVector< CFGElement >::pop_back(), clang::Decl::printGroup(), printModuleId(), clang::BumpVector< CFGElement >::push_back(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), resyncUTF8(), and stripPositionalArgs().

◆ FromDecl

const NamedDecl* FromDecl

Definition at line 158 of file USRLocFinder.cpp.

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

◆ Specifier

const NestedNameSpecifier* Specifier