HomePhabricator

[clang-tidy] Fix null pointer dereference in readability-identifier-naming

Description

[clang-tidy] Fix null pointer dereference in readability-identifier-naming

Summary:
readability-identifier-naming causes a null pointer dereference when checking an identifier introduced by a structured binding whose right hand side is an undeclared identifier.

Running the check on a file that is just the following results in a crash:

auto [left] = right;

Patch by Mark Stegeman!

Reviewers: alexfh, hokein, aaron.ballman, JonasToth

Reviewed By: hokein, aaron.ballman

Subscribers: madsravn, xazax.hun, cfe-commits

Tags: #clang-tools-extra, #clang

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

Details

Committed
hokeinMay 28 2019, 4:54 AM
Reviewer
hokein
Differential Revision
D62404: [clang-tidy] Fix null pointer dereference in readability-identifier-naming
Branches
Unknown
Tags
Unknown