[all-commits] [llvm/llvm-project] d7e0ce: [libc++][test] Mark `test_comparisons.h` helpers a...

Adrian Vogelsgesang via All-commits all-commits at lists.llvm.org
Fri Aug 12 03:30:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7e0cec60ee3f6f3bfa60764ec1022a4072fe852
      https://github.com/llvm/llvm-project/commit/d7e0cec60ee3f6f3bfa60764ec1022a4072fe852
  Author: Adrian Vogelsgesang <avogelsgesang at tableau.com>
  Date:   2022-08-12 (Fri, 12 Aug 2022)

  Changed paths:
    M libcxx/test/support/test_comparisons.h
    M libcxx/test/support/test_macros.h

  Log Message:
  -----------
  [libc++][test] Mark `test_comparisons.h` helpers as nodiscard

I accidentally wrote `testComparisons(...)` instead of
`assert(testComparisons(...))`. This compiled without issues, but
did not provide the intended test coverage. By adding a `nodiscard`,
we can make sure that the compiler catches such mistakes for us.

Differential Revision: https://reviews.llvm.org/D131364




More information about the All-commits mailing list