This is an archive of the discontinued LLVM Phabricator instance.

[clang-repl] Correctly disambiguate dtor declarations from statements
ClosedPublic

Authored by v.g.vassilev on Apr 15 2023, 4:39 AM.

Diff Detail

Event Timeline

v.g.vassilev created this revision.Apr 15 2023, 4:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2023, 4:39 AM
v.g.vassilev requested review of this revision.Apr 15 2023, 4:39 AM

Let's rely on a post-commit review here.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 30 2023, 12:45 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2023, 12:45 PM
aaron.ballman added inline comments.May 1 2023, 1:03 PM
clang/lib/Parse/ParseTentative.cpp
91

Are you sure you can remove this? Wouldn't this be used for a case like:

struct Foo {
  struct Bar {
    struct Baz {
      ~Baz();
    };
  };
};

Foo::Bar::Baz::~Baz() {}

(I could be reading the code wrong, but I thought we had a reason to check for annot_cxxscope -- seems we missed test coverage for it!)

v.g.vassilev marked an inline comment as done.May 2 2023, 2:40 AM
v.g.vassilev added inline comments.
clang/lib/Parse/ParseTentative.cpp
91

It looks like we do not need the annot_cxxscope as it seems it was processed above (likely one of the recent additions such as ParseOptionalCXXScopeSpecifier). I added a test case for the case you proposed in rG87ae74692456

aaron.ballman added inline comments.May 2 2023, 5:28 AM
clang/lib/Parse/ParseTentative.cpp
91

Ah, good to know, and thank you for the additional test case!