================
@@ -1332,6 +1334,11 @@ StringLiteral::getLocationOfByte(unsigned ByteNo, const
SourceManager &SM,
const LangOptions &Features,
const TargetInfo &Target, unsigned
*StartToken,
unsigned *StartTokenByteOffset) const {
+ // No source location of bytes for binary literals since they don't come from
+ // source.
+ if (getKind() == StringLiteralKind::Binary)
+ return getStrTokenLoc(0);
----------------
Fznamznon wrote:
It will point at the beginning of the StringLiteral, but not to a particular
problematic byte (which this function intends to find). In case of `#embed` it
will point to the directive location. The test I'm adding should exercise that.
https://github.com/llvm/llvm-project/pull/127629
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits