[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / typo-correction-no-hang.c
blobe6041704ff324199668333fb6d9959256f5002f1
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR50797
4 struct a {
5 int xxx; // expected-note {{'xxx' declared here}}
6 };
8 int g_107;
9 int g_108;
10 int g_109;
12 struct a g_999; // expected-note 4{{'g_999' declared here}}
14 void b(void) { (g_910.xxx = g_910.xxx); } //expected-error 2{{use of undeclared identifier 'g_910'; did you mean 'g_999'}}
16 void c(void) { (g_910.xxx = g_910.xxx1); } //expected-error 2{{use of undeclared identifier 'g_910'; did you mean 'g_999'}} \
17 expected-error {{no member named 'xxx1' in 'struct a'; did you mean 'xxx'}}