[PATCH] D129691: [clang][test] fix typo in fn attr
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 13 13:40:09 PDT 2022
nickdesaulniers created this revision.
nickdesaulniers added reviewers: aaron.ballman, erichkeane, MaskRay.
Herald added subscribers: jsji, StephenFan, pengfei.
Herald added a project: All.
nickdesaulniers requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
While testing backports of
https://reviews.llvm.org/D129572#inline-1245936
commit 2240d72f15f3 <https://reviews.llvm.org/rG2240d72f15f3b7b9d9fb65450f9bf635fd310f6f> ("[X86] initial -mfunction-return=thunk-extern support")
I noticed that one of my unit tests mistyped a function attribute. The
unit test was intended to test fn attr merging behavior, but with the
typo it was not. Small fixup.
Repository:
rG LLVM Github Monorepo
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"
@@ -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.444410.patch
Type: text/x-patch
Size: 2499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220713/2d478acf/attachment.bin>
More information about the cfe-commits
mailing list