[libcxx-commits] [PATCH] D107755: [libcxx] [test] Generalize defines for skipping allocation checks
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 9 10:41:41 PDT 2021
mstorsjo added inline comments.
================
Comment at: libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp:204
#else
bool DisableAllocations = std::is_same<CharT, char>::value;
+#endif
----------------
Quuxplusone wrote:
> As long as we're messing with this, is this a good time to change the name `DisableAllocations` to `ExpectNoAllocations`? Here we're not //disabling// anything from happening; we're just setting up what we //expect// to see happen.
>
> Could even
> ```
> bool ExpectNoAllocations = std::is_same<CharT, char>::value && std::is_same<path::value_type, char>::value;
> ```
> to eliminate that `#if _WIN32`, right?
Oh, good idea about the renaming - yes, that’s much clearer. Regarding merging the windows ifdef that way, I guess that’d work. Semantically there’s a very minor difference, maybe, but it’s close enough to make it worthwhile. I’ll give it a shot.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107755/new/
https://reviews.llvm.org/D107755
More information about the libcxx-commits
mailing list