[PATCH] Don't crash on reporting lambda diagnostics

Aaron Ballman aaron at aaronballman.com
Thu Apr 23 08:31:46 PDT 2015


Ping

On Fri, Apr 10, 2015 at 10:08 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
> PR23021 demonstrates a case where diagnostic reporting on an inner
> lambda would crash due to a null pointer dereference. Since captures
> happen from calling ParseParameterDeclarationClause, which is before
> the semantic lambda object is created, another mechanism is required
> to get the lambda introducer location.
>
> This patch addresses it by storing the introducer location into the
> scope object directly, and using that location when reporting the
> diagnostics. The result is the same, but no longer relies on a lambda
> object being created first.
>
> ~Aaron



More information about the cfe-commits mailing list