aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/cxx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/ByteCode/cxx11.cpp')
-rw-r--r--clang/test/AST/ByteCode/cxx11.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/AST/ByteCode/cxx11.cpp b/clang/test/AST/ByteCode/cxx11.cpp
index 72bc762..8efd320 100644
--- a/clang/test/AST/ByteCode/cxx11.cpp
+++ b/clang/test/AST/ByteCode/cxx11.cpp
@@ -146,6 +146,14 @@ void testValueInRangeOfEnumerationValues() {
const NumberType neg_one = (NumberType) ((NumberType) 0 - (NumberType) 1); // ok, not a constant expression context
}
+struct EnumTest {
+ enum type {
+ Type1,
+ BOUND
+ };
+ static const type binding_completed = type(BOUND + 1); // both-error {{in-class initializer for static data member is not a constant expression}} \
+ // both-note {{integer value 2 is outside the valid range of values}}
+};
template<class T, unsigned size> struct Bitfield {
static constexpr T max = static_cast<T>((1 << size) - 1);