This is an archive of the discontinued LLVM Phabricator instance.

[Clang][Interp] Diagnose uninitialized ctor of global record arrays
ClosedPublic

Authored by hazohelet on Jun 9 2023, 9:12 AM.

Details

Summary

This patch adds a check for uninitialized subobjects of global variables that are record arrays.
e.g. constexpr Foo f[2];

Diff Detail

Event Timeline

hazohelet created this revision.Jun 9 2023, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 9:12 AM
hazohelet requested review of this revision.Jun 9 2023, 9:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2023, 9:12 AM
tbaeder added inline comments.Jun 15 2023, 4:39 AM
clang/test/AST/Interp/cxx20.cpp
177

We usually have a space after the ; and keep the comments aligned on the //.

hazohelet marked an inline comment as done.

Address comment from @tbaeder

  • NFC stylistic change in test
tbaeder accepted this revision.Jun 19 2023, 7:52 AM

LGTM

This revision is now accepted and ready to land.Jun 19 2023, 7:52 AM