This is an archive of the discontinued LLVM Phabricator instance.

Fix a crash when casting _Complex and ignoring the results
ClosedPublic

Authored by aaron.ballman on Jan 28 2020, 5:35 AM.

Details

Summary

Performing a cast where the result is ignored causes Clang to crash when performing codegen for the conversion:

_Complex int a;
void fn1() { (_Complex double) a; }

This patch addresses the crash by not trying to emit the scalar conversions, causing it to be a noop. Fixes PR44624.

Diff Detail

Event Timeline

aaron.ballman created this revision.Jan 28 2020, 5:35 AM
This revision is now accepted and ready to land.Jan 28 2020, 9:54 AM