[PATCH] D130894: [clang] Print more information about failed static assertions

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 3 08:19:11 PDT 2022


xbolva00 added a comment.

In D130894#3696534 <https://reviews.llvm.org/D130894#3696534>, @tbaeder wrote:

> FWIW, complex numbers are already covered it seems:
>
>   test.cpp:35:1: error: static assertion failed due to requirement '__real c == __imag c'
>   static_assert(__real c == __imag c);
>   ^             ~~~~~~~~~~~~~~~~~~~~
>   test.cpp:35:24: note: expression evaluates to 5 == 6
>   static_assert(__real c == __imag c);
>                 ~~~~~~~~~^~~~~~~~~~~
>   1 error generated.

Use ‘5 ==6’ ? So add quotes ..


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

https://reviews.llvm.org/D130894



More information about the cfe-commits mailing list