Page MenuHomePhabricator

do not use valDecl if it is null
Needs RevisionPublic

Authored by sagi on Nov 5 2017, 1:45 AM.



from the backtrace :

clang::TagType::getDecl (this=0x0)

so I think it is better to check that it is not null before using it.

Diff Detail

Event Timeline

sagi created this revision.Nov 5 2017, 1:45 AM
sagi retitled this revision from do not valDecl if it is null to do not use valDecl if it is null.
jbcoe added a subscriber: jbcoe.Nov 5 2017, 12:47 PM

I'm not qualified to review this fix but i think it would be more compelling if accompanied by a test that fails without the fix.

jbcoe requested changes to this revision.Nov 5 2017, 12:48 PM
This revision now requires changes to proceed.Nov 5 2017, 12:48 PM
sagi added a comment.Nov 5 2017, 8:08 PM

I will add to this review request the test that you added in D37639

jbcoe added a comment.Nov 5 2017, 8:39 PM

The test I wrote for D37639 is not great (nor is the code fixed I proposed). A Python-free test would be much better. Lots of the build bots (to the best of my knowledge) don't run Python tests.