This is an archive of the discontinued LLVM Phabricator instance.

Make Lit tests C++11 compatible - accessible destructors
AbandonedPublic

Authored by tigerleapgorge on Feb 14 2017, 4:02 PM.

Details

Reviewers
echristo
rsmith
Summary

I am continuing to make Lit tests C++11 compatible.
This patch contains 2 tests previously in D20710.

In both tests, I have made the base class destructors “protected” so they are accessible to derived classes.
In C++11, an inaccessible destructor is considered implicitly deleted and this causes the following type of compilation errors.

f.h:82:13: error: deleted function '~C3' cannot override a non-deleted function
            C3:
            ^
f.h:61:15: note: overridden virtual function is here
      virtual ~
              ^
f.h:83:15: note: destructor of 'C3' is implicitly deleted because base class '(anonymous namespace)::AAA' has an inaccessible destructor
              AAA {
              ^

Diff Detail

Event Timeline

tigerleapgorge created this revision.Feb 14 2017, 4:02 PM
tigerleapgorge abandoned this revision.Feb 24 2017, 3:28 PM

D20710 is a superset of this patch.
D20710 has been committed in rL296184.
No need for this patch.