summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/pragma-attribute-supported-attributes-list.test
diff options
context:
space:
mode:
authorErik Pilkington <erik.pilkington@gmail.com>2019-02-11 23:21:39 +0000
committerErik Pilkington <erik.pilkington@gmail.com>2019-02-11 23:21:39 +0000
commite3cd735ea6378e5dd7765828f560ed49be845a95 (patch)
tree91101427ae598d9ea6ced7a2e44f0f4f209fe4a9 /clang/test/Misc/pragma-attribute-supported-attributes-list.test
parent796ac80b863ed92c3d8bcc296f678ff416afc8a8 (diff)
downloadbcm5719-llvm-e3cd735ea6378e5dd7765828f560ed49be845a95.tar.gz
bcm5719-llvm-e3cd735ea6378e5dd7765828f560ed49be845a95.zip
Add a new attribute, fortify_stdlib
This attribute applies to declarations of C stdlib functions (sprintf, memcpy...) that have known fortified variants (__sprintf_chk, __memcpy_chk, ...). When applied, clang will emit calls to the fortified variant functions instead of calls to the defaults. In GCC, this is done by adding gnu_inline-style wrapper functions, but that doesn't work for us for variadic functions because we don't support __builtin_va_arg_pack (and have no intention to). This attribute takes two arguments, the first is 'type' argument passed through to __builtin_object_size, and the second is a flag argument that gets passed through to the variadic checking variants. rdar://47905754 Differential revision: https://reviews.llvm.org/D57918 llvm-svn: 353765
Diffstat (limited to 'clang/test/Misc/pragma-attribute-supported-attributes-list.test')
-rw-r--r--clang/test/Misc/pragma-attribute-supported-attributes-list.test1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Misc/pragma-attribute-supported-attributes-list.test b/clang/test/Misc/pragma-attribute-supported-attributes-list.test
index 2dc03a4188e..22ad3ac9872 100644
--- a/clang/test/Misc/pragma-attribute-supported-attributes-list.test
+++ b/clang/test/Misc/pragma-attribute-supported-attributes-list.test
@@ -52,6 +52,7 @@
// CHECK-NEXT: ExternalSourceSymbol ((SubjectMatchRule_record, SubjectMatchRule_enum, SubjectMatchRule_enum_constant, SubjectMatchRule_field, SubjectMatchRule_function, SubjectMatchRule_namespace, SubjectMatchRule_objc_category, SubjectMatchRule_objc_interface, SubjectMatchRule_objc_method, SubjectMatchRule_objc_property, SubjectMatchRule_objc_protocol, SubjectMatchRule_record, SubjectMatchRule_type_alias, SubjectMatchRule_variable))
// CHECK-NEXT: FlagEnum (SubjectMatchRule_enum)
// CHECK-NEXT: Flatten (SubjectMatchRule_function)
+// CHECK-NEXT: FortifyStdLib (SubjectMatchRule_function)
// CHECK-NEXT: GNUInline (SubjectMatchRule_function)
// CHECK-NEXT: Hot (SubjectMatchRule_function)
// CHECK-NEXT: IBAction (SubjectMatchRule_objc_method_is_instance)
OpenPOWER on IntegriCloud