xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/arm-darwin-aapcs.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -triple thumbv7-apple-ios -target-abi aapcs -verify -fsyntax-only
2*f4a2713aSLionel Sambuc // expected-no-diagnostics
3*f4a2713aSLionel Sambuc 
4*f4a2713aSLionel Sambuc // ARM's AAPCS normally has size_t defined as unsigned int, but on Darwin
5*f4a2713aSLionel Sambuc // some embedded targets use AAPCS with the iOS header files, which define
6*f4a2713aSLionel Sambuc // size_t as unsigned long.  Make sure that works.
7*f4a2713aSLionel Sambuc typedef unsigned long size_t;
8*f4a2713aSLionel Sambuc void* malloc(size_t);
9*f4a2713aSLionel Sambuc void* operator new(size_t size)
10*f4a2713aSLionel Sambuc {
11*f4a2713aSLionel Sambuc   return (malloc(size));
12*f4a2713aSLionel Sambuc }
13