krisb added inline comments.
================ Comment at: lib/Sema/SemaDeclAttr.cpp:5388 + + if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { + S.Diag(D->getLocation(), diag::warn_msp430_interrupt_attribute) ---------------- aaron.ballman wrote: > What should happen if the function does not have a prototype? Should that be > diagnosed? e.g., a K&R C function in C mode accepts an arbitrary number of > arguments (which can include zero). Currently, in a case like this ``` __attribute__((interrupt(0))) void foo(); void foo(int i) { i++; } ``` frontend reports no warnings, but backend fails with the following error: ``` fatal error: error in backend: ISRs cannot have arguments ``` But definitely, that should be diagnosed early. I'll take care of this. Thanks! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56663/new/ https://reviews.llvm.org/D56663 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits