From 917124c30204d37a19f0f32f1fa14b3ae0add3b1 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 25 Nov 2015 13:58:06 -0500 Subject: [PATCH] cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use do_ubsan_in_current_function. * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use do_ubsan_in_current_function. From-SVN: r230896 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/cp-ubsan.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c94ae5f1cc4..968482f3a3e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-11-25 Jason Merrill + + * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use + do_ubsan_in_current_function. + 2015-11-25 Markus Trippelsdorf Paolo Carlini diff --git a/gcc/cp/cp-ubsan.c b/gcc/cp/cp-ubsan.c index 0aaf0af23cd..e780c2ef2f0 100644 --- a/gcc/cp/cp-ubsan.c +++ b/gcc/cp/cp-ubsan.c @@ -32,9 +32,7 @@ cp_ubsan_instrument_vptr_p (tree type) if (!flag_rtti || flag_sanitize_undefined_trap_on_error) return false; - if (current_function_decl - && lookup_attribute ("no_sanitize_undefined", - DECL_ATTRIBUTES (current_function_decl))) + if (!do_ubsan_in_current_function ()) return false; if (type) -- 2.30.2