<div dir="ltr">Dug and found <a href="https://github.com/llvm-mirror/llvm/blob/88d207542b618ca6054b24491ddd67f8ca397540/include/llvm/Support/Compiler.h#L233">https://github.com/llvm-mirror/llvm/blob/88d207542b618ca6054b24491ddd67f8ca397540/include/llvm/Support/Compiler.h#L233</a><br><br><br><table class="gmail-highlight" style="box-sizing:border-box;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol";font-size:14px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box"><td class="gmail-blob-code gmail-blob-code-inner" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:sfmono-regular,consolas,"liberation mono",menlo,courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">#<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">if</span> __cplusplus > 201402L && __has_cpp_attribute(fallthrough)
</td></tr><tr style="box-sizing:border-box"><td class="gmail-blob-num" style="box-sizing:border-box;padding:0px;width:50.717px;min-width:50px;font-family:sfmono-regular,consolas,"liberation mono",menlo,courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.298039);text-align:right;white-space:nowrap;vertical-align:top"><a href="https://github.com/llvm-mirror/llvm/blob/88d207542b618ca6054b24491ddd67f8ca397540/include/llvm/Support/Compiler.h#L235" style="box-sizing:border-box;background-color:transparent;color:inherit;text-decoration:none;padding:0px 10px">235</a></td><td class="gmail-blob-code gmail-blob-code-inner" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:sfmono-regular,consolas,"liberation mono",menlo,courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">#<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">define</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)"><span style="box-sizing:border-box;padding:2px;font-weight:600;color:rgb(36,41,46);background-color:rgba(255,255,140,0.498039);border-radius:3px">LLVM_FALLTHROUGH</span></span> [[fallthrough]]</td></tr><tr style="box-sizing:border-box"><td class="gmail-blob-num" style="box-sizing:border-box;padding:0px;width:50.717px;min-width:50px;font-family:sfmono-regular,consolas,"liberation mono",menlo,courier,monospace;font-size:12px;line-height:20px;color:rgba(27,31,35,0.298039);text-align:right;white-space:nowrap;vertical-align:top"><a href="https://github.com/llvm-mirror/llvm/blob/88d207542b618ca6054b24491ddd67f8ca397540/include/llvm/Support/Compiler.h#L236" style="box-sizing:border-box;background-color:transparent;color:inherit;text-decoration:none;padding:0px 10px">236</a></td><td class="gmail-blob-code gmail-blob-code-inner" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:sfmono-regular,consolas,"liberation mono",menlo,courier,monospace;font-size:12px;word-wrap:normal;white-space:pre-wrap">#<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">elif</span> !__cplusplus</td></tr></tbody></table><br>which is for [[fallthrough]] in<br><a href="http://en.cppreference.com/w/cpp/language/attributes">http://en.cppreference.com/w/cpp/language/attributes</a><br><br>which just tells compiler not to emit warning on fall-through.<div><br></div><div>They're all warning removers.</div><div><br></div><div>Kevin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 1, 2017 at 2:59 PM, Robinson, Paul via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I came across a weird-looking use of LLVM_FALLTHROUGH which I think is<br>
completely spurious, but I figured I should check with the group mind<br>
before ripping it out.  Basically, if you have multiple cases with no<br>
code in between, you do *not* need LLVM_FALLTHROUGH, right?<br>
<br>
  switch (Foo) {<br>
  case Bar1:<br>
    LLVM_FALLTHROUGH;  // not needed<br>
  case Bar2:<br>
    some code;<br>
    return;<br>
  case Bar3:<br>
    LLVM_FALLTHROUGH; // not needed<br>
  case Bar4:<br>
    code without a break/return;<br>
    LLVM_FALLTHROUGH; // <-- This one is needed.<br>
  case Bar5:<br>
    more code;<br>
    break;<br>
  default:<br>
    llvm_unreachable("Foo with no Bar");<br>
  }<br>
<br>
So, can I take out all the ones marked "not needed" as an NFC cleanup?<br>
Thanks,<br>
--paulr<br>
<br>
P.S. If you care, the specific example I tripped over is in<br>
llvm/lib/CodeGen/AsmPrinter/<wbr>DIE.cpp, DIEInteger::EmitValue().<br>
<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>