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
Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git]
/
clang
/
test
/
CXX
/
expr
/
expr.unary
/
expr.new
/
p17-crash.cpp
blob
27b915e95965d7e586c6ebce4111c568ca205064
1
// RUN: %clang_cc1 -emit-llvm-only %s
2
3
// this used to crash due to templ<int>'s dtor not being marked as used by the
4
// new expression in func()
5
struct
non_trivial
{
6
non_trivial
() {}
7
~
non_trivial
() {}
8
};
9
template
<
typename T
>
class
templ
{
10
non_trivial n
;
11
};
12
void
func
() {
13
new
templ
<
int
>[
1
][
1
];
14
}