1 // RUN: %clang_cc1 -triple i686-windows %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
2 // RUN: %clang_cc1 -triple x86_64-windows %s -fsyntax-only -Wmicrosoft -verify -fms-extensions
4 // Check that __ptr32/__ptr64 can be compared.
5 int test_ptr_comparison(int *__ptr32 __uptr p32u
, int *__ptr32 __sptr p32s
,
7 return (p32u
== p32s
) +
13 void bad(T __ptr32 a
) { // expected-error {{'__ptr32' attribute only applies to pointer arguments}}`
17 template<int size_expected
, typename T
>
20 static_assert(sizeof(a
) == size_expected
, "instantiated template argument has unexpected size");
23 // instantiate for default sized pointer
27 void h(int *__ptr32 p
) {
28 // instantiate for 32-bit pointer