[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG26c695b78930: Support macro deprecation #pragma clang deprecated (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://revi

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 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, thank you! I am excited to start using this shortly. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://r

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362764. beanz marked 3 inline comments as done. beanz added a comment. Addressing @aaron.ballman's feedback. I've added FIXMEs and test cases with not-expected annotations so that in the future if the underlying issue gets fixed, the tests should only need upd

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106732#2911552 , @beanz wrote: > Covered taken #elif* directives per @aaron.ballmon's feedback. Thanks! > Handling non-taken #elif directives is non-trivial because clang skips > parsing the conditionals for non-taken

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362574. beanz added a comment. Moving the warning emission later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst clang/inc

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362528. beanz added a comment. Covered taken #elif* directives per @aaron.ballmon's feedback. Handling non-taken #elif directives is non-trivial because clang skips parsing the conditionals for non-taken directives. At present clang won't even error on malfor

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Lexer/deprecate-macro.c:34-39 +#ifdef foo +#endif + +// expected-warning@+1{{macro 'foo' has been marked as deprecated}} +#ifndef foo +#endif Some more test cases to add: ``` // Test that we diagnose on

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362123. beanz added a comment. One last fix for a test failure my change caused. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362053. beanz added a comment. Missed one Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Basic/Diagnos

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362052. beanz added a comment. Minor comment fixes... I swear, eventually I'll be done... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageEx

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362049. beanz added a comment. Fix warning printing always having a `:` on the end. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensio

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. All feedback should be addressed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362028. beanz marked 13 inline comments as done. beanz added a comment. Minor comment fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageEx

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 361831. beanz added a comment. Fixing handling of #ifdef, #ifndef, and defined() All tests pass this time :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: c

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 361761. beanz added a comment. Updates based on feedback from @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3875 + #define MIN(x, y) x < y ? x : y + #pragma clang deprecated("MIN", "use std::min instead") + beanz wrote: > aaron.ballman wrote: > > Rather than use a string literal, did

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Will update the patch later today with your feedback. Comment at: clang/docs/LanguageExtensions.rst:3875 + #define MIN(x, y) x < y ? x : y + #pragma clang deprecated("MIN", "use std::min instead") + aaron.ballman wrote: > Rather than

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this, I think it's really useful functionality! Comment at: clang/docs/LanguageExtensions.rst:3875 + #define MIN(x, y) x < y ? x : y + #pragma clang deprecated("MIN", "use std::min instead") + Rather t

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 361480. beanz added a comment. Updating comment about remaining bits. Rather than subtracting one, I re-added up the bits. The bitfield is now at 40 bits, so it only has 24 bits remaining (someone please check my math). Repository: rG LLVM Github Monorepo

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, rsmith, erik.pilkington, lgerbarg, pete. Herald added a subscriber: dexonsmith. beanz requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Herald added a project: clang. This p