You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
298 B

// RUN: %clang_cc1 -std=c++14 -fsyntax-only %s
#include <limits.h>
constexpr unsigned inc() {
unsigned i = INT_MAX;
++i; // should not warn value is outside range
return i;
}
constexpr unsigned dec() {
unsigned i = INT_MIN;
--i; // should not warn value is outside range
return i;
}