From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- tools/clang-tidy/test/structures.h | 108 +++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 tools/clang-tidy/test/structures.h (limited to 'tools/clang-tidy/test/structures.h') diff --git a/tools/clang-tidy/test/structures.h b/tools/clang-tidy/test/structures.h new file mode 100644 index 0000000000..0966109635 --- /dev/null +++ b/tools/clang-tidy/test/structures.h @@ -0,0 +1,108 @@ +// Proxy file in order to define generic data types, to avoid binding with system headers + +typedef __SIZE_TYPE__ size_t; + +namespace std { + +typedef size_t size_t; + +template +class vector { + public: + typedef T* iterator; + typedef const T* const_iterator; + typedef T& reference; + typedef const T& const_reference; + typedef size_t size_type; + + explicit vector(); + explicit vector(size_type n); + + void swap(vector &other); + void push_back(const T& val); + + template void emplace_back(Args &&... args); + + void reserve(size_t n); + void resize(size_t n); + + size_t size(); + const_reference operator[] (size_type) const; + reference operator[] (size_type); + + const_iterator begin() const; + const_iterator end() const; +}; + +template +class basic_string { +public: + typedef basic_string _Type; + basic_string() {} + basic_string(const T *p); + basic_string(const T *p, size_t count); + basic_string(size_t count, char ch); + ~basic_string() {} + size_t size() const; + bool empty() const; + size_t find (const char* s, size_t pos = 0) const; + const T *c_str() const; + _Type& assign(const T *s); + basic_string &operator=(T ch); + basic_string *operator+=(const basic_string &) {} + friend basic_string operator+(const basic_string &, const basic_string &) {} +}; +typedef basic_string string; +typedef basic_string wstring; + +string to_string(int value); + +template +struct default_delete {}; + +template > +class unique_ptr { + public: + unique_ptr(); + ~unique_ptr(); + explicit unique_ptr(T*); + template + unique_ptr(unique_ptr&&); + T* release(); +}; + +template +class bind_rt {}; + +template +bind_rt bind(Fp &&, Arguments &&...); +} + +typedef unsigned int uid_t; +typedef unsigned int pid_t; + +int bcmp(void *, void *, size_t); +void bcopy(void *, void *, size_t); +void bzero(void *, size_t); + +int getpw(uid_t uid, char *buf); +int setuid(uid_t uid); + +int mkstemp(char *tmpl); +char *mktemp(char *tmpl); + +pid_t vfork(void); + +int abort() { return 0; } + +#define assert(x) \ + if (!(x)) \ + (void)abort() + +size_t strlen(const char *s); +char *strncat(char *s1, const char *s2, size_t); + +void free(void *ptr); +void *malloc(size_t size); + +void *memset(void *b, int c, size_t len); -- cgit v1.2.3