This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Fix crash in MoveChecker when it tries to report duplicate issue
ClosedPublic

Authored by tomasz-kaminski-sonarsource on Jul 12 2023, 7:06 AM.

Details

Summary

The 'MoveChecker' was missing the check if the error node was
successfully generated (non-null value was returned). This happens
if duplicate of the report is emitted.

This patch contains NFC, where 'reportBug' is renamed to 'tryReportBug',
to better indicate conditional behavior of function.

Author: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
tomasz-kaminski-sonarsource requested review of this revision.Jul 12 2023, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 12 2023, 7:06 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
necto added a subscriber: necto.Jul 12 2023, 7:15 AM
xazax.hun accepted this revision.Jul 12 2023, 7:16 AM
This revision is now accepted and ready to land.Jul 12 2023, 7:16 AM
tomasz-kaminski-sonarsource retitled this revision from [analyzer] Fix crash in MoveChecker when it tries to report duplicate issue. to [analyzer] Fix crash in MoveChecker when it tries to report duplicate issue.Jul 12 2023, 8:30 AM
tomasz-kaminski-sonarsource edited the summary of this revision. (Show Details)