blob: 19d8dcab6607388336e6124780c16d535c572547 [file] [log] [blame]
Joel E. Denny32348872019-04-23 17:04:15 +00001// RUN: %clang_cc1 -std=c++14 -fsyntax-only %s
2
3#include <limits.h>
4
5constexpr unsigned inc() {
6 unsigned i = INT_MAX;
7 ++i; // should not warn value is outside range
8 return i;
9}
10
11constexpr unsigned dec() {
12 unsigned i = INT_MIN;
13 --i; // should not warn value is outside range
14 return i;
15}