[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-20 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354530: [attributes] Add an attribute for server routines in Mach kernel and extensions. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chan

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM with a minor documentation nit. Comment at: clang/include/clang/Basic/AttrDocs.td:4049 +it will be automatically applied to overrides if the method is virtual. The +attribute can be written using C++11 sy

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Sema/attr-mig.c:6 + +__attribute__((mig_server_routine)) kern_return_t var = KERN_SUCCESS; // expected-warning-re{{'mig_server_routine' attribute only applies to functions, Objective-C methods, and blocks{{$ + --

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 187656. NoQ marked 5 inline comments as done. NoQ added a comment. Fxd. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58365/new/ https://reviews.llvm.org/D58365 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8702 +def warn_mig_server_routine_does_not_return_kern_return_t : Warning< + "'%0' attribute only applies to functions that return a kernel return code">, + InGroup; --

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-19 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. This looks good to me as long as Aaron is happy with it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58365/new/ https://reviews.llvm.org/D58365

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1310 +def MIGServerRoutine : InheritableAttr { + let Spellings = [Clang<"mig_server_routine">]; aaron.ballman wrote: > Should this be limited to specific targets, or is this a general con

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 187497. NoQ marked 13 inline comments as done. NoQ added a comment. Fxd, thx! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58365/new/ https://reviews.llvm.org/D58365 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > @aaron.ballman, are you actually interested in reviewing these attributes? > 'Cause George added you on his reviews but i totally understand that these > are fairly exotic. Yeah, I'd like to review these attributes -- thanks for double-checking with me! =

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:4047-4048 +that have their return value of type ``kern_return_t`` unconditionally returned +from the routine. The attribute can be applied to C++ methods, and in thi

[PATCH] D58365: [attributes] Add a MIG server routine attribute.

2019-02-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: aaron.ballman, dcoughlin, george.karpenkov. Herald added a project: clang. Herald added a subscriber: cfe-commits. Continuing the trend started in D54912 , i'd like to stuff one more XNU/Mach/Darwin-specific attribut