================
@@ -126,12 +123,30 @@ void test_oob_lhs(void) {
}
#endif
-// C++ RHS cases - handler call only
+// C++ cases - handler call only
#ifdef __cplusplus
extern "C" {
+// C++ LHS cases
+
+// CXX-LABEL: define {{.*}}@test_cxx_lhs_dot_operator_function_call(
+// CXX: call void @__ubsan_handle_type_mismatch_v1_abort
+void test_cxx_lhs_dot_operator_function_call(AGG *src) {
+ AGG aggValue(void);
+ (*src).operator=(aggValue());
+}
+
+// C++ RHS cases
+
+// CXX-LABEL: define {{.*}}@test_cxx_rhs_operator_function_call(
+// CXX: call void @__ubsan_handle_type_mismatch_v1_abort
----------------
hubert-reinterpretcast wrote:
The change applies the same strategy as used in
https://github.com/llvm/llvm-project/pull/190739, which is to replace
`EmitLValue` calls with `EmitCheckedLValue`. As such, I believe it is valid to
apply the rationale from the previous PR that earlier, detailed checks were
applied elsewhere in the test file.
For this case, the precedent is set by `test_rhs_ptrcheck_deref`.
https://github.com/llvm/llvm-project/pull/203737
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits