clang 10.0.0git

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

Referenced by clang::PreprocessingRecord::addPreprocessedEntity(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::TemplateSpecializationType::anyDependentTemplateArguments(), clang::GenericSelectionExpr::associations(), clang::BumpVector< CFGElement >::begin(), clang::BumpVector< CFGElement >::capacity(), clang::transformer::charRange(), checkMapConflicts(), clang::Decl::classofKind(), clang::BumpVector< CFGElement >::clear(), clang::targets::AMDGPUTargetInfo::convertConstraint(), clang::UnresolvedLookupExpr::Create(), clang::UnresolvedMemberExpr::Create(), Diag(), DumpRecordLayout(), clang::CodeGen::CodeGenFunction::EmitMSVCBuiltinExpr(), findLinesForRange(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::CodeGen::ConstantAggregateBuilderBase::finishArray(), clang::CodeGen::ConstantAggregateBuilderBase::finishStruct(), 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(), clang::ASTContext::getUnqualifiedObjCPointerType(), clang::analyze_format_string::FormatStringHandler::HandleIncompleteScanList(), hasSuperInitCall(), highlightRange(), clang::BumpVector< CFGElement >::insert(), clang::PreprocessingRecord::isEntityInFileID(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), mapDiagnosticRanges(), clang::tooling::Replacements::operator==(), clang::OverloadExpr::OverloadExpr(), ParseAlignPragma(), clang::Decl::printGroup(), clang::transformer::range(), clang::BumpVector< CFGElement >::size(), and clang::CodeGen::ConstantAggregateBuilderBase::size().

## ◆ End

SourceLocation End

Definition at line 166 of file USRLocFinder.cpp.

Referenced by clang::tooling::Replacements::add(), clang::CodeGen::swiftcall::SwiftAggLowering::addTypedData(), clang::format::AffectedRangeManager::affectsCharSourceRange(), clang::GenericSelectionExpr::associations(), clang::transformer::charRange(), checkIfClauses(), checkMapConflicts(), checkOpenCLEnqueueLocalSizeArgs(), clang::syntax::Tree::classof(), clang::Sema::CodeCompleteObjCForCollection(), collectMacroDefinitions(), CompactMacroExpandedPieces(), clang::tooling::ExtractionSemicolonPolicy::compute(), ComputeLineNumbers(), clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), clang::Lexer::ComputePreamble(), clang::UnresolvedLookupExpr::Create(), diagnoseObjCLiteralComparison(), diagnoseRedundantReturnTypeQualifiers(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::BumpVector< CFGElement >::empty(), clang::BumpVector< CFGElement >::end(), clang::format::Environment::Environment(), clang::RopePieceBTree::erase(), clang::RewriteRope::erase(), evenFlexibleArraySize(), fileNameToURI(), FindConflictEnd(), clang::format::FindCursorIndex(), findEndOfWord(), findLinesForRange(), findPlaceholderEnd(), findVCToolChainViaEnvironment(), clang::Designator::getArrayRange(), clang::Lexer::getAsCharRange(), clang::driver::tools::Clang::getBaseInputStem(), getEnclosingStmtLocation(), clang::ento::iterator::ContainerData::getEnd(), clang::ento::PathDiagnosticLocationPair::getEnd(), clang::CXXConstructExpr::getEndLoc(), clang::CXXPseudoDestructorExpr::getEndLoc(), clang::InitListExpr::getEndLoc(), clang::SourceManager::getExpansionRange(), getFieldSize(), clang::NumericLiteralParser::GetFixedPointValue(), clang::driver::Driver::GetNamedOutputPath(), clang::ASTContext::getOverloadedTemplateName(), clang::FunctionDecl::getParametersSourceRange(), clang::NumericLiteralParser::getRadix(), getRangeForType(), getRangeSize(), clang::Rewriter::getRewrittenText(), clang::TemplateTemplateParmDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::EnumConstantDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), getStableLevel(), clang::ASTContext::getUnqualifiedObjCPointerType(), handleGslAnnotatedTypes(), clang::analyze_format_string::FormatStringHandler::HandleIncompleteScanList(), clang::Preprocessor::HandlePragmaModuleBuild(), hasSuperInitCall(), hasTargetFeatureMTE(), highlightRange(), clang::format::WhitespaceManager::Change::indentAndNestingLevel(), isDiagnosedResult(), clang::PreprocessingRecord::isEntityInFileID(), clang::CodeGen::CodeGenFunction::isTrivialInitializer(), clang::format::FormatTokenLexer::lex(), clang::Preprocessor::LexHeaderName(), clang::ComparisonCategories::lookupInfoForType(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), mapDiagnosticRanges(), llvm::yaml::MappingTraits< clang::tooling::AtomicChange >::mapping(), OMPMappableExprListClause< T >::const_component_lists_iterator::operator++(), clang::tooling::Replacements::operator==(), clang::OverloadExpr::OverloadExpr(), ParseAlignPragma(), pathOnlyInitializesGslPointer(), clang::BumpVector< CFGElement >::pop_back(), clang::Decl::printGroup(), printModuleId(), clang::BumpVector< CFGElement >::push_back(), clang::transformer::range(), clang::serialization::reader::HeaderFileInfoTrait::ReadData(), removeEdgesToDefaultInitializers(), resyncUTF8(), clang::scanDirectory(), skipBlockComment(), and stripPositionalArgs().

## ◆ FromDecl

const NamedDecl* FromDecl

Definition at line 168 of file USRLocFinder.cpp.

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

## ◆ IgnorePrefixQualifers

bool IgnorePrefixQualifers

Definition at line 178 of file USRLocFinder.cpp.

## ◆ Specifier

const NestedNameSpecifier* Specifier

Definition at line 172 of file USRLocFinder.cpp.

Referenced by findDecomposableBaseClass(), getMSPropertyAttr(), getTypeInfoVTable(), clang::CXXRecordDecl::isDerivedFrom(), clang::CXXRecordDecl::isVirtuallyDerivedFrom(), clang::Preprocessor::LexOnOffSwitch(), and clang::ProcessWarningOptions().