11 #include "llvm/ADT/STLExtras.h" 13 using namespace clang;
14 using namespace tooling;
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()));
28 MultipleRanges = llvm::make_unique<SourceRange[]>(Locations.size());
31 for (
const auto &Loc : llvm::enumerate(Locations)) {
34 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.