Commit Graph

4 Commits

Author SHA1 Message Date
David Majnemer 6a42665f9f Revert "Properly consider the range of enum for range comparisons in C mode"
The approach r183084 took was wrong, back it out.

llvm-svn: 183575
2013-06-07 22:07:20 +00:00
David Majnemer 3fbb763a92 Properly consider the range of enum for range comparisons in C mode
In some cases, clang applies the C++ rules for computing the range of a
value when said value is an enum.

Instead, apply C semantics when in C mode.

llvm-svn: 183084
2013-06-02 08:11:22 +00:00
Fariborz Jahanian 2f4e33aba2 Improvements to my patch in r164143 per
Richard's comments. // rdar://12202422

llvm-svn: 164316
2012-09-20 19:36:41 +00:00
Fariborz Jahanian b1885425c4 c: warn when an integer value comparison with an
integral expression have the obvious result.
Patch reviewed by John McCall off line.
// rdar://12202422

llvm-svn: 164143
2012-09-18 17:37:21 +00:00