[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

Dylan McKay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 5 16:41:47 PST 2017


dylanmckay added inline comments.


================
Comment at: lib/Sema/SemaDeclAttr.cpp:5137
+  if (!checkAttributeNumArgs(S, Attr, 0))
+    Attr.setInvalid();
+
----------------
aaron.ballman wrote:
> This should simply return rather than attempt to attach an invalid attribute to the declaration (same below).
Nice catch


================
Comment at: test/CodeGen/avr/attributes/interrupt.c:3
+
+// CHECK: define void @foo() #0
+__attribute__((interrupt)) void foo(void) { }
----------------
aaron.ballman wrote:
> As should this.
It seems like this sort of test _does_ sit in `CodeGen` - see `test/CodeGen/{arm-interrupt-attr.c|mips-interrupt-attr.c}`.



https://reviews.llvm.org/D28451





More information about the cfe-commits mailing list