[PATCH] D92936: [Sema] Fix deleted function problem in implicitly movable test

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 3 08:36:47 PST 2021


Quuxplusone added a comment.

In D92936#2476356 <https://reviews.llvm.org/D92936#2476356>, @vitalybuka wrote:

> Something is not initialized
> http://lab.llvm.org:8011/#/builders/74/builds/1834/steps/9/logs/stdio

Confirmed; @nullptr.cpp what do you want to do about this? I hypothesize that maybe you're not allowed to look at `Seq.getFailedOverloadResult()` (nor `Seq.getFailedCandidateSet()`) unless `Seq.getFailureKind()` is one of `FK_ConstructorOverloadFailed`, `FK_UserConversionOverloadFailed`, `FK_ReferenceInitOverloadFailed`, or `FK_ListConstructorOverloadFailed`.  The ctor `InitializationSequence::InitializationSequence` member-initializes `FailedCandidateSet` but does not member-initialize `FailedOverloadResult`. Perhaps the appropriate fix would be

  --- a/clang/lib/Sema/SemaInit.cpp
  +++ b/clang/lib/Sema/SemaInit.cpp
  @@ -5595,7 +5595,8 @@ InitializationSequence::InitializationSequence(Sema &S,
                                                  MultiExprArg Args,
                                                  bool TopLevelOfInitList,
                                                  bool TreatUnavailableAsInvalid)
  -    : FailedCandidateSet(Kind.getLocation(), OverloadCandidateSet::CSK_Normal) {
  +    : FailedOverloadResult(OR_Success),
  +      FailedCandidateSet(Kind.getLocation(), OverloadCandidateSet::CSK_Normal) {
     InitializeFrom(S, Entity, Kind, Args, TopLevelOfInitList,
                    TreatUnavailableAsInvalid);

I've tested this locally and it doesn't cause any new tests to fail (whew!), but I haven't rebuilt everything with MSAN to see if this satisfies Vitaly's buildbot (and in fact since I'm on OSX I don't think I //can// rebuild with MSAN because OSX doesn't support MSAN).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92936/new/

https://reviews.llvm.org/D92936



More information about the cfe-commits mailing list