clang: C++1y deprecated attribute message
Joseph Mansfield
sftrabbit at gmail.com
Tue Jan 28 16:58:43 PST 2014
The attached patch adds support for deprecation messages in C++1y. This is
my first time hacking with clang so a code review would definitely be
needed.
As an example of what is now supported:
[[deprecated("use bar instead")]] void foo();
When this function is used, the following warning is emitted:
warning: 'foo' is deprecated: use bar instead [-Wdeprecated-declarations]
foo();
^
Some tests included.
Known potential issues:
- Attribute parsing currently doesn't seem to distinguish between C++11 and
C++1y attributes.
- Maybe errors like [[deprecated("foo", "bar")]] would better report "too
many arguments" than "expected ')'". Not sure about the best way to go
about this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140129/f40dd8a2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deprecatedmessage.patch
Type: text/x-patch
Size: 7334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140129/f40dd8a2/attachment.bin>
More information about the cfe-commits
mailing list