llvm-project
77921a00 - [Analysis] Don't treat code after analyzer_noreturn calls as unreachable (#229577)

Commit
44 days ago
[Analysis] Don't treat code after analyzer_noreturn calls as unreachable (#229577) Since #150952, the CFG treats calls to functions attributed 'analyzer_noreturn' like calls to 'noreturn' functions, so -Wunreachable-code reported the code following such a call as never executed even though the call can return. Record in CFGBlock whether a noreturn block ends in a real 'noreturn' call or an 'analyzer_noreturn' call. The CFG keeps the code after an 'analyzer_noreturn' call as the alternate successor of the exit edge and the reachability scan used by -Wunreachable-code follows it. All other clients still treat the two kinds identically. rdar://188741139
Author
Parents
Loading