1// RUN: %check_clang_tidy -expect-clang-tidy-error %s readability-identifier-naming %t
2
3// This used to cause a null pointer dereference.
4auto [left] = right;
5// CHECK-MESSAGES: :[[@LINE-1]]:15: error: use of undeclared identifier 'right'
6
7namespace crash_on_nonidentifiers {
8struct Foo {
9 operator bool();
10};
11void foo() {
12 // Make sure we don't crash on non-identifier names (e.g. conversion
13 // operators).
14 if (Foo()) {}
15}
16}
17

source code of clang-tools-extra/test/clang-tidy/checkers/readability/identifier-naming-bugfix.cpp