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?