summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/enum-bitfield.cpp
Commit message (Collapse)AuthorAgeFilesLines
* In C++11 mode, when an integral constant expression is desired and we have aRichard Smith2012-02-041-1/+1
| | | | | | | | | | | | | | | | | | value of class type, look for a unique conversion operator converting to integral or unscoped enumeration type and use that. Implements [expr.const]p5. Sema::VerifyIntegerConstantExpression now performs the conversion and returns the converted result. Some important callers of Expr::isIntegralConstantExpr have been switched over to using it (including all of those required for C++11 conformance); this switch brings a side-benefit of improved diagnostics and, in several cases, simpler code. However, some language extensions and attributes have not been moved across and will not perform implicit conversions on constant expressions of literal class type where an ICE is required. In passing, fix static_assert to perform a contextual conversion to bool on its argument. llvm-svn: 149776
* Pedantic diagnostic correction: in C++, we have integral constant expressions,Richard Smith2012-01-151-1/+1
| | | | | | | | not integer constant expressions. In passing, fix the 'folding is an extension' diagnostic to not claim we're accepting the code, since that's not true in -pedantic-errors mode, and add this diagnostic to -Wgnu. llvm-svn: 148209
* PR11614: Mark defaulted special constructors as constexpr if their implicitRichard Smith2011-12-221-2/+2
| | | | | | definition would satisfy the constexpr requirements. llvm-svn: 147128
* Add checks and diagnostics for many of the cases which C++11 considers to notRichard Smith2011-12-131-2/+2
| | | | | | be constant expressions. llvm-svn: 146479
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* After parsing a ':' in an enum-specifier within class context,Douglas Gregor2010-12-011-0/+18
disambiguate between an expression (for a bit-field width) and a type (for a fixed underlying type). Since the disambiguation can be expensive (due to tentative parsing), we perform a simplistic disambiguation based on one-token lookahead before going into the full-blown tentative parsing. Based on a patch by Daniel Wallin. llvm-svn: 120582
OpenPOWER on IntegriCloud