blob: e43d8f867d849f24d3d6ed0db15b2d0ba4735f87 [file] [log] [blame]
Albert Gutowski727ab8a2016-09-14 21:19:43 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s -fms-extensions
2
3void f() {
4 (void)_byteswap_ushort(42); // expected-warning{{implicitly declaring library function '_byteswap_ushort}} \
5 // expected-note{{include the header <stdlib.h> or explicitly provide a declaration for '_byteswap_ushort'}}
6 (void)_byteswap_uint64(42LL); // expected-warning{{implicitly declaring library function '_byteswap_uint64}} \
7 // expected-note{{include the header <stdlib.h> or explicitly provide a declaration for '_byteswap_uint64'}}
8}
9
10void _byteswap_ulong(); // expected-warning{{incompatible redeclaration of library function '_byteswap_ulong'}} \
11// expected-note{{'_byteswap_ulong' is a builtin}}
12
13unsigned short _byteswap_ushort(unsigned short);
14unsigned long long _byteswap_uint64(unsigned long long);
15
16void g() {
17 (void)_byteswap_ushort(42);
18 (void)_byteswap_uint64(42LL);
19}