<div dir="ltr">AFAIK, there's no equivalent for this with MSVC. I think it would be a good idea to wrap the pragma around an ifdef.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 14, 2015 at 2:09 AM, Pavel Labath <span dir="ltr"><<a href="mailto:labath@google.com" target="_blank">labath@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added a comment.<br>
<span class=""><br>
In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11099-23204409&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=z9u4Xt4OyazDvSzedruLMMBEdq51ISK7VAVdafOOM0k&s=tja4F7yqC48O702-eCrG9lOns6AYj4OTE1C1xiOAt5w&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11099#204409</a>, @chaoren wrote:<br>
<br>
> Is it only this one switch statement that needs this assertion? Maybe the pragma should be localized to this part (with push/pop)? Also, I'm not sure if any other compilers are supported but this wouldn't work with MSVC.<br>
<br>
<br>
</span>I am no expert in this area, but it seems to me that basically the whole file is made of switch statements on clang enums and that they all could use some protection.<br>
<br>
It is true that we won't get this protection on MSVC, but I don't think that's a big problem. Since this is not OS-dependent, it should be enough that at least some compilers are verifying this. However, if you know the right incantations to produce an error on MSVC, we can definitely add them.<br>
<br>
For clang and gcc we pass -Wno-unknown-pragma, but I don't know if we have a MSVC equivalent. If we don't and this produces a warning there, we can make this pragma #ifndef MSVC.<br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11099&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=MEqT8U_n7oNfuDW5NRbY3ZV384ZquXIYFPWmprwUdKM&m=z9u4Xt4OyazDvSzedruLMMBEdq51ISK7VAVdafOOM0k&s=dl4XPiO68qpr1k4duSYPmnf81BWJD1LKub1RVbRnCIk&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11099</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>