mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
[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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user