class SymbolOccurrence
Declaration
class SymbolOccurrence { /* full declaration omitted */ };
Description
An occurrence of a symbol in the source. Occurrences can have difference kinds, that describe whether this occurrence is an exact semantic match, or whether this is a weaker textual match that's not guaranteed to represent the exact declaration. A single occurrence of a symbol can span more than one source range. For example, Objective-C selectors can contain multiple argument labels: We have to replace the text in both range 0 and range 1 when renaming the Objective-C method 'selectorPiece1:selectorPiece2'.
Declared at: clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:39
Member Variables
- private clang::tooling::SymbolOccurrence::OccurrenceKind Kind
- private std::unique_ptr<SourceRange[]> MultipleRanges
- private anonymous struct / union
Method Overview
- public SymbolOccurrence(const clang::tooling::SymbolName & Name, clang::tooling::SymbolOccurrence::OccurrenceKind Kind, ArrayRef<clang::SourceLocation> Locations)
- public SymbolOccurrence(clang::tooling::SymbolOccurrence &&)
- public clang::tooling::SymbolOccurrence::OccurrenceKind getKind() const
- public ArrayRef<clang::SourceRange> getNameRanges() const
Methods
¶SymbolOccurrence(
const clang::tooling::SymbolName& Name,
clang::tooling::SymbolOccurrence::
OccurrenceKind Kind,
ArrayRef<clang::SourceLocation> Locations)
SymbolOccurrence(
const clang::tooling::SymbolName& Name,
clang::tooling::SymbolOccurrence::
OccurrenceKind Kind,
ArrayRef<clang::SourceLocation> Locations)
Declared at: clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:63
Parameters
- const clang::tooling::SymbolName& Name
- clang::tooling::SymbolOccurrence::OccurrenceKind Kind
- ArrayRef<clang::SourceLocation> Locations
¶SymbolOccurrence(
clang::tooling::SymbolOccurrence&&)
SymbolOccurrence(
clang::tooling::SymbolOccurrence&&)
Declared at: clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:66
Parameters
¶clang::tooling::SymbolOccurrence::OccurrenceKind
getKind() const
clang::tooling::SymbolOccurrence::OccurrenceKind
getKind() const
Declared at: clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:69
¶ArrayRef<clang::SourceRange> getNameRanges() const
ArrayRef<clang::SourceRange> getNameRanges() const
Declared at: clang/include/clang/Tooling/Refactoring/Rename/SymbolOccurrences.h:71