I've taken the latest suggestions into account, see attached patch. Could you have a look? Thanks.
-----Original Message----- From: scott douglass [mailto:sdougl...@arm.com] Sent: 18 August 2015 14:16 To: Sjoerd Meijer Cc: 'Marshall Clow'; 'Gabriel Dos Reis'; 'Richard Smith'; 'cfe-commits' Subject: RE: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++ > Please see updated patch file attached, which now includes a > fixed/added regression test. I think it's a good idea; two minor remarks: + if (!CGM.getCodeGenOpts().OptimizeSize) { Should this be 'else if'? I imagine there's no use emitting a trap after the sanitizer has emitted a missing_return check. In the regression test, the CHECK-OPT case is now essentially the same as the CHECK case, so remove ' --check-prefix=CHECK-OPT' (but leave the RUN:) and these lines // CHECK-OPT: call void @llvm.trap // CHECK-OPT: unreachable
0001-Always-trap-for-missing-return-statements-except-whe.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits