forked from OSchip/llvm-project
[SCEV] Fix GCC -Wnon-virtual-dtor
SCEVPredicate has a friend declaration. The friend can technically call the protected destructor, so the warning is legitimate. Clang simply doesn't implement the friend check. Make the dtor virtual to fix the issue.
This commit is contained in:
parent
85fd44d7fe
commit
4852c770fe
|
@ -209,7 +209,8 @@ public:
|
|||
|
||||
protected:
|
||||
SCEVPredicateKind Kind;
|
||||
~SCEVPredicate() = default;
|
||||
// Use virtual to suppress -Wnon-virtual-dtor in the presence of friend.
|
||||
virtual ~SCEVPredicate() = default;
|
||||
SCEVPredicate(const SCEVPredicate &) = default;
|
||||
SCEVPredicate &operator=(const SCEVPredicate &) = default;
|
||||
|
||||
|
|
Loading…
Reference in New Issue