aaron.ballman added a comment.
Just one more issue due to the nature of needing a custom parsed attribute.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:5130
+static void handleAVRInterruptAttr(Sema &S, Decl *D, const AttributeList
&Attr) {
+ if (!isFunctionOrMethod(D)) {
+ S.Diag(D->getLocation(), diag::warn_attribute_wrong_decl_type)
----------------
Because you have to do custom parsing, you also need to manually check that the
attribute was not given any arguments and diagnose if they are present.
================
Comment at: test/Sema/avr-interrupt-attr.c:5
+struct a test __attribute__((interrupt)); // expected-warning {{'interrupt'
attribute only applies to functions and methods}}
+
+__attribute__((interrupt)) void food() {}
----------------
Please add a test for `__attribute__((interrupt(12)))`, and a test with an
Objective-C method. Similar for `signal`. You should add an ObjC method to the
codegen tests as well.
https://reviews.llvm.org/D28451
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits