This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Don't leave Expr::Classification fields uninitialized in default constructor
Needs ReviewPublic

Authored by guiand on Jun 11 2020, 5:37 PM.

Details

Reviewers
rsmith
Summary

This changes Expr::Classification::{Kind, Modifiable} fields so that they are initialized as Unknown rather than left uninitialized. This way, if the default Classification is accidentally used, Clang will fire an assertion.

Diff Detail

Event Timeline

guiand created this revision.Jun 11 2020, 5:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 11 2020, 5:37 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
guiand edited the summary of this revision. (Show Details)Jun 11 2020, 5:38 PM

Compiler warning should already catch this