[cfe-dev] non-virtual/virtual const/non-const Decl::getCanonicalDecl()
Craig Topper
craig.topper at gmail.com
Mon Mar 10 23:48:39 PDT 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140310/6c6c362d/attachment.html>
More information about the cfe-dev
mailing list