[PATCH] D78202: [FileCheck] - Refactor the code related to string arrays. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 02:49:29 PDT 2020


grimar added a comment.

In D78202#1984110 <https://reviews.llvm.org/D78202#1984110>, @MaskRay wrote:

> I am a bit concerned that some `StringRef`s come from the storage of `cl::list<string>`, and it is not entirely clear that those `StringRef`s will not get invalidated. (It will not if one knows the internals of cl::list but this is subtle and it'd be good to drop reliance of it.)


The storage is destroyed when FileCheck terminates for me and with the current code it doesn't seem that any `list_storage<DataType, bool>` methods that can invalidate it are called/can be called before that.
But I agree that it is too subtle. I'll update the patch to improve this situation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78202/new/

https://reviews.llvm.org/D78202





More information about the llvm-commits mailing list