[all-commits] [llvm/llvm-project] fde04e: [libc++][test] Cleanup `LIBCPP_ONLY(meow_assert(.....

Stephan T. Lavavej via All-commits all-commits at lists.llvm.org
Sun Dec 10 07:34:07 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fde04e61cb7393f0ca982d7fc905a17767d93e6e
      https://github.com/llvm/llvm-project/commit/fde04e61cb7393f0ca982d7fc905a17767d93e6e
  Author: Stephan T. Lavavej <stl at nuwen.net>
  Date:   2023-12-10 (Sun, 10 Dec 2023)

  Changed paths:
    M libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
    M libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp

  Log Message:
  -----------
  [libc++][test] Cleanup `LIBCPP_ONLY(meow_assert(...))` to `LIBCPP_MEOW_ASSERT(...)` (#74967)

This is a syntax cleanup, not needed for running libc++'s tests with
MSVC's STL.

While changing
`libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp`
in #74965, I noticed that libc++'s tests almost always use the
special-purpose macros for "this is a libc++-specific `static_assert`
etc." defined by:

https://github.com/llvm/llvm-project/blob/b85f1f9b182234ba366d78ae2174a149e44d08c1/libcxx/test/support/test_macros.h#L240-L253

However, there were a very small number of occurrences that were using
the general-purpose `LIBCPP_ONLY` macro when they could have been using
the special-purpose macros. I believe that they should be cleaned up, to
make it easier to search for usage, and to make it clearer when the full
power of `LIBCPP_ONLY` is necessary.

This is a pure regex replacement from
`LIBCPP_ONLY\((assert|static_assert|ASSERT_NOEXCEPT|ASSERT_NOT_NOEXCEPT)\((.*)\)\);`
to `LIBCPP_\U$1($2);` using the power of [VSCode's case changing in
regex
replace](https://code.visualstudio.com/docs/editor/codebasics#_case-changing-in-regex-replace).

To avoid merge conflicts, this isn't changing the line in
`libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp`
that #74965 is already changing to use `LIBCPP_STATIC_ASSERT`.




More information about the All-commits mailing list