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
[HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (#117017)
[llvm-project.git]
/
clang
/
test
/
PCH
/
Inputs
/
cxx11-statement-attributes.h
blob
3f85e1fa2b0621f598e9fcd8ba887b0eb0d60be2
1
// To be used with cxx11-statement-attributes.cpp.
2
template
<
const int
N
>
3
int
f
(
int
n
) {
4
switch
(
n
*
N
) {
5
case
0
:
6
n
+=
15
;
7
[[
clang
::
fallthrough
]];
// This shouldn't generate a warning.
8
case
1
:
9
n
+=
20
;
10
case
2
:
// This should generate a warning: "unannotated fallthrough"
11
n
+=
35
;
12
break
;
13
}
14
return
n
;
15
}