12 #include "llvm/ADT/STLExtras.h" 14 using namespace clang;
15 using namespace tooling;
21 assert(Locations.size() == NamePieces.size() &&
22 "mismatching number of locations and lengths");
23 assert(!Locations.empty() &&
"no locations");
24 if (Locations.size() == 1) {
26 Locations[0], Locations[0].getLocWithOffset(NamePieces[0].size()));
29 MultipleRanges = llvm::make_unique<SourceRange[]>(Locations.size());
32 for (
const auto &Loc : llvm::enumerate(Locations)) {
35 Loc.value().getLocWithOffset(NamePieces[Loc.index()].size()));
void setBegin(SourceLocation b)
static SourceLocation getFromRawEncoding(unsigned Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
Dataflow Directional Tag Classes.
A trivial tuple used to represent a source range.