llvm-project/clang/test/SemaCXX/attr-flag-enum-reject.cpp
Alexis Hunt 724f14e75c Create a new 'flag_enum' attribute.
This attribute serves as a hint to improve warnings about the ranges of
enumerators used as flag types. It currently has no working C++ implementation
due to different semantics for enums in C++. For more explanation, see the docs
and testcases.

Reviewed by Aaron Ballman.

llvm-svn: 222906
2014-11-28 00:53:20 +00:00

5 lines
140 B
C++

// RUN: %clang_cc1 -verify -fsyntax-only -x c++ -Wassign-enum %s
enum __attribute__((flag_enum)) flag { // expected-warning {{ignored}}
};