[PATCH] D67935: Add `#pragma clang deprecated`, used to deprecate macros
Erik Pilkington via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 14:40:50 PDT 2019
erik.pilkington created this revision.
erik.pilkington added reviewers: rsmith, aaron.ballman.
Herald added subscribers: ributzka, dexonsmith, jkorous.
Herald added a project: clang.
This patch adds support for `#pragma clang deprecated`, which emits a deprecated warning whenever it is encountered. This is intended to be used to deprecate macros, but it seems like it could be useful for deprecating include files as well (rather than `#warning`). This is similar to `#pragma GCC warning`, but that can't emit a diagnostic under `-Wdeprecated`, so these warnings wouldn't be controlled by traditional deprecation disabling methods. (`-Wno-deprecated`, `#pragma clang diagnostic ignored`).
rdar://problem/50356322 clang should provide a pragma to allow us to deprecate macros
Repository:
rC Clang
https://reviews.llvm.org/D67935
Files:
clang/docs/LanguageExtensions.rst
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/lib/Lex/Pragma.cpp
clang/test/Lexer/pragma-deprecated.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67935.221411.patch
Type: text/x-patch
Size: 6770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190923/617cd81a/attachment-0001.bin>
More information about the cfe-commits
mailing list