blob: 93cf90ba452f0e68ef705f93e4da0703255fca9a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only %s
// Test that the CFG builder handles destructors and gotos jumping between
// scope boundaries. Previously this crashed (PR 10620).
struct S_10620 {
S_10620(const S_10620 &x);
~S_10620();
};
void PR10620(int x, const S_10620& s) {
if (x) {
goto done;
}
const S_10620 s2(s);
done:
;
}
void PR10620_2(int x, const S_10620& s) {
if (x)
goto done;
const S_10620 s2(s);
done:
;
}
|