[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / ms-keyword-system-header.c
blob0332ac70b01ba10eb94078581e7d71078373a76c
1 // RUN: %clang_cc1 -fms-extensions -D MS -isystem %S/Inputs %s -fsyntax-only -verify
2 // RUN: %clang_cc1 -fms-extensions -D MS -Wno-keyword-compat -I %S/Inputs %s -fsyntax-only -verify
3 // RUN: %clang_cc1 -fms-extensions -D MS -D NOT_SYSTEM -I %S/Inputs %s -fsyntax-only -verify
4 // RUN: %clang_cc1 -isystem %S/Inputs %s -fsyntax-only -verify
6 // PR17824: GNU libc uses MS keyword __uptr as an identifier in C mode
7 #include <ms-keyword-system-header.h>
9 void fn(void) {
10 WS ws;
11 ws.__uptr = 0;
12 #ifdef MS
13 // expected-error@-2 {{expected identifier}}
14 #else
15 // expected-no-diagnostics
16 #endif