summaryrefslogtreecommitdiff
path: root/test/SemaCXX/enum-scoped.cpp
Commit message (Collapse)AuthorAge
* PR18551: accepts invalid strong enum to bool when operator! is usedAlp Toker2014-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199627 91177308-0d34-0410-b5e6-96231b3b80d8
* Diagnose enum redeclarations properlyAlp Toker2014-01-06
| | | | | | | | | | | | | | | | | | In all three checks, the note indicates a previous declaration and never a 'use'. Before: enum-scoped.cpp:92:6: note: previous use is here enum Redeclare6 : int; ^ After: enum-scoped.cpp:92:6: note: previous declaration is here enum Redeclare6 : int; ^ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198600 91177308-0d34-0410-b5e6-96231b3b80d8
* PR18044: Reject declarations of enumtype::X early to avoid an assertion inRichard Smith2013-11-25
| | | | | | | downstream code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195687 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly skip type sugar when determining the width of an enum type. DerivedRichard Smith2013-10-15
| | | | | | | from a patch by Justin Bogner. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192671 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow unary negation on scoped enums.Eli Friedman2013-08-16
| | | | | | PR16900. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188511 91177308-0d34-0410-b5e6-96231b3b80d8
* PR15633: Note that we are EnteringContext when parsing the nested nameRichard Smith2013-04-01
| | | | | | | | specifier for an enumeration. Also fix a crash-on-invalid if a non-dependent name specifier is used to declare an enum template. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178502 91177308-0d34-0410-b5e6-96231b3b80d8
* Relaxed enumeration constant naming rules for scoped enumerators so they no ↵Aaron Ballman2012-07-19
| | | | | | longer emit a diagnostic when the enumeration's name matches that of the class. Fixes PR13128. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160490 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle instantiations of redeclarations of forward-declared enumerations withinRichard Smith2012-03-26
| | | | | | | | templated functions. Build a redeclaration chain, and only instantiate the definition of the enum when visiting the defining declaration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153427 91177308-0d34-0410-b5e6-96231b3b80d8
* Delay checking of dependent underlying types for redeclarations of memberRichard Smith2012-03-26
| | | | | | | enumerations in templates until the template is instantiated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153426 91177308-0d34-0410-b5e6-96231b3b80d8
* When defining a forward-declared enum, don't try to attach the definition toRichard Smith2012-03-23
| | | | | | | | a previous declaration if the redeclaration is invalid. That way lies madness. Fixes a crash-on-invalid reported by Abramo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153349 91177308-0d34-0410-b5e6-96231b3b80d8
* Slightly tweak this condition. "isTransparentContext()" was checking whether anNick Lewycky2012-03-10
| | | | | | | | | enum is scoped or not, which is not relevant here. Instead, phrase the loop in the same terms that the standard uses, instead of this awkward set of conditions that is *nearly* equal. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152489 91177308-0d34-0410-b5e6-96231b3b80d8
* Loosen the precondition of isCXXInstanceMember() to simply returnDouglas Gregor2012-03-08
| | | | | | | "false" for declarations that aren't members of classes. Fixes PR12106. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152284 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't allow a value of a scoped enumeration to be used as the first bound for anRichard Smith2012-02-04
| | | | | | | | array new expression. This lays some groundwork for the implicit conversion to integral or unscoped enumeration which C++11 ICEs undergo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149772 91177308-0d34-0410-b5e6-96231b3b80d8
* constexpr: converted constant expression handling for enumerator values, caseRichard Smith2012-01-18
| | | | | | | | | | | values and non-type template arguments of integral and enumeration types. This change causes some legal C++98 code to no longer compile in C++11 mode, by enforcing the C++11 rule that narrowing integral conversions are not permitted in the final implicit conversion sequence for the above cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148439 91177308-0d34-0410-b5e6-96231b3b80d8
* Update C++11 scoped enumeration support to match the final proposal:Richard Smith2012-01-10
| | | | | | | | | - reject definitions of enums within friend declarations - require 'enum', not 'enum class', for non-declaring references to scoped enumerations git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147824 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure we perform lvalue-to-rvalue conversions for enum initializers. ↵Eli Friedman2011-12-06
| | | | | | PR11484. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145874 91177308-0d34-0410-b5e6-96231b3b80d8
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-13
| | | | | | | -std=c++0x. Patch by Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141900 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed enum types can be complete without actually being valid to useJohn McCall2011-07-06
| | | | | | | | | as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134479 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly protect colons when parsing a nested-name-specifier as partJohn McCall2011-07-06
| | | | | | | | | of an enum specifier in dialects which permit fixed underlying types. Fixes the rejects-valid part of PR10264. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134468 91177308-0d34-0410-b5e6-96231b3b80d8
* Scoped enumerations should not be treated as integer types (in the CDouglas Gregor2011-05-05
| | | | | | | | | sense). Fixes <rdar://problem/9366066> by eliminating an inconsistency between C++ overloading (which handled scoped enumerations correctly) and C binary operator type-checking (which didn't). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130924 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement comparison of C++0x scoped enumeration types. Fixes PR9333.Douglas Gregor2011-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126752 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a little bug in the handling of enumeration types with a fixedDouglas Gregor2011-02-22
| | | | | | | | underlying type: we weren't parsing unnamed enumeration types with a fixed underlying type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126184 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked aDouglas Gregor2010-10-08
bit by me). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8