[PATCH] D51507: Allow all supportable attributes to be used with #pragma clang attribute.
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 30 14:52:10 PDT 2018
dexonsmith added inline comments.
================
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))
----------------
rsmith wrote:
> 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?
The same argument might hold for most type attributes. I have trouble imagining someone using this, but it's also hard to see how supporting it would lead to bugs in user code. It seems a bit simpler to support everything.
I don't have a strong opinion though.
Repository:
rC Clang
https://reviews.llvm.org/D51507
More information about the cfe-commits
mailing list