<div dir="ltr">Passing /EHsc should do it, just like you would enable them with cl.exe. The default setting is /EHs-, which is off.<div><br></div><div>Our treatment of /EHsc is slightly different from MSVC. For MSVC, it really controls whether C++ destructors are run on exception, and they emit a warning whenever you use throw or catch without it. For Clang, it disables everything, throw, catch, destructors, whatever.</div><div><br></div><div>We didn't feel it was worth supporting a mode where 'throw' and 'catch' work, but destructors don't run. It might make sense to have a mode where we downgrade the error to a warning and compile catch to nothing, though.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 1, 2015 at 3:59 PM, Daniel Dilts via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-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"><div dir="ltr"><div>I have a custom tool that I wrote that has a command-line like:</div><div>Tool.exe file.cpp -- --driver-mode=cl -fms-compatibility-version=19 -I(Some include directories) -D(Some macros)</div><div><br></div><div>I have a line in the code I am running my tool against that throws an exception.  The tool gives an error "cannot use 'throw' with exceptions disables".</div><div><br></div><div>As near as I can tell I am not disabling exceptions.  Is there something that I have to do to enable exceptions and RTTI?</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>