clang 20.0.0git
|
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. | |
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.
SourceLocation Begin |
Definition at line 165 of file USRLocFinder.cpp.
Referenced by clang::SemaHLSL::ActOnFinishBuffer(), clang::SemaOpenMP::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::SemaCodeCompletion::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::serialization::PPEntityOffset::getBegin(), clang::serialization::PPSkippedRange::getBegin(), clang::ento::iterator::ContainerData::getBegin(), clang::SourceManager::getExpansionRange(), clang::RawComment::getFormattedLines(), clang::ASTContext::getOverloadedTemplateName(), clang::FunctionDecl::getParametersSourceRange(), clang::UsingDecl::getSourceRange(), clang::UnresolvedUsingValueDecl::getSourceRange(), clang::diff::SyntaxTree::getSourceRangeOffsets(), getSourceRangeToTokenEnd(), clang::comments::Lexer::getSpelling(), clang::EmbedExpr::getStartingElementPos(), 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(), clang::serialization::PPEntityOffset::PPEntityOffset(), clang::serialization::PPSkippedRange::PPSkippedRange(), 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::Preprocessor::setDeserializedSafeBufferOptOutMap(), 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().
SourceLocation End |
Definition at line 167 of file USRLocFinder.cpp.
const NamedDecl* FromDecl |
Definition at line 169 of file USRLocFinder.cpp.
Referenced by clang::ASTNodeImporter::ImportAPValue(), and clang::tooling::replaceNestedName().
bool IgnorePrefixQualifers |
Definition at line 179 of file USRLocFinder.cpp.
const NestedNameSpecifier* Specifier |
Definition at line 173 of file USRLocFinder.cpp.
Referenced by clang::Sema::AddOverriddenMethods(), clang::CXXRecordDecl::FindBaseClass(), findDecomposableBaseClass(), findOrdinaryMemberInDependentClasses(), clang::CXXRecordDecl::FindVirtualBaseClass(), clang::NestedNameSpecifier::getAsIdentifier(), clang::NestedNameSpecifier::getAsType(), clang::CXXRecordDecl::hasMemberName(), clang::CXXRecordDecl::isDerivedFrom(), clang::CXXRecordDecl::isVirtuallyDerivedFrom(), clang::CXXRecordDecl::lookupDependentName(), clang::Sema::LookupQualifiedName(), clang::ProcessWarningOptions(), and clang::NestedNameSpecifier::Profile().