[PATCH] D39551: [analyzer] Make __builtin_debugtrap() a sink

2017-11-02 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun abandoned this revision. xazax.hun added a comment. In https://reviews.llvm.org/D39551#914360, @dcoughlin wrote: > I believe that the intent of `__builtin_debugtrap()` is to provide an > in-source mechanism so that the developer can trap into the debugger and then > continue executi

[PATCH] D39551: [analyzer] Make __builtin_debugtrap() a sink

2017-11-02 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I believe that the intent of `__builtin_debugtrap()` is to provide an in-source mechanism so that the developer can trap into the debugger and then continue execution. For example, in the Swift codebase this is used in combination with a debug flag to break into the d

[PATCH] D39551: [analyzer] Make __builtin_debugtrap() a sink

2017-11-02 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In the meantime, I found this discussion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20121015/153735.html It looks like the reasoning behind this intrinsic not being noreturn is that the user might continue the execution in the debugger. I think the main

[PATCH] D39551: [analyzer] Make __builtin_debugtrap() a sink

2017-11-02 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Herald added subscribers: szepet, baloghadamsoftware, whisperity. For some reason, `__builtin_debugtrap` is not a sink for the analyzer. I also added some test cases to demonstrate that `__builtin_trap` and `__builtin_unreachable` are handled properly. The former