This is an archive of the discontinued LLVM Phabricator instance.

[NFC][analyzer] Enable implicit destructor for cfg-lifetime tests
ClosedPublic

Authored by tomasz-kaminski-sonarsource on Jul 19 2023, 4:45 AM.

Details

Summary

This enables cfg-temporary-dtors, cfg-rich-constructors, and
cfg-implicit-dtors (defaults for CSA) for CFGLifetime test,
making int consistent with cfg-scopes test.
Before the fixes implemented in https://reviews.llvm.org/D153273,
this flags were incompatible.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2023, 4:45 AM
tomasz-kaminski-sonarsource requested review of this revision.Jul 19 2023, 4:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2023, 4:45 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Updating this tests illustrated that we are missing a lot of coverage for the objects with trivial destructors, but I think this should be addressed as a separate patch.

Updating this tests illustrated that we are missing a lot of coverage for the objects with trivial destructors, but I think this should be addressed as a separate patch.

Would it make sense to add some FIXME comments in this patch?

Added generic FIXME comment for covering test cases for types with trivial destructor.
This affects nearly all tests cases from file, so some tought needs to be put on how
to apporach it.

xazax.hun accepted this revision.Jul 21 2023, 3:55 PM

Thanks!

clang/test/Analysis/lifetime-cfg-output.cpp
6

I have a bit hard time understanding this part.

This revision is now accepted and ready to land.Jul 21 2023, 3:55 PM
tomasz-kaminski-sonarsource marked an inline comment as done.Jul 24 2023, 1:08 AM
tomasz-kaminski-sonarsource added inline comments.
clang/test/Analysis/lifetime-cfg-output.cpp
6

Rewrote it, to help with clarity.

This revision was landed with ongoing or failed builds.Jul 24 2023, 2:54 AM
This revision was automatically updated to reflect the committed changes.
tomasz-kaminski-sonarsource marked an inline comment as done.