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
[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git]
/
clang
/
test
/
SemaCXX
/
constexpr-unsigned-high-bit.cpp
blob
19d8dcab6607388336e6124780c16d535c572547
1
// RUN: %clang_cc1 -std=c++14 -fsyntax-only %s
2
3
#include <limits.h>
4
5
constexpr
unsigned
inc
() {
6
unsigned
i
=
INT_MAX
;
7
++
i
;
// should not warn value is outside range
8
return
i
;
9
}
10
11
constexpr
unsigned
dec
() {
12
unsigned
i
=
INT_MIN
;
13
--
i
;
// should not warn value is outside range
14
return
i
;
15
}