<div dir="ltr">Hi,<div><br></div><div>clang  currently asserts on the following program when building with -std=c++11 (PR19190):</div><div><br></div><div><div>  template <class T> struct DWFIterator { virtual T &get() throw(int) = 0; };</div>
<div>  void foo(DWFIterator<int> *foo) { foo->get(); }</div></div><div><br></div><div>This is because in C++11, instantiation of exception specs is deferred. This usually happens in MarkFunctionReferenced(), but that's never called for pure functions. So the exception spec stays unresolved, and codegen then complains about that. (See the bug for details.)</div>
<div><br></div><div>The attached patch lets Sema::MarkAnyDeclReferenced() call ResolveExceptionSpec() for non-OdrUse functions. This fixes the assert and passes all tests, but I'm not sure if it's the best place to do this – hence, pre-commit review, please :-)</div>
<div><br></div><div>Nico</div></div>