[PATCH] D72910: Fix a bug with clang with object destructor, while skipping object initialization - make clang crash

ido via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 17 12:47:36 PST 2020


ykfre added a comment.

In D72910#1826293 <https://reviews.llvm.org/D72910#1826293>, @dim wrote:

> Aha, which version of clang-cl are you using?  With the released version of clang-cl 9.0.1, I get a warning instead of an error:
>
>   cleanup.cpp(15,5): warning: jump from this goto statement to its label is a Microsoft extension [-Wmicrosoft-goto]
>                   goto clean_up;
>                   ^
>   cleanup.cpp(20,7): note: jump bypasses variable initialization
>     int i = 0;
>         ^
>   cleanup.cpp(18,4): note: jump bypasses variable initialization
>           A a;
>             ^
>   1 warning generated.
>
>
> So apparently another code path is activated when the target is Microsoft.


I succeeded to narrow it to the use of the flag -WCL4


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72910/new/

https://reviews.llvm.org/D72910





More information about the cfe-commits mailing list