summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-outof-range-assign-enum.c
Commit message (Collapse)AuthorAgeFilesLines
* -Wassign-enum: compare unqualified typesDmitri Gribenko2013-12-051-0/+18
| | | | | | | | | | | | | | This commit changes -Wassign-enum to compare unqualified types. One could think that this does not matter much, because who wants a value of enum type that is const-qualified? But this breaks the intended pattern to silence this warning with an explicit cast: static const enum Foo z = (enum Foo) 42; In this case, source type is 'enum Foo', and destination type is 'const enum Foo', and if we compare qualified types, they don't match, so we used warn. llvm-svn: 196548
* Fix a crash with -Wassign-enum, where we didn't adjust the APInt type of theJoey Gouly2013-06-061-0/+12
| | | | | | | | | | constant. Also fix some spelling mistakes and formatting issues. Reviewed by Richard Smith over IRC. Fixes PR15069. llvm-svn: 183409
* Issue warning when assigning out-of-range integer values to enums.Fariborz Jahanian2012-07-171-0/+32
Due to performance cost, this is an opt-in option placed under -Wassign-enum. // rdar://11824807 llvm-svn: 160382
OpenPOWER on IntegriCloud