This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add the check of membership in decltype for the issue #58674
ClosedPublic

Authored by lime on Jan 24 2023, 1:03 AM.

Details

Summary

D137531 had once fixed the issue. However, it caused a crash during compiling
llvm/unittests/IR/PatternMatch.cpp in stage-2. The reason is the predicator
isDerivedFrom does not consider independent types if the derived type is
dependent.

This patch improves D137531 by adding an option to make isDerivedFrom consider
independent types.

Diff Detail

Event Timeline

lime created this revision.Jan 24 2023, 1:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 1:03 AM
Herald added a subscriber: yaxunl. · View Herald Transcript
lime requested review of this revision.Jan 24 2023, 1:03 AM
lime updated this revision to Diff 491717.Jan 24 2023, 5:02 AM
erichkeane accepted this revision.Jan 24 2023, 5:52 AM

1 nit, otherwise I don't have concerns.

clang/lib/Sema/SemaExpr.cpp
2717
This revision is now accepted and ready to land.Jan 24 2023, 5:52 AM
shafik added a subscriber: shafik.Jan 24 2023, 9:42 AM

FYI, I was looking at similar issues over the weekend and put up this PR: https://reviews.llvm.org/D142490

lime updated this revision to Diff 491981.Jan 24 2023, 6:39 PM

Updated as suggested.

lime updated this revision to Diff 493055.Jan 28 2023, 7:36 PM
lime updated this revision to Diff 493057.Jan 28 2023, 7:55 PM
lime updated this revision to Diff 493058.Jan 28 2023, 7:59 PM
Harbormaster completed remote builds in B210580: Diff 493055.
This revision was landed with ongoing or failed builds.Jan 28 2023, 9:51 PM
This revision was automatically updated to reflect the committed changes.