FWIW: Replacing the call to getName with getNameAsString seems to fix the
destructor issue as well (i.e. I can remove the special case for
destructors) so I've committed this r307959.
If the getName failure for destructors is unexpected it may be worth
digging into as a separate issue.
Cheers,
La
Sure.
Richard - is this likely to be related to your query? Calling getName() on
at least one destructor in Sema/ms_class_layout triggers the assertion in
NamedDecl::getName():
(lldb)
frame #4: 0x0001039600e2
clang`clang::NamedDecl::getName(this=0x000112897490) const at Decl.h:238
235
Hi Lang,
clang crashes when I compile the following code with "-Xclang -ast-dump”:
class Base {
public:
virtual void operator()() {}
};
class Derived : public Base {
public:
void operator()() override {}
};
If I change “OS << D->getName()” to “OS << D->getNameAsString()”, the crash
disappe
Ping for a response from Lang on Richard's CR feedback
On Tue, Jun 20, 2017 at 3:30 PM Richard Smith via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> On 20 June 2017 at 14:30, Lang Hames via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
>
>> Author: lhames
>> Date: Tue Jun 20 16:30:43
On 20 June 2017 at 14:30, Lang Hames via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> Author: lhames
> Date: Tue Jun 20 16:30:43 2017
> New Revision: 305860
>
> URL: http://llvm.org/viewvc/llvm-project?rev=305860&view=rev
> Log:
> Special-case handling of destructors in override lists when d
Author: lhames
Date: Tue Jun 20 16:30:43 2017
New Revision: 305860
URL: http://llvm.org/viewvc/llvm-project?rev=305860&view=rev
Log:
Special-case handling of destructors in override lists when dumping ASTs.
Fixes a bug in r305850: CXXDestructors don't have names, so we need to handle
printing of