This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix a crash case when reporting an uninitialized field.
Needs ReviewPublic

Authored by hliao on Dec 17 2021, 3:06 PM.

Details

Reviewers
rsmith
Summary
  • As the initializer list's getSyntacticForm() may return NULL, need to consider the current semantic initalizer list itself as the synatic form. Wrap that together into a new getSourceRange method.

Diff Detail

Unit TestsFailed

Event Timeline

hliao requested review of this revision.Dec 17 2021, 3:06 PM
hliao created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 3:06 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hliao updated this revision to Diff 395248.Dec 17 2021, 6:11 PM

Revise the formatting.