clang  14.0.0git
Namespaces | Functions
USRLocFinder.cpp File Reference
#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>
Include dependency graph for USRLocFinder.cpp:

Go to the source code of this file.

Namespaces

 clang
 
 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 165 of file USRLocFinder.cpp.

Referenced by clang::PreprocessingRecord::addPreprocessedEntity(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::GenericSelectionExpr::associations(), clang::ASTVector< uint64_t >::ASTVector(), clang::BumpVector< CFGElement >::begin(), clang::ASTVector< uint64_t >::begin(), clang::BumpVector< CFGElement >::capacity(), checkMapConflicts(), clang::OMPArrayShapingExpr::children(), clang::OMPIteratorExpr::children(), clang::OMPUsesAllocatorsClause::children(), clang::BumpVector< CFGElement >::clear(), clang::ASTVector< uint64_t >::clear(), clang::format::CodePointsBetween(), computeCommonMacroArgExpansionFileIDs(), clang::UnresolvedLookupExpr::Create(), clang::Sema::CreateRecoveryExpr(), clang::BumpVector< CFGElement >::data(), clang::ASTVector< uint64_t >::data(), Diag(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitMSVCBuiltinExpr(), clang::BumpVector< CFGElement >::empty(), clang::ASTVector< uint64_t >::empty(), clang::transformer::enclose(), clang::syntax::FileRange::FileRange(), findLinesForRange(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::ento::iterator::ContainerData::getBegin(), clang::SourceManager::getExpansionRange(), clang::ASTContext::getOverloadedTemplateName(), clang::FunctionDecl::getParametersSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::UsingDecl::getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), clang::comments::Lexer::getSpelling(), highlightRange(), clang::BumpVector< CFGElement >::insert(), makeCharRange(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), mapDiagnosticRanges(), clang::ento::iterator::ContainerData::newEnd(), clang::transformer::noopEdit(), clang::ento::iterator::ContainerData::operator!=(), clang::ASTVector< uint64_t >::operator=(), clang::ento::iterator::ContainerData::operator==(), clang::BumpVector< CFGElement >::operator[](), clang::ASTVector< uint64_t >::operator[](), clang::OverloadExpr::OverloadExpr(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), PrintBitFieldOffset(), clang::Decl::printGroup(), printModuleId(), clang::ento::iterator::ContainerData::Profile(), clang::transformer::range(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::BumpVector< CFGElement >::reserve(), clang::format::rotateTokens(), clang::BumpVector< CFGElement >::size(), clang::ASTVector< uint64_t >::size(), clang::syntax::FileRange::text(), clang::syntax::FileRange::toCharRange(), clang::ASTVector< uint64_t >::~ASTVector(), and clang::BumpVector< CFGElement >::~BumpVector().

◆ End

SourceLocation End

Definition at line 167 of file USRLocFinder.cpp.

Referenced by clang::format::affectsRange(), clang::transformer::after(), Append(), clang::RewriteRope::assign(), clang::GenericSelectionExpr::associations(), buildMultiCharMask(), checkMapConflicts(), clang::format::CodePointsBetween(), collectMacroDefinitions(), computeCommonMacroArgExpansionFileIDs(), clang::computeDependence(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), clang::Lexer::ComputePreamble(), clang::SrcMgr::ExpansionInfo::create(), clang::UnresolvedLookupExpr::Create(), clang::SrcMgr::ExpansionInfo::createForTokenSplit(), clang::Sema::CreateRecoveryExpr(), DecodePPCMMATypeFromStr(), DecodeTypeFromStr(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDepobjElements(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::transformer::enclose(), clang::format::Environment::Environment(), EvalPluralExpr(), evenFlexibleArraySize(), fileNameToURI(), clang::format::FindCursorIndex(), findEndOfWord(), findLinesForRange(), findVCToolChainViaEnvironment(), clang::SrcMgr::LineOffsetMapping::get(), clang::Designator::getArrayRange(), clang::Lexer::getAsCharRange(), clang::driver::tools::Clang::getBaseInputStem(), clang::CXXConstructExpr::getEndLoc(), clang::CXXPseudoDestructorExpr::getEndLoc(), clang::InitListExpr::getEndLoc(), getEntityEndLoc(), clang::SourceManager::getExpansionRange(), clang::NumericLiteralParser::GetFixedPointValue(), getIdentifierContinuation(), clang::driver::Driver::GetNamedOutputPath(), clang::ASTContext::getOverloadedTemplateName(), clang::FunctionDecl::getParametersSourceRange(), getRangeForType(), getRangeSize(), clang::Rewriter::getRewrittenText(), clang::TemplateTemplateParmDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), handleGslAnnotatedTypes(), clang::Preprocessor::HandlePragmaModuleBuild(), hasExplicitMemberDefinition(), hasTargetFeatureMTE(), highlightRange(), clang::RewriteRope::insert(), isEOL(), clang::SourceLocation::isPairOfFileLocations(), clang::SourceManager::isPointWithin(), isQuoteCppDigitSeparator(), clang::Preprocessor::LexHeaderName(), lexRawIdentifier(), clang::ComparisonCategories::lookupInfoForType(), makeCharRange(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), mapDiagnosticRanges(), clang::ento::RangeSet::Factory::negate(), clang::OverloadExpr::OverloadExpr(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), pathOnlyInitializesGslPointer(), PluralNumber(), populateExecutedLinesWithFunctionSignature(), clang::Decl::printGroup(), printModuleId(), clang::transformer::range(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::ento::EnvironmentManager::removeDeadBindings(), removeEdgesToDefaultInitializers(), resyncUTF8(), clang::format::rotateTokens(), clang::scanDirectory(), clang::Preprocessor::setCodeCompletionTokenRange(), skipBlockComment(), skipLine(), skipLineComment(), skipNewline(), skipOverSpaces(), skipRawString(), skipString(), skipToNewlineRaw(), skipUTF8ByteOrderMark(), skipWhitespace(), stripPositionalArgs(), and TestPluralRange().

◆ FromDecl

const NamedDecl* FromDecl

Definition at line 169 of file USRLocFinder.cpp.

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

◆ IgnorePrefixQualifers

bool IgnorePrefixQualifers

Definition at line 179 of file USRLocFinder.cpp.

◆ Specifier

const NestedNameSpecifier* Specifier