HomePhabricator

Fix a crash when casting _Complex and ignoring the results.

Authored by aaron.ballman on Jan 28 2020, 10:04 AM.

Description

Fix a crash when casting _Complex and ignoring the results.

Performing a cast where the result is ignored caused 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.

Details

Committed
aaron.ballmanJan 28 2020, 10:05 AM
Parents
rGda6a896e6b1b: [WebAssembly] Add WebAssembly support to llvm-symbolizer
Branches
Unknown
Tags
Unknown