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

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 2 13:12:16 PDT 2017


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 debugger at the beginning a specified pass. https://github.com/apple/swift/blob/master/lib/SILOptimizer/PassManager/PassManager.cpp#L339

Since the intent is to continue after the trap, I don't think the analyzer should treat it as a sink.

Did you get requests from users to treat it like a sink? Or false positives that would be resolved if were a sink? Or is this something you noticed by inspection?


https://reviews.llvm.org/D39551





More information about the cfe-commits mailing list