Mercurial > hg > CbC > CbC_llvm
view clang/test/SemaCXX/constexpr-unsigned-high-bit.cpp @ 221:79ff65ed7e25
LLVM12 Original
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 15 Jun 2021 19:15:29 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line source
// 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; }