[libcxx-commits] [libcxx] b2f06bd - [libc++ testing] Fix unused variable warning turned error

David Zarzycki via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 22 05:06:20 PDT 2020


Author: David Zarzycki
Date: 2020-04-22T08:05:31-04:00
New Revision: b2f06bd20bdec80f2637463644b690f54fe09fdc

URL: https://github.com/llvm/llvm-project/commit/b2f06bd20bdec80f2637463644b690f54fe09fdc
DIFF: https://github.com/llvm/llvm-project/commit/b2f06bd20bdec80f2637463644b690f54fe09fdc.diff

LOG: [libc++ testing] Fix unused variable warning turned error

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp b/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp
index a4f3f8c483b7..9d90af9f2018 100644
--- a/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp
+++ b/libcxx/test/std/strings/basic.string.hash/char_type_hash.fail.cpp
@@ -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**) {

diff  --git a/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp b/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp
index a44873fb1008..2f9293598395 100644
--- a/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.hash/char_type.hash.fail.cpp
@@ -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**) {


        


More information about the libcxx-commits mailing list