[PATCH] D46205: Set MemoryBuffer's RequiresNullTerminator to false by default.

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 13:27:59 PDT 2018


espindola added a comment.

I really like the idea of changing the default, but maybe instead of an argument we should just have two functions:

getFile(...)
getNullTerminatedFile(...)



================
Comment at: clang/tools/clang-refactor/TestSupport.cpp:297
   ErrorOr<std::unique_ptr<MemoryBuffer>> ErrOrFile =
-      MemoryBuffer::getFile(Filename);
   if (!ErrOrFile) {
----------------
Maybe we should have a getNullTerminatedFile?


================
Comment at: llvm/unittests/AsmParser/AsmParserTest.cpp:36
-
-TEST(AsmParserTest, NonNullTerminatedInput) {
-  LLVMContext Ctx;
----------------
Why delete this test?


https://reviews.llvm.org/D46205





More information about the llvm-commits mailing list