[cfe-dev] [PATCH] Improve __interface support
John McCall
rjmccall at apple.com
Sun Aug 19 14:05:46 PDT 2012
On Aug 18, 2012, at 7:57 AM, David Robins wrote:
> On Sat, Aug 18, 2012 at 08:58:08AM +0100, João Matos wrote:
>> Hi, nice patch.
>>
>> NewFD->setVirtualAsWritten(true);
>>
>> Do we need to set this on the method? According to the docs, this should
>> only be set if virtual was explicitly written in the code.
>
> I don't know how else to set it. __interface implies all member
> functions defined within are pure virtual, so one could say "as written"
> fits the user writing "__interface" to get virtual functions. If there's
> a better way to set virtual, I'll use it.
The most obvious way to do this would be to add
CD->getParent()->getTagKind() == TTK_Interface
to CXXMethodDecl::isVirtual().
John.
More information about the cfe-dev
mailing list