https://llvm.org/bugs/show_bug.cgi?id=26787
David Majnemer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #2 from David Majnemer <[email protected]> --- This is not a bug. Clang uses C++11 rules when targeting compatibility with MSVC 2013. MSVC 2013 is buggy and does not follow all the rules. You will get the same behavior for clang on linux if you supply -std=c++11. Furthermore, MSVC 2015 has identical behavior to clang: D:\>type t.cpp #include <stdio.h> struct A { ~A () { throw 1; } }; struct B : public A { ~B() try { printf("B destructed\n"); } catch(int j) { printf("Caught %d in ~B\n", j); } }; int main() { try { B b; } catch (int j) {} return 0; } D:\>cl -w -O2 -EHs t.cpp && t Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23725 for x64 Copyright (C) Microsoft Corporation. All rights reserved. t.cpp Microsoft (R) Incremental Linker Version 14.00.23725.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:t.exe t.obj $ ./t.exe B destructed $ echo $? 3 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list [email protected] http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
