brintos

brintos / llvm-project-archived public Read only

0
0
Text · 432 B · 25f2c71 Raw
17 lines · cpp
1// RUN: %check_clang_tidy -expect-clang-tidy-error %s readability-identifier-naming %t2 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. conversion13  // operators).14  if (Foo()) {}15}16}17