[PATCH] D95877: [analyzer] Fix static_cast on pointer-to-member handling

Valeriy Savchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 8 00:59:24 PST 2021


vsavchenko added a comment.

In D95877#2548021 <https://reviews.llvm.org/D95877#2548021>, @RedDocMD wrote:

> In D95877#2547949 <https://reviews.llvm.org/D95877#2547949>, @vsavchenko wrote:
>
>> I think we had a bit of misunderstanding about the test.  It still should pass (we can't have broken tests, it will disrupt CI bots).  Try to put the test case, so it is THERE and you CHANGE the expected outcome when the analyzer behaves correctly.  Right now, as I see above, the test crashes.
>
> Actually, that is the reason why I initially had commented out the crashing test. Until `reinterpret_cast` is properly handled, the test will crash due to an assertion failure, irrespective of what is put as the expected outcome. Is there a way to flag that a test should crash? (I see that after the tests are run, there is an expectedly-failed category). The crash is caused when the static analyzer tries to evaluate `base.*bf`.

Yes, it'd be better to extract this case into a separate file and mark it as XFAIL


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95877



More information about the cfe-commits mailing list