ΒΆstd::string replaceNestedName(
const clang::NestedNameSpecifier* Use,
clang::SourceLocation UseLoc,
const clang::DeclContext* UseContext,
const clang::NamedDecl* FromDecl,
llvm::StringRef ReplacementString)
std::string replaceNestedName(
const clang::NestedNameSpecifier* Use,
clang::SourceLocation UseLoc,
const clang::DeclContext* UseContext,
const clang::NamedDecl* FromDecl,
llvm::StringRef ReplacementString)
Description
Emulate a lookup to replace one nested name specifier with another using as few additional namespace qualifications as possible. This does not perform a full C++ lookup so ADL will not work.
Declared at: clang/include/clang/Tooling/Refactoring/Lookup.h:41
Parameters
- const clang::NestedNameSpecifier* Use
- The nested name to be replaced.
- clang::SourceLocation UseLoc
- The location of name to be replaced.
- const clang::DeclContext* UseContext
- The context in which the nested name is contained. This will be used to minimize namespace qualifications.
- const clang::NamedDecl* FromDecl
- The declaration to which the nested name points.
- llvm::StringRef ReplacementString
- The replacement nested name. Must be fully qualified including a leading "::".
Returns
The new name to be inserted in place of the current nested name.