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
/
SemaTemplate
/
non-integral-switch-cond.cpp
blob
23c8e0ef8d4e11e981c8fedb58c9c40e8087a534
1
// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3
struct
NOT_AN_INTEGRAL_TYPE
{};
4
5
template
<
typename T
>
6
struct
foo
{
7
NOT_AN_INTEGRAL_TYPE Bad
;
8
void
run
() {
9
switch
(
Bad
) {
// expected-error {{statement requires expression of integer type ('NOT_AN_INTEGRAL_TYPE' invalid)}}
10
case
0
:
11
break
;
12
}
13
}
14
};