clang 19.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/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>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  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.
 
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.
 

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::Sema::ActOnOMPIteratorExpr(), clang::PreprocessingRecord::addPreprocessedEntity(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::GenericSelectionExpr::associations(), clang::ASTVector< T >::ASTVector(), clang::BumpVector< T >::begin(), clang::ASTVector< T >::begin(), clang::Sema::BuildCXXForRangeStmt(), clang::BumpVector< T >::capacity(), checkMapConflicts(), clang::CXXParenListInitExpr::children(), clang::OMPArrayShapingExpr::children(), clang::OMPIteratorExpr::children(), clang::OMPUsesAllocatorsClause::children(), clang::BumpVector< T >::clear(), clang::ASTVector< T >::clear(), clang::Sema::CodeCompleteIncludedFile(), clang::format::CodePointsBetween(), computeCommonMacroArgExpansionFileIDs(), clang::targets::AMDGPUTargetInfo::convertConstraint(), clang::format::countLeadingWhitespace(), clang::UnresolvedMemberExpr::Create(), clang::UnresolvedLookupExpr::Create(), clang::Sema::CreateRecoveryExpr(), clang::BumpVector< T >::data(), clang::ASTVector< T >::data(), Diag(), DumpRecordLayout(), clang::CodeGen::CGOpenMPRuntime::emitUDMapperArrayInitOrDel(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::BumpVector< T >::empty(), clang::ASTVector< T >::empty(), clang::transformer::enclose(), clang::EscapeStringForDiagnostic(), clang::syntax::FileRange::FileRange(), findLinesForRange(), clang::CodeGen::swiftcall::SwiftAggLowering::finish(), clang::ento::iterator::ContainerData::getBegin(), clang::SourceManager::getExpansionRange(), clang::RawComment::getFormattedLines(), clang::ASTContext::getOverloadedTemplateName(), clang::FunctionDecl::getParametersSourceRange(), clang::UsingDecl::getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), getSourceRangeToTokenEnd(), clang::comments::Lexer::getSpelling(), clang::BumpVector< T >::insert(), clang::format::lexCSharpString(), makeCharRange(), MakeCharSourceRange(), clang::Lexer::makeFileCharRange(), makeRangeFromFileLocs(), mapDiagnosticRanges(), clang::ento::iterator::ContainerData::newEnd(), clang::transformer::noopEdit(), clang::ASTVector< T >::operator=(), clang::ento::iterator::ContainerData::operator==(), clang::BumpVector< T >::operator[](), clang::ASTVector< T >::operator[](), clang::OverloadExpr::OverloadExpr(), clang::analyze_format_string::parseFormatStringHasFormattingSpecifiers(), prepareAndFilterRanges(), printableTextForNextCharacter(), PrintBitFieldOffset(), clang::Decl::printGroup(), printModuleId(), clang::ento::iterator::ContainerData::Profile(), clang::transformer::range(), clang::TreeTransform< Derived >::RebuildCXXForRangeStmt(), clang::BumpVector< T >::reserve(), clang::format::rotateTokens(), clang::BumpVector< T >::size(), clang::ASTVector< T >::size(), clang::syntax::FileRange::text(), clang::syntax::FileRange::toCharRange(), clang::ConversionFixItGenerator::tryToFixConversion(), clang::ASTVector< T >::~ASTVector(), and clang::BumpVector< T >::~BumpVector().

◆ End

SourceLocation End

Definition at line 167 of file USRLocFinder.cpp.

◆ FromDecl

const NamedDecl* FromDecl

◆ IgnorePrefixQualifers

bool IgnorePrefixQualifers

Definition at line 179 of file USRLocFinder.cpp.

◆ Specifier

const NestedNameSpecifier* Specifier