This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Initialize all member variables of `__state` in `<regex>`
ClosedPublic

Authored by var-const on Aug 30 2023, 11:44 PM.

Details

Summary

This is to prevent a GCC warning (
https://github.com/llvm/llvm-project/issues/65132). It looks like
__at_first is always assigned before it's used, but all other member
variables of this struct are initialized in the constructor, so there is
no reason not to initialize __at_first as well.

Diff Detail

Event Timeline

var-const created this revision.Aug 30 2023, 11:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 11:44 PM
var-const requested review of this revision.Aug 30 2023, 11:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 11:44 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Aug 31 2023, 6:42 AM
ldionne added a subscriber: ldionne.

LGTM w/ green CI.

libcxx/include/regex
1462

Typo!

This revision is now accepted and ready to land.Aug 31 2023, 6:42 AM
This revision was landed with ongoing or failed builds.Aug 31 2023, 10:14 PM
This revision was automatically updated to reflect the committed changes.