[libcxx-commits] [libcxx] [libc++][NFC] Use __construct_at and __destroy_at insted of using preprocessor conditionals (PR #70866)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 20 17:22:05 PST 2023


================
@@ -16,5 +16,5 @@
 
 void f() {
     std::vector<MoveOnly> v;
-    std::vector<MoveOnly> copy = v; // expected-error-re@* {{{{(no matching function for call to 'construct_at')|(call to implicitly-deleted copy constructor of 'MoveOnly')|(call to deleted constructor of 'MoveOnly')}}}}
+    std::vector<MoveOnly> copy = v; // expected-error-re@* {{{{(no matching function for call to '__construct_at')|(call to implicitly-deleted copy constructor of 'MoveOnly')}}}}
----------------
EricWF wrote:

It's unfortunate that `__construct_at` appears here, but I think that suggests we're testing too much of the compiler message. 

A test should only fail when the behavior under test no longer holds. Is the name part of the behavior under test?

https://github.com/llvm/llvm-project/pull/70866


More information about the libcxx-commits mailing list