[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-10 Thread David Chisnall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbdd88b7ed395: Add support for __declspec(guard(nocf)) (authored by ajpaverd, committed by theraven). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72167/new/

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/include/clang/Basic/Attr.td:2914 + let Spellings = [Declspec<"guard">]; + let Subjects = SubjectList<[Function]>; + let Args = [EnumA

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-08 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd added a comment. Thanks for the feedback @aaron.ballman and @dmajor! Comment at: clang/include/clang/Basic/Attr.td:2914 + let Spellings = [Declspec<"guard">]; + let Subjects = SubjectList<[Function]>; + let Args = [EnumArgument<"Guard", "GuardArg", ["nocf"], ["nocf"

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-08 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd updated this revision to Diff 236906. ajpaverd marked 7 inline comments as done. ajpaverd added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72167/new/ https://reviews.llvm.org/D72167 Files: clang/include/

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-08 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. I've confirmed that the current patch fixes our CFG failures. Thanks again! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72167/new/ https://reviews.llvm.org/D72167 ___ cfe-comm

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-08 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2914 + let Spellings = [Declspec<"guard">]; + let Subjects = SubjectList<[Function]>; + let Args = [EnumArgument<"Guard", "GuardArg", ["nocf"], ["nocf"]>]; Should we also suppor

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-08 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd updated this revision to Diff 236806. ajpaverd added a comment. - Make guard_nocf an attribute of individual call instructions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72167/new/ https://reviews.llvm.org/D72167 Files: clang/include

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-07 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. Is the current patch an interdiff? It would be helpful to have the diff against the master repo; Phabricator can take care of showing interdiffs if necessary. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72167/new/ https:/

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-07 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd added a comment. In D72167#180 , @dmajor wrote: > Thanks for doing this! > > When I applied this patch and added `__declspec(guard(nocf))` to the function > that was giving us trouble >

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-07 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd added a comment. In D72167#1803395 , @aaron.ballman wrote: > Can you please add some Sema tests that verify the attribute only appertains > to functions, accepts the right number of arguments, etc? Also, some tests > showing how this attribute

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-07 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd updated this revision to Diff 236572. ajpaverd marked 5 inline comments as done. ajpaverd added a comment. Make guard_nocf an attribute of individual call instructions Instead of using "guard_nocf" as a function attribute, make this an attribute on individual call instructions for which

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you please add some Sema tests that verify the attribute only appertains to functions, accepts the right number of arguments, etc? Also, some tests showing how this attribute works for things like redelcarations and virtual functions would help. e.g., void

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-03 Thread dmajor via Phabricator via cfe-commits
dmajor added a comment. Thanks for doing this! When I applied this patch and added `__declspec(guard(nocf))` to the function that was giving us trouble , I still crash

[PATCH] D72167: Add support for __declspec(guard(nocf))

2020-01-03 Thread Andrew Paverd via Phabricator via cfe-commits
ajpaverd created this revision. ajpaverd added reviewers: rnk, dmajor, pcc, hans. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Avoid using the `nocf_check` attribute with Control Flow Guard. Instead, use a new `"guard_nocf"` function attribut