Page MenuHomePhabricator

[analyzer] SmartPtrModeling: Fix a null dereference.
ClosedPublic

Authored by NoQ on Apr 29 2019, 4:53 PM.

Diff Detail

Repository
rC Clang

Event Timeline

NoQ created this revision.Apr 29 2019, 4:53 PM
NoQ edited the summary of this revision. (Show Details)Apr 29 2019, 4:54 PM
NoQ set the repository for this revision to rC Clang.
Herald added a project: Restricted Project. · View Herald TranscriptApr 29 2019, 4:54 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Charusso accepted this revision.Apr 29 2019, 4:57 PM

When I see ->* I go mad, but we should handle unknown stuff, cool patch.

This revision is now accepted and ready to land.Apr 29 2019, 4:57 PM
xazax.hun accepted this revision.Apr 29 2019, 5:59 PM

LG! These mistakes are so easy to make. Maybe we should add nullability annotations (or use optionals) in the future? (Or just make every non-null pointer a reference and make it a convention to always check for nulls?)

NoQ added a comment.Apr 29 2019, 7:43 PM

The whole AST consists in passing raw unannotated pointers around and i suspect it'll be annoying to deal with Stmt &s and Decl &s specifically in the Analyzer when all AST APIs accept pointers.

I guess we'll have to go with some sort of nullability annotations, yeah. But first we need to fix Static Analyzer false positives on LLVM :)

This revision was automatically updated to reflect the committed changes.