[libc++ testing] Fix unused variable warning turned error
authorDavid Zarzycki <dave@znu.io>
Wed, 22 Apr 2020 11:45:47 +0000 (07:45 -0400)
committerDavid Zarzycki <dave@znu.io>
Wed, 22 Apr 2020 12:05:31 +0000 (08:05 -0400)
libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp
libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp

index a4f3f8c..9d90af9 100644 (file)
@@ -57,6 +57,7 @@ void test() {
     typedef std::basic_string<CharT, trait<CharT> > str_t;
     std::hash<str_t>
         h; // expected-error-re 4 {{{{call to implicitly-deleted default constructor of 'std::hash<str_t>'|implicit instantiation of undefined template}} {{.+}}}}}}
+    (void)h;
 }
 
 int main(int, char**) {
index a44873f..2f92935 100644 (file)
@@ -58,6 +58,7 @@ void test() {
     typedef std::basic_string_view<CharT, trait<CharT> > strv_t;
     std::hash<strv_t>
         h; // expected-error-re 4 {{{{call to implicitly-deleted default constructor of 'std::hash<strv_t>'|implicit instantiation of undefined template}} {{.+}}}}}}
+    (void)h;
 }
 
 int main(int, char**) {