[PATCH] D89065: [clang] Tweaked fixit for static assert with no message

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 21 05:01:26 PST 2021


njames93 added inline comments.


================
Comment at: clang/lib/Parse/ParseDeclCXX.cpp:874
 /// [C++0x] static_assert-declaration:
 ///           static_assert ( constant-expression  ,  string-literal  ) ;
 ///
----------------
aaron.ballman wrote:
> xbolva00 wrote:
> > Do we warn for:
> > 
> > static_assert(“my msg”)? 
> > 
> > I remember some long time ago bug in llvm itself -  assert(“my msg”) - condition expr was missing.
> We don't, but that would be a reasonable warning to add (not necessarily as part of this patch).
There is a clang-tidy check, misc-static-assert, that will flag asserts like that, although it won't flag static asserts of that kind.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89065



More information about the cfe-commits mailing list