From 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 2 Dec 2012 13:20:44 +0000 Subject: Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2): http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974 --- test/Analysis/Inputs/system-header-simulator-cxx.h | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 test/Analysis/Inputs/system-header-simulator-cxx.h (limited to 'test/Analysis/Inputs/system-header-simulator-cxx.h') diff --git a/test/Analysis/Inputs/system-header-simulator-cxx.h b/test/Analysis/Inputs/system-header-simulator-cxx.h new file mode 100644 index 0000000000000..e762d0a1bdfb2 --- /dev/null +++ b/test/Analysis/Inputs/system-header-simulator-cxx.h @@ -0,0 +1,57 @@ +#pragma clang system_header + +namespace std { + template + struct pair { + T1 first; + T2 second; + + pair() : first(), second() {} + pair(const T1 &a, const T2 &b) : first(a), second(b) {} + + template + pair(const pair &other) : first(other.first), second(other.second) {} + }; + + typedef __typeof__(sizeof(int)) size_t; + + template + class vector { + T *_start; + T *_finish; + T *_end_of_storage; + public: + vector() : _start(0), _finish(0), _end_of_storage(0) {} + ~vector(); + + size_t size() const { + return size_t(_finish - _start); + } + + void push_back(); + T pop_back(); + + T &operator[](size_t n) { + return _start[n]; + } + + const T &operator[](size_t n) const { + return _start[n]; + } + + T *begin() { return _start; } + const T *begin() const { return _start; } + + T *end() { return _finish; } + const T *end() const { return _finish; } + }; + + class exception { + public: + exception() throw(); + virtual ~exception() throw(); + virtual const char *what() const throw() { + return 0; + } + }; +} -- cgit v1.2.3