jyu2 marked 2 inline comments as done. jyu2 added inline comments.
================ Comment at: lib/Sema/JumpDiagnostics.cpp:347 + LabelAndGotoScopes[S] = ParentScope; + Jumps.push_back(S); + } ---------------- efriedma wrote: > This doesn't look right; I think we need to add it to IndirectJumps instead. > This probably impacts a testcase like the following: > > ``` > struct S { ~S(); }; > int f() { > { > S s; > asm goto(""::::BAR); > return 1; > } > BAR: > return 0; > } > ``` > > (gcc currently accepts this and skips running the destructor, but I'm pretty > sure that's a bug.) Hi Eli, I see both g++ and clang++ with my change call ~S. Am I missing something? Thanks. 1>clang++ j.cpp 1>./a.out ~S() 1>g++ j.cpp 1>./a.out ~S() Here is the test case: 1>cat j.cpp extern "C" int printf (const char *,...); struct S { ~S() {printf("~S()\n");}; }; int f() { { S s; asm goto(""::::BAR); return 1; } BAR: return 0; } int main() { f(); } CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56571/new/ https://reviews.llvm.org/D56571 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits