not-null-terminated-result-cxx.h
2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//===- not-null-terminated-result-cxx.h - Helper header ---------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This header helps to maintain every function call checked by the
// NotNullTerminatedResult checker.
//
//===----------------------------------------------------------------------===//
#pragma clang system_header
#include "not-null-terminated-result-c.h"
namespace std {
template <typename T>
struct basic_string {
basic_string();
const T *data() const;
unsigned long size() const;
unsigned long length() const;
};
typedef basic_string<char> string;
} // namespace std
size_t wcslen(const wchar_t *str);
template <size_t size>
char *strcpy(char (&dest)[size], const char *src);
template <size_t size>
wchar_t *wcscpy(wchar_t (&dest)[size], const wchar_t *src);
wchar_t *wcscpy(wchar_t *dest, const wchar_t *src);
template <size_t size>
errno_t strcpy_s(char (&dest)[size], const char *src);
template <size_t size>
errno_t wcscpy_s(wchar_t (&dest)[size], const wchar_t *src);
errno_t wcscpy_s(wchar_t *dest, size_t destSize, const wchar_t *src);
template <size_t size>
char *strncpy(char (&dest)[size], const char *src, size_t count);
template <size_t size>
wchar_t *wcsncpy(wchar_t (&dest)[size], const wchar_t *src, size_t count);
wchar_t *wcsncpy(wchar_t *dest, const wchar_t *src, size_t count);
template <size_t size>
errno_t strncpy_s(char (&dest)[size], const char *src, size_t count);
template <size_t size>
errno_t wcsncpy_s(wchar_t (&dest)[size], const wchar_t *src, size_t length);
errno_t wcsncpy_s(wchar_t *dest, size_t destSize, const wchar_t *src, size_t c);
wchar_t *wmemcpy(wchar_t *dest, const wchar_t *src, size_t count);
errno_t wmemcpy_s(wchar_t *dest, size_t destSize, const wchar_t *src, size_t c);
wchar_t *wcschr(const wchar_t *str, int c);
int wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t count);
size_t wcsxfrm(wchar_t *dest, const wchar_t *src, size_t count);
void *wmemchr(const void *buffer, int c, size_t count);
void *wmemmove(void *dest, const void *src, size_t count);
errno_t wmemmove_s(void *dest, size_t destSize, const void *src, size_t count);
void *wmemset(void *dest, int c, size_t count);