This is an archive of the discontinued LLVM Phabricator instance.

[NFC][CLANG] Fix bug with dereference null return value found by static analyzer tool
AbandonedPublic

Authored by Manna on May 19 2023, 6:35 PM.

Details

Reviewers
erichkeane
Summary

This patch uses castAs instead of getAs which will assert if the type doesn't match in TypeIsInnerPointer(clang::​QualType).

Diff Detail

Event Timeline

Manna created this revision.May 19 2023, 6:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 6:35 PM
Manna requested review of this revision.May 19 2023, 6:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2023, 6:35 PM
Manna edited the summary of this revision. (Show Details)May 19 2023, 6:36 PM
Manna updated this revision to Diff 523983.May 19 2023, 8:21 PM

Fix Clang-format error

Manna updated this revision to Diff 523986.May 19 2023, 8:26 PM
Manna abandoned this revision.EditedMay 20 2023, 10:01 AM

I have updated patch.

Manna reclaimed this revision.May 20 2023, 5:42 PM
Manna abandoned this revision.EditedMay 21 2023, 5:16 AM

I have updated patch.

Manna reclaimed this revision.Jun 4 2023, 9:46 AM
Manna retitled this revision from [NFC][CLANG] Fix issue with dereference null return value found by Coverity static analyzer tool to [NFC][CLANG] Fix bug with dereference null return value found by static analyzer tool.
Manna edited the summary of this revision. (Show Details)
Manna set the repository for this revision to rG LLVM Github Monorepo.
Manna abandoned this revision.EditedJun 4 2023, 9:56 AM

This is False Positive. We are correctly matching the type. Closing the PR.