Page MenuHomePhabricator

[lldb] Fix another instance where we pass a nullptr as TypeSourceInfo to NonTypeTemplateParmDecl::Create
ClosedPublic

Authored by teemperor on Feb 4 2020, 1:26 AM.

Details

Summary

Follow up to an issue pointed out in the review of D73808. We shouldn't just pass in a nullptr TypeSourceInfo
in case Clang decided to access it.

Diff Detail

Event Timeline

teemperor created this revision.Feb 4 2020, 1:26 AM
teemperor updated this revision to Diff 242339.Feb 4 2020, 7:50 AM
teemperor edited the summary of this revision. (Show Details)
  • Fix a typo.
vsk accepted this revision.Feb 4 2020, 9:24 AM

lgtm, thanks!

This revision is now accepted and ready to land.Feb 4 2020, 9:24 AM
In D73946#1857244, @vsk wrote:

I think assigning a nullptr is fin as the constructor doesn't deference it. But I guess touching the decl in wrong way will cause Clang to touch the TypeSourceInfo?

vsk added a comment.Feb 4 2020, 10:31 AM
In D73946#1857244, @vsk wrote:

I think assigning a nullptr is fin as the constructor doesn't deference it. But I guess touching the decl in wrong way will cause Clang to touch the TypeSourceInfo?

Makes sense.

shafik accepted this revision.Feb 10 2020, 10:15 AM

Thank you fixing this!

This revision was automatically updated to reflect the committed changes.