[PATCH] D129691: [clang][test] fix typo in fn attr

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 14 09:53:25 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd2792e7d37c4: [clang][test] fix typo in fn attr (authored by nickdesaulniers).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129691

Files:
  clang/test/CodeGen/attr-function-return.c
  clang/test/CodeGen/attr-function-return.cpp


Index: clang/test/CodeGen/attr-function-return.cpp
===================================================================
--- clang/test/CodeGen/attr-function-return.cpp
+++ clang/test/CodeGen/attr-function-return.cpp
@@ -1,11 +1,12 @@
 // RUN: %clang_cc1 -triple x86_64-linux-gnu %s -emit-llvm -o - \
+// RUN:   -Werror=unknown-attributes \
 // RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-NOM
 // RUN: %clang_cc1 -triple x86_64-linux-gnu %s -emit-llvm -o - \
-// RUN:   -mfunction-return=keep | FileCheck %s \
-// RUN:   --check-prefixes=CHECK,CHECK-KEEP
+// RUN:   -Werror=unknown-attributes -mfunction-return=keep \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-KEEP
 // RUN: %clang_cc1 -triple x86_64-linux-gnu %s -emit-llvm -o - \
-// RUN:  -mfunction-return=thunk-extern | FileCheck %s \
-// RUN:  --check-prefixes=CHECK,CHECK-EXTERN
+// RUN:   -Werror=unknown-attributes -mfunction-return=thunk-extern \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-EXTERN
 
 int foo(void) {
   // CHECK: @"_ZZ3foovENK3$_0clEv"({{.*}}) [[NOATTR:#[0-9]+]]
Index: clang/test/CodeGen/attr-function-return.c
===================================================================
--- clang/test/CodeGen/attr-function-return.c
+++ clang/test/CodeGen/attr-function-return.c
@@ -1,11 +1,12 @@
 // RUN: %clang_cc1 -std=gnu2x -triple x86_64-linux-gnu %s -emit-llvm -o - \
+// RUN:   -Werror=ignored-attributes \
 // RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-NOM
 // RUN: %clang_cc1 -std=gnu2x -triple x86_64-linux-gnu %s -emit-llvm -o - \
-// RUN:   -mfunction-return=keep | FileCheck %s \
-// RUN:   --check-prefixes=CHECK,CHECK-KEEP
+// RUN:   -Werror=ignored-attributes -mfunction-return=keep \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-KEEP
 // RUN: %clang_cc1 -std=gnu2x -triple x86_64-linux-gnu %s -emit-llvm -o - \
-// RUN:  -mfunction-return=thunk-extern | FileCheck %s \
-// RUN:  --check-prefixes=CHECK,CHECK-EXTERN
+// RUN:   -Werror=ignored-attributes -mfunction-return=thunk-extern \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,CHECK-EXTERN
 
 #if !__has_attribute(function_return)
 #error "missing attribute support for function_return"
@@ -14,13 +15,13 @@
 // CHECK: @keep() [[KEEP:#[0-9]+]]
 __attribute__((function_return("keep"))) void keep(void) {}
 
-// CHECK: @keep2() [[KEEP:#[0-9]+]]
+// CHECK: @keep2() [[KEEP]]
 [[gnu::function_return("keep")]] void keep2(void) {}
 
 // CHECK: @thunk_extern() [[EXTERN:#[0-9]+]]
 __attribute__((function_return("thunk-extern"))) void thunk_extern(void) {}
 
-// CHECK: @thunk_extern2() [[EXTERN:#[0-9]+]]
+// CHECK: @thunk_extern2() [[EXTERN]]
 [[gnu::function_return("thunk-extern")]] void thunk_extern2(void) {}
 
 // CHECK: @double_thunk_keep() [[KEEP]]
@@ -39,7 +40,7 @@
 void double_keep_thunk(void) {}
 
 // CHECK: @double_keep_thunk2() [[EXTERN]]
-[[gnu::function_return("thunk-keep")]][[gnu::function_return("thunk-extern")]]
+[[gnu::function_return("keep")]][[gnu::function_return("thunk-extern")]]
 void double_keep_thunk2(void) {}
 
 // CHECK: @thunk_keep() [[KEEP]]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129691.444697.patch
Type: text/x-patch
Size: 3064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220714/82e74148/attachment-0001.bin>


More information about the cfe-commits mailing list