xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/ms-keyword-system-header.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fms-extensions -D MS -isystem %S/Inputs %s -fsyntax-only -verify
2*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fms-extensions -D MS -Wno-keyword-compat -I %S/Inputs %s -fsyntax-only -verify
3*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fms-extensions -D MS -D NOT_SYSTEM -I %S/Inputs %s -fsyntax-only -verify
4f4a2713aSLionel Sambuc // RUN: %clang_cc1 -isystem %S/Inputs %s -fsyntax-only -verify
5f4a2713aSLionel Sambuc 
6f4a2713aSLionel Sambuc // PR17824: GNU libc uses MS keyword __uptr as an identifier in C mode
7f4a2713aSLionel Sambuc #include <ms-keyword-system-header.h>
8f4a2713aSLionel Sambuc 
fn()9f4a2713aSLionel Sambuc void fn() {
10f4a2713aSLionel Sambuc   WS ws;
11f4a2713aSLionel Sambuc   ws.__uptr = 0;
12f4a2713aSLionel Sambuc #ifdef MS
13f4a2713aSLionel Sambuc   // expected-error@-2 {{expected identifier}}
14f4a2713aSLionel Sambuc #else
15f4a2713aSLionel Sambuc   // expected-no-diagnostics
16f4a2713aSLionel Sambuc #endif
17f4a2713aSLionel Sambuc }
18