diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -1883,6 +1883,11 @@ return getTrailingObjects() + getNumConcatenated(); } + /// Gets the source location of each piece that makes up this string literal. + ArrayRef getTokenLocations() const { + return {getTrailingObjects(), getNumConcatenated()}; + } + SourceLocation getBeginLoc() const LLVM_READONLY { return *tokloc_begin(); } SourceLocation getEndLoc() const LLVM_READONLY { return *(tokloc_end() - 1); }