repo.or.cz
/
clang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix the clang-wpa example.
[clang.git]
/
test
/
SemaCXX
/
uninitialized.cpp
blob
26202fbccc8176a423a1d5670c1c6bf3c9a039bd
1
// RUN: %clang_cc1 -fsyntax-only -Wall -Wuninitialized -verify %s
2
3
// Previously this triggered a warning on the sizeof(fieldB), indicating
4
// a use of an uninitialized value.
5
class
Rdar8610363_A
{
6
int
fieldA
;
7
public
:
8
Rdar8610363_A
(
int
a
);
9
};
10
class
Rdar8610363_B
{
11
Rdar8610363_A fieldB
;
12
public
:
13
Rdar8610363_B
(
int
b
) :
fieldB
(
sizeof
(
fieldB
)) {}
// no-warning
14
};