17f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling// RUN: %clang_cc1 -fms-extensions -D MS -isystem %S/Inputs %s -fsyntax-only -verify 203e463e293f5ecf62cb8c807d00edb9fbb1f99d7Bill Wendling// RUN: %clang_cc1 -fms-extensions -D MS -Wno-keyword-compat -I %S/Inputs %s -fsyntax-only -verify 303e463e293f5ecf62cb8c807d00edb9fbb1f99d7Bill Wendling// RUN: %clang_cc1 -fms-extensions -D MS -D NOT_SYSTEM -I %S/Inputs %s -fsyntax-only -verify 47f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling// RUN: %clang_cc1 -isystem %S/Inputs %s -fsyntax-only -verify 57f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling 67f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling// PR17824: GNU libc uses MS keyword __uptr as an identifier in C mode 77f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling#include <ms-keyword-system-header.h> 87f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling 97f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendlingvoid fn() { 107f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling WS ws; 117f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling ws.__uptr = 0; 127f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling#ifdef MS 137f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling // expected-error@-2 {{expected identifier}} 147f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling#else 157f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling // expected-no-diagnostics 167f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling#endif 177f3ec66c405045ae67abf54f728845f36e91baa9Bill Wendling} 18