[PATCH] D155610: [Clang][ExprConstant] Print integer instead of character on static assertion failure

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 02:04:48 PDT 2023


tbaeder added a comment.

I think the discussion is getting derailed a bit. The original reason I was talking to Takuya about this is this: https://godbolt.org/z/GjsYrexT3

  static_assert('a' == 100);

For code like this, we print the it as `''a' == 100'`, but the AST contains a cast from the LHS char to an integer, and I think we shouldn't ignore that cast.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155610



More information about the cfe-commits mailing list