cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use do_ubsan_in_current_function.
authorJason Merrill <jason@redhat.com>
Wed, 25 Nov 2015 18:58:06 +0000 (13:58 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 25 Nov 2015 18:58:06 +0000 (13:58 -0500)
* cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use
do_ubsan_in_current_function.

From-SVN: r230896

gcc/cp/ChangeLog
gcc/cp/cp-ubsan.c

index c94ae5f1cc460fa243e387e6f1eba6e129bc8957..968482f3a3e3b874f4e9a0e1e5ac908c002f117e 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-25  Jason Merrill  <jason@redhat.com>
+
+       * cp-ubsan.c (cp_ubsan_instrument_vptr_p): Use
+       do_ubsan_in_current_function.
+
 2015-11-25  Markus Trippelsdorf  <markus@trippelsdorf.de>
            Paolo Carlini  <paolo.carlini@oracle.com>
 
index 0aaf0af23cdbb600d8e066d5458d121f37b8a09c..e780c2ef2f0fd3a9394808baab9bec1450533dcb 100644 (file)
@@ -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)