[cfe-dev] non-virtual/virtual const/non-const Decl::getCanonicalDecl()

Craig Topper craig.topper at gmail.com
Tue Mar 18 22:44:25 PDT 2014


Ping


On Mon, Mar 10, 2014 at 11:48 PM, Craig Topper <craig.topper at gmail.com>wrote:

> While adding 'override' keywords I noticed some oddities with
> getCanonicalDecl.
>
> There is a non-const virtual version declared in Decl that is overridden
> in many places. There is also a const version in derived classes that is
> not virtual that just redirects to the const/virtual using const_cast.
>
> This pattern breaks in FunctionDecl and CXXRecordDecl when the const
> version becomes virtual as well.
>
> Was the original intention here to just have a single vtable entry?
>
> Thanks,
> ~Craig
>



-- 
~Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140318/5838c3b4/attachment.html>


More information about the cfe-dev mailing list