HomePhabricator

[Sema] Fix crash in unused-lambda-capture warning for VLAs

Description

[Sema] Fix crash in unused-lambda-capture warning for VLAs

Summary:
Clang was crashing when diagnosing an unused-lambda-capture for a VLA because
From.getVariable() is null for the capture of a VLA bound.
Warning about the VLA bound capture is not helpful, so only warn for the VLA
itself.

Fixes: PR35555

Reviewers: aaron.ballman, dim, rsmith

Reviewed By: aaron.ballman, dim

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D41016

Details

Committed
malcolm.parsonsDec 11 2017, 10:00 AM
Reviewer
aaron.ballman
Differential Revision
D41016: [Sema] Fix crash in unused-lambda-capture warning for VLAs
Branches
Unknown
Tags
Unknown