brintos

brintos / llvm-project-archived public Read only

0
0
Text · 879 B · 391977e Raw
18 lines · cpp
1// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility2 3// PR158454int foo(xxx); // expected-error{{unknown type name}}5 6struct cls {7  char *m;8};9 10char * 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 typedef13// of a function type, but only in C. See GitHub #124869 for more details.14typedef int inline Foo1(int);       // expected-error {{'inline' can only appear on functions}}15typedef int __inline Foo2(int);     // expected-error {{'inline' can only appear on functions}}16typedef int __forceinline Foo(int); // expected-error {{'inline' can only appear on functions}} \17                                       expected-warning {{'__forceinline' attribute only applies to functions and statements}}18