[PATCH] D51507: Allow all supportable attributes to be used with #pragma clang attribute.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 30 14:26:05 PDT 2018

rsmith added a comment.

+ at tra for CUDA attributes

Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:1
 // RUN: clang-tblgen -gen-clang-test-pragma-attribute-supported-attributes -I%src_include_dir %src_include_dir/clang/Basic/Attr.td -o - | FileCheck %s
It's probably easiest to review the list of newly-supported attributes here. Some of these look tenuous, some of them look like obvious wins; I think we should go through the list and see if any seem like they should not be supported by the pragma.

Comment at: test/Misc/pragma-attribute-supported-attributes-list.test:50
 // CHECK-NEXT: EnumExtensibility (SubjectMatchRule_enum)
+// CHECK-NEXT: ExtVectorType (SubjectMatchRule_type_alias)
 // 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))
I think `__attribute__((ext_vector_type))` is a good candidate to *not* have `#pragma clang attribute` support. A type modifier like this really should only be declared as part of declaring the type. Opinions?

  rC Clang


More information about the cfe-commits mailing list