llvm-project/clang/unittests/Frontend
Jan Svoboda d0262c2394 [llvm] Add null-termination capability to SmallVectorMemoryBuffer
Most of `MemoryBuffer` interfaces expose a `RequiresNullTerminator` parameter that's being used to:
* determine how to open a file (`mmap` vs `open`),
* assert newly initialized buffer indeed has an implicit null terminator.

This patch adds the paramater to the `SmallVectorMemoryBuffer` constructors, meaning:
* null terminator can now be added to `SmallVector`s that didn't have one before,
* `SmallVectors` that had a null terminator before keep it even after the move.

In line with existing code, the new parameter is defaulted to `true`. This patch makes sure all calls to the `SmallVectorMemoryBuffer` constructor set it to `false` to preserve the current semantics.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D115331
2021-12-09 11:32:13 +01:00
..
ASTUnitTest.cpp [clang][Frontend] Add missing error handling 2020-10-22 14:14:19 -07:00
CMakeLists.txt [clangd] Avoid "expected one compiler job" by picking the first eligible job. 2021-08-13 00:36:30 +02:00
CodeGenActionTest.cpp
CompilerInstanceTest.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
CompilerInvocationTest.cpp [modules] Use `HashBuilder` and `MD5` for the module hash. 2021-09-03 11:13:36 -07:00
FixedPointString.cpp
FrontendActionTest.cpp PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
OutputStreamTest.cpp Frontend: Fix memory leak in CompilerInstance::setVerboseOutputStream 2021-01-26 14:57:23 -08:00
PCHPreambleTest.cpp Fix clang unnittest build with GCC 5 2020-01-29 10:30:36 +01:00
ParsedSourceLocationTest.cpp
TextDiagnosticTest.cpp [llvm] Add null-termination capability to SmallVectorMemoryBuffer 2021-12-09 11:32:13 +01:00
UtilsTest.cpp [clangd] Avoid "expected one compiler job" by picking the first eligible job. 2021-08-13 00:36:30 +02:00