This is an archive of the discontinued LLVM Phabricator instance.

[HIP][OpenMP] Fix assertion in deferred diag due to incomplete class definition
ClosedPublic

Authored by yaxunl on Oct 21 2021, 10:06 AM.

Details

Summary

Fix assertion in UsedDeclVisitor where clang is trying to look up a destructor for
a forward declared class.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=52250

Diff Detail

Event Timeline

yaxunl created this revision.Oct 21 2021, 10:06 AM
yaxunl requested review of this revision.Oct 21 2021, 10:06 AM
tra added a reviewer: rsmith.Oct 21 2021, 10:21 AM
tra added a subscriber: rsmith.

Looks reasonable to me, but, considering that it's generic C++ code, I think it would be prudent go double check that.

@rsmith - WDYT?

rjmccall accepted this revision.Oct 23 2021, 10:58 PM

Minor grammar nit with a comment, but otherwise LGTM.

clang/test/OpenMP/deferred-diags.cpp
40

"Test that deleting an incomplete class type doesn't cause an assertion."

This revision is now accepted and ready to land.Oct 23 2021, 10:58 PM
yaxunl marked an inline comment as done.Oct 25 2021, 7:18 AM
yaxunl added inline comments.
clang/test/OpenMP/deferred-diags.cpp
40

will do when committing

This revision was landed with ongoing or failed builds.Oct 25 2021, 8:08 AM
This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2021, 8:08 AM