repo.or.cz
/
llvm-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git]
/
clang
/
test
/
Sema
/
warn-memset-bad-sizeof.c
blob
c4768d8d0edd2faa7855d273edb65476d6dbe7c1
1
// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3
// expected-no-diagnostics
4
5
typedef
__SIZE_TYPE__
size_t
;
6
void
*
memset
(
void
*,
int
,
size_t
);
7
8
typedef
struct
{
9
int
a
;
10
}
S
;
11
12
void
test
() {
13
S s
;
14
__auto_type dstptr
= &
s
;
15
memset
(
dstptr
,
0
,
sizeof
(
s
));
16
}