[clang] 4456076 - Revert "Further implement CWG 2292"
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 17 05:35:35 PST 2020
On Fri, Jan 17, 2020 at 4:40 AM Hans Wennborg via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
> (Note to self: I double checked that the "Further implement CWG 2292"
> patch landed just after the 10.x branch, so this revert doesn't need
> to be cherry-picked there.)
Can confirm. I did the commit after the branch point.
Thank you Amy for catching the regression!
~Aaron
>
> On Thu, Jan 16, 2020 at 12:46 AM Amy Huang via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
> >
> >
> > Author: Amy Huang
> > Date: 2020-01-15T15:46:07-08:00
> > New Revision: 44560762c62d72a103bdceff49ffa70451efd5f8
> >
> > URL: https://github.com/llvm/llvm-project/commit/44560762c62d72a103bdceff49ffa70451efd5f8
> > DIFF: https://github.com/llvm/llvm-project/commit/44560762c62d72a103bdceff49ffa70451efd5f8.diff
> >
> > LOG: Revert "Further implement CWG 2292"
> >
> > This reverts commit ee0f1f1edc3ec0d4e698d50cc3180217448802b7 because it
> > causes an error on valid code.
> > See https://reviews.llvm.org/rGee0f1f1edc3ec0d4e698d50cc3180217448802b7.
> >
> > Added:
> >
> >
> > Modified:
> > clang/lib/Sema/SemaExprCXX.cpp
> >
> > Removed:
> > clang/test/SemaCXX/pseudo-destructor-name.cpp
> >
> >
> > ################################################################################
> > diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
> > index 96e18105df78..a73e6906fceb 100644
> > --- a/clang/lib/Sema/SemaExprCXX.cpp
> > +++ b/clang/lib/Sema/SemaExprCXX.cpp
> > @@ -192,10 +192,8 @@ ParsedType Sema::getDestructorName(SourceLocation TildeLoc,
> > AlreadySearched = true;
> > LookupCtx = DC;
> > isDependent = false;
> > - } else if (auto *RD = dyn_cast_or_null<CXXRecordDecl>(DC)) {
> > - if ((RD->hasDefinition() && RD->hasSimpleDestructor()) ||
> > - !RD->hasDefinition())
> > - LookAtPrefix = false;
> > + } else if (DC && isa<CXXRecordDecl>(DC)) {
> > + LookAtPrefix = false;
> > LookInScope = true;
> > }
> >
> >
> > diff --git a/clang/test/SemaCXX/pseudo-destructor-name.cpp b/clang/test/SemaCXX/pseudo-destructor-name.cpp
> > deleted file mode 100644
> > index cc7c22b8dc4d..000000000000
> > --- a/clang/test/SemaCXX/pseudo-destructor-name.cpp
> > +++ /dev/null
> > @@ -1,26 +0,0 @@
> > -// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
> > -// expected-no-diagnostics
> > -
> > -struct AAA
> > -{
> > - struct BBB
> > - {
> > - ~BBB() {}
> > - };
> > -
> > - typedef BBB BBB_alias;
> > -};
> > -
> > -typedef AAA::BBB BBB_alias2;
> > -
> > -int
> > -main()
> > -{
> > - AAA::BBB_alias *ptr1 = new AAA::BBB_alias();
> > - AAA::BBB_alias *ptr2 = new AAA::BBB_alias();
> > -
> > - ptr1->AAA::BBB_alias::~BBB_alias(); // Now OK
> > - ptr2->AAA::BBB_alias::~BBB(); // OK
> > - ptr1->~BBB_alias2(); // OK
> > - return 0;
> > -}
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list