This is an archive of the discontinued LLVM Phabricator instance.

[Clang][Sema] Avoid crashing for va_arg expressions with bool argument
ClosedPublic

Authored by egorzhdan on Dec 24 2021, 1:20 PM.

Details

Summary

This change fixes a compiler crash that was introduced in https://reviews.llvm.org/D103611: Sema::BuildVAArgExpr attempted to retrieve a corresponding signed type for bool by calling ASTContext::getCorrespondingSignedType.

rdar://86580370

Diff Detail

Event Timeline

egorzhdan requested review of this revision.Dec 24 2021, 1:20 PM
egorzhdan created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 24 2021, 1:20 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman accepted this revision.Jan 5 2022, 12:23 PM
aaron.ballman added a subscriber: tstellar.

LGTM, thank you for the fix!

I think this would also be a reasonable candidate for a 13.0.X release, in case you wanted to file an issue to backport it. I think 13.0.1 may be too late to hit though. CCing @tstellar just in case.

This revision is now accepted and ready to land.Jan 5 2022, 12:23 PM
This revision was landed with ongoing or failed builds.Jan 7 2022, 1:41 AM
This revision was automatically updated to reflect the committed changes.

Thank you @aaron.ballman, I will try to get this patch into the next 13.0.x release.

We may have time to fit it in to the release, but no guarantees. Can you file an issue for this?

We may have time to fit it in to the release, but no guarantees. Can you file an issue for this?

That would be great. I filed an issue: https://github.com/llvm/llvm-project/issues/53078.