clang: lib/Tooling/Refactoring/Rename/SymbolOccurrences.cpp Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
11#include "llvm/ADT/STLExtras.h"
12
13using namespace clang;
14using namespace tooling;
15
18 : Kind(Kind) {
20 assert(Locations.size() == NamePieces.size() &&
21 "mismatching number of locations and lengths");
22 assert(!Locations.empty() && "no locations");
23 if (Locations.size() == 1) {
25 Locations[0], Locations[0].getLocWithOffset(NamePieces[0].size()));
26 return;
27 }
28 MultipleRanges = std::make_unique<SourceRange[]>(Locations.size());
30 for (const auto &Loc : llvm::enumerate(Locations)) {
32 Loc.value(),
34 }
35}
SourceLocation getLocWithOffset(IntTy Offset) const
Return a source location with the specified offset from this SourceLocation.
A trivial tuple used to represent a source range.
The JSON file list parser is used to communicate input to InstallAPI.