| 1 |
// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility |
| 2 |
|
| 3 |
// PR15845 |
| 4 |
int foo(xxx); // expected-error{{unknown type name}} |
| 5 |
|
| 6 |
struct cls { |
| 7 |
char *m; |
| 8 |
}; |
| 9 |
|
| 10 |
char * cls::* __uptr wrong2 = &cls::m; // expected-error {{'__uptr' attribute cannot be used with pointers to members}} |
| 11 |
|
| 12 |
// Microsoft allows inline, __inline, and __forceinline to appear on a typedef |
| 13 |
// of a function type, but only in C. See GitHub #124869 for more details. |
| 14 |
typedef int inline Foo1(int); // expected-error {{'inline' can only appear on functions}} |
| 15 |
typedef int __inline Foo2(int); // expected-error {{'inline' can only appear on functions}} |
| 16 |
typedef int __forceinline Foo(int); // expected-error {{'inline' can only appear on functions}} \ |
| 17 |
expected-warning {{'__forceinline' attribute only applies to functions and statements}} |