[PATCH] D32332: Add support for transparent overloadable functions in clang
George Burgess IV via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 00:01:23 PDT 2017
george.burgess.iv updated this revision to Diff 99851.
george.burgess.iv added a comment.
Remove the `transparent_overloadable` attribute entirely.
This approach presents one problem that I didn't see until I implemented it: I'd like to have something to detect that this feature exists. The quick fix seems to be "readd `transparently_overloadable`, make it equivalent to not having the attribute at all, and be happy," but that feels really icky (as does adding a special `__has_enhanced_overloadable` or whatever macro just for this).
Do we have a standard way of saying "does clang support an enhanced version of attribute X"? If not, I'm happy to put together a patch so people can query for that in a somewhat uniform way. This would let users write something like `__has_attribute_enhancement(overloadable, unmarked_overloads)`, and would be more broadly useful if we decide to ever add features to another attribute in the future (`diagnose_if` comes to mind if I can ever find time to get back to it...).
Apologies for the lag; life is busy. :)
https://reviews.llvm.org/D32332
Files:
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
test/CodeGen/mangle-ms.c
test/CodeGen/mangle.c
test/CodeGenCXX/mangle-ms.cpp
test/PCH/attrs.c
test/Sema/overloadable.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32332.99851.patch
Type: text/x-patch
Size: 25315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170523/1e7bd38e/attachment-0001.bin>
More information about the cfe-commits
mailing list