[PATCH] D17507: The controlling expression for _Generic is unevaluated

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 22 07:55:55 PST 2016


On Mon, Feb 22, 2016 at 10:52 AM, Aaron Ballman <aaron.ballman at gmail.com> wrote:
> aaron.ballman created this revision.
> aaron.ballman added a reviewer: rsmith.
> aaron.ballman added a subscriber: cfe-commits.
>
> In r252104, I fixed a _Generic bug so that the controlling expression has its type decayed and qualifiers stripped. However, this caused a diagnostic regression because the controlling expression is not evaluated, and my fix triggered diagnostics (like null pointer dereferences) that it should not have. This patch fixes the regression by putting the evaluation of the controlling expression into an unevaluated context before decaying and stripping qualifiers.

I should point out that this addresses PR26398
(https://llvm.org/bugs/show_bug.cgi?id=26398).

~Aaron


More information about the cfe-commits mailing list