r240376 - Eliminate "enumeration value not handled in switch" warnings
Douglas Katzman
dougk at google.com
Tue Jun 23 08:09:40 PDT 2015
Perhaps, but "else if (getThing().getOtherThing() == const)" ... repeated N
times sounds like 'switch'.
Suggesting to use a syntax about which the compiler won't warn is like the
tail wagging the dog.
At any rate, this was patterned after the constructor for NaCl_TC (also in
ToolChains) which has the same 3-clause switch plus a default: break, and
the symmetry lends to readability.
On Tue, Jun 23, 2015 at 8:50 AM, Nico Weber <thakis at chromium.org> wrote:
> Yes, which is probably why this was an if, not a switch (?)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150623/9084c8cf/attachment.html>
More information about the cfe-commits
mailing list