Debian Codegraph @

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

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