checkedc / checkedc-llvm-project

This repo contains a version of clang that is modified to support Checked C. Checked C is an extension to C that lets programmers write C code with bounds checking and improved type-safety.
13 stars 19 forks source link

Fix compiler assert involving a bound-safe interface with a typedef'ed type. #1227

Closed dtarditi closed 8 months ago

dtarditi commented 8 months ago

This fixes issue #1200. The conversion of a pointer-typed variable with a bounds-safe interface to an unchecked pointer type was failing when the bound-safe interface type used a typedef'ed type. There was an assertion that a type had not been canonicalized. The fix is to use the canonicalized version of the bounds-safe interface type in the conversion code. This change includes a test case for the failure.