[libc++] Fix set-but-not-used warning. NFC.
authorMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Tue, 27 Apr 2021 10:22:56 +0000 (12:22 +0200)
committerMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Tue, 27 Apr 2021 10:22:56 +0000 (12:22 +0200)
libcxx/test/std/strings/basic.string/string.cons/iter_alloc_deduction.fail.cpp

index 793e048..b8f5e2d 100644 (file)
@@ -41,7 +41,6 @@ int main(int, char**)
     std::basic_string s1{NotAnItertor{}, NotAnItertor{}, std::allocator<char>{}}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}}
     }
     { // Not an input iterator
-    const char16_t* s = u"12345678901234";
     std::basic_string<char16_t> s0;
     std::basic_string s1{std::back_insert_iterator(s0), //  expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}}
                          std::back_insert_iterator(s0),
@@ -49,6 +48,7 @@ int main(int, char**)
     }
     { // Not an allocator
     const wchar_t* s = L"12345678901234";
+    (void)s;
     std::basic_string s1{s, s+10, NotAnAllocator<wchar_t>{}}; // expected-error {{no viable constructor or deduction guide for deduction of template arguments of 'basic_string'}}
     }