[PATCH] D136090: Handle errors in expansion of response files

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 28 00:37:18 PDT 2022


mgorny added inline comments.


================
Comment at: clang/unittests/Driver/ToolChainTest.cpp:604-606
+  char *StrBuff = (char *)Alloc.Allocate(6, 2);
+  std::memcpy(StrBuff, "\xFF\xFE\x00\xD8\x00\x00", 6);
+  StringRef BadUTF(StrBuff, 6);
----------------
Wouldn't it be possible to use `std::string`, or maybe even `std::array<char, ...>` here? I think it'd be less error-prone.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136090



More information about the cfe-commits mailing list