aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Sema/warn-outof-range-assign-enum.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-05-Wassign-enum: compare unqualified typesDmitri Gribenko1-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
2013-06-06Fix a crash with -Wassign-enum, where we didn't adjust the APInt type of theJoey Gouly1-0/+12
constant. Also fix some spelling mistakes and formatting issues. Reviewed by Richard Smith over IRC. Fixes PR15069. llvm-svn: 183409
2012-07-17Issue warning when assigning out-of-range integer values to enums.Fariborz Jahanian1-0/+32
Due to performance cost, this is an opt-in option placed under -Wassign-enum. // rdar://11824807 llvm-svn: 160382