This revision was automatically updated to reflect the committed changes.
Closed by commit rC352948: [ASan] Do not instrument other runtime functions 
with `__asan_handle_no_return` (authored by yln, committed by ).
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D57489?vs=184648&id=184878#toc

Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57489/new/

https://reviews.llvm.org/D57489

Files:
  lib/CodeGen/CGCall.cpp
  test/CodeGen/ubsan-asan-noreturn.c


Index: test/CodeGen/ubsan-asan-noreturn.c
===================================================================
--- test/CodeGen/ubsan-asan-noreturn.c
+++ test/CodeGen/ubsan-asan-noreturn.c
@@ -9,8 +9,7 @@
   my_longjmp();
   // CHECK:      @__asan_handle_no_return{{.*}} !nosanitize
   // CHECK-NEXT: @my_longjmp(){{[^#]*}}
-  // CHECK:      @__asan_handle_no_return()
-  // CHECK-NEXT: @__ubsan_handle_builtin_unreachable{{.*}} !nosanitize
+  // CHECK:      @__ubsan_handle_builtin_unreachable{{.*}} !nosanitize
   // CHECK-NEXT: unreachable
 }
 
Index: lib/CodeGen/CGCall.cpp
===================================================================
--- lib/CodeGen/CGCall.cpp
+++ lib/CodeGen/CGCall.cpp
@@ -4394,8 +4394,8 @@
 
     // Strip away the noreturn attribute to better diagnose unreachable UB.
     if (SanOpts.has(SanitizerKind::Unreachable)) {
-      // Also remove from function since CI->hasFnAttr(..) also checks 
attributes
-      // of the called function.
+      // Also remove from function since CallBase::hasFnAttr additionally 
checks
+      // attributes of the called function.
       if (auto *F = CI->getCalledFunction())
         F->removeFnAttr(llvm::Attribute::NoReturn);
       CI->removeAttribute(llvm::AttributeList::FunctionIndex,


Index: test/CodeGen/ubsan-asan-noreturn.c
===================================================================
--- test/CodeGen/ubsan-asan-noreturn.c
+++ test/CodeGen/ubsan-asan-noreturn.c
@@ -9,8 +9,7 @@
   my_longjmp();
   // CHECK:      @__asan_handle_no_return{{.*}} !nosanitize
   // CHECK-NEXT: @my_longjmp(){{[^#]*}}
-  // CHECK:      @__asan_handle_no_return()
-  // CHECK-NEXT: @__ubsan_handle_builtin_unreachable{{.*}} !nosanitize
+  // CHECK:      @__ubsan_handle_builtin_unreachable{{.*}} !nosanitize
   // CHECK-NEXT: unreachable
 }
 
Index: lib/CodeGen/CGCall.cpp
===================================================================
--- lib/CodeGen/CGCall.cpp
+++ lib/CodeGen/CGCall.cpp
@@ -4394,8 +4394,8 @@
 
     // Strip away the noreturn attribute to better diagnose unreachable UB.
     if (SanOpts.has(SanitizerKind::Unreachable)) {
-      // Also remove from function since CI->hasFnAttr(..) also checks attributes
-      // of the called function.
+      // Also remove from function since CallBase::hasFnAttr additionally checks
+      // attributes of the called function.
       if (auto *F = CI->getCalledFunction())
         F->removeFnAttr(llvm::Attribute::NoReturn);
       CI->removeAttribute(llvm::AttributeList::FunctionIndex,
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to