[libcxx-commits] [PATCH] D120634: [Libcxx] Add <source_location> header.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 5 17:37:58 PST 2022


Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/language.support/support.srcloc/general.pass.cpp:66
+  assert(!strcmp(local.file_name(), "ss"));
+  assert(strstr(local.function_name(), "main"));
+  assert(local.line() == 2000);
----------------
Too bad we can't `std::string_view(local.function_name()).contains("main")` until C++23. :(

+1 for `assert(strcmp(local.file_name(), "ss") == 0)` above (and lines 72,73,79,80...) and for `assert(strstr(local.function_name(), "main") != nullptr)` here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120634/new/

https://reviews.llvm.org/D120634



More information about the libcxx-commits mailing list