This is an archive of the discontinued LLVM Phabricator instance.

Remove uneeded CopyType from BlockPointerSyntheticFrontEnd
ClosedPublic

Authored by shafik on Feb 9 2021, 1:35 PM.

Details

Summary

BlockPointerSyntheticFrontEnd does a CopyType which results in it copying the type back into its own context. This will result in a call to ASTImporterDelegate::setOrigin with &decl->getASTContext() == origin.ctx this can result in an infinite recursion later on in ASTImporter since it will attempt to find the decl in its origin which will be itself.

See: rdar://problem/73618836

Diff Detail

Event Timeline

shafik requested review of this revision.Feb 9 2021, 1:35 PM
shafik created this revision.
teemperor accepted this revision.Feb 9 2021, 1:39 PM

LGTM, thank you!

lldb/test/API/lang/c/blocks/main.c
10

4 spaces indentation instead of 3 (2 would probably be better, but this was already written with 4 so let's just keep the file in one code style).

This revision is now accepted and ready to land.Feb 9 2021, 1:39 PM
shafik edited the summary of this revision. (Show Details)Feb 9 2021, 1:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2021, 4:11 PM