[PATCH] D63889: Check possible warnings on global initializers for reachability

Nathan Huckleberry via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 16 15:54:44 PDT 2019


Nathan-Huckleberry marked 4 inline comments as done.
Nathan-Huckleberry added inline comments.


================
Comment at: clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:360
 
-constexpr int ok_byte = (__builtin_bit_cast(std::byte[8], pad{1, 2}), 0);
-constexpr int ok_uchar = (__builtin_bit_cast(unsigned char[8], pad{1, 2}), 0);
+constexpr int ok_byte = (__builtin_bit_cast(std::byte[8], pad{1, 2}), 0);      // expected-warning {{expression result unused}}
+constexpr int ok_uchar = (__builtin_bit_cast(unsigned char[8], pad{1, 2}), 0); // expected-warning {{expression result unused}}
----------------
These new warnings seem valid.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63889





More information about the cfe-commits mailing list