melver wrote:

> This should have a release note so users know about the fix.

We don't have a release with https://github.com/llvm/llvm-project/pull/148551 
yet, which was landed last week. We might need a separate release note for 
https://github.com/llvm/llvm-project/pull/148551 itself though, but that's a 
separate PR.

> One thing I'm concerned by is that we have `compareString` functions which I 
> don't think will expect this because those bytes may not be comparable. e.g., 
> we do this:
> 
> ```
>   case ValueType::BT_String:
>     return Cmp.compareStrings(as<StringRef>().value(),
>                               E->as<StringRef>().value());
> ```
> 
> and is that actually going to work when we don't have a `StringRef` but 
> instead have a bucket of bytes?

getBytes() returns a StringRef, and we have:
```
  bool compareStrings (StringRef s, StringRef r) { return s == r; }
```

So it will just compare these bytes for equality (StringRef::operator== does 
memcmp). So if we have 2 wide-strings that are equal, they will match. I think 
that's the intent.

https://github.com/llvm/llvm-project/pull/180349
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to