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
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git]
/
clang
/
test
/
SemaCXX
/
pr50497-crash-typeid.cpp
blob
3ae61e8279eb3bb59d1b26309ed3cf1070257b67
1
// RUN: %clang_cc1 -verify %s -Wno-unevaluated-expression
2
// Don't crash (PR50497).
3
4
// expected-no-diagnostics
5
namespace
std
{
6
class
type_info
;
7
}
8
9
class
Ex
{
10
// polymorphic
11
virtual
~
Ex
();
12
};
13
void
Frob
(
const
std
::
type_info
&
type
);
14
15
void
Foo
(
Ex
*
ex
) {
16
// generic lambda
17
[=](
auto
rate
) {
18
// typeid
19
Frob
(
typeid
(*
ex
));
20
}(
1
);
21
22
[=](
auto
rate
) {
23
// unevaluated nested typeid
24
Frob
(
typeid
((
typeid
(*
ex
),
ex
)));
25
}(
1
);
26
}