You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reportError(tok, Severity::error, "virtualDestructor", "Class '" + Base + "' which is inherited by class '" + Derived + "' does not have a virtual destructor.\n"
1494
-
"Class '" + Base + "' which is inherited by class '" + Derived + "' does not have a virtual destructor. "
1495
-
"If you destroy instances of the derived class by deleting a pointer that points to the base class, only "
1496
-
"the destructor of the base class is executed. Thus, dynamic memory that is managed by the derived class "
1497
-
"could leak. This can be avoided by adding a virtual destructor to the base class.");
1523
+
if (inconclusive)
1524
+
reportError(tok, Severity::warning, "virtualDestructor", "Class '" + Base + "' which has virtual members does not have a virtual destructor.", true);
1525
+
else
1526
+
reportError(tok, Severity::error, "virtualDestructor", "Class '" + Base + "' which is inherited by class '" + Derived + "' does not have a virtual destructor.\n"
1527
+
"Class '" + Base + "' which is inherited by class '" + Derived + "' does not have a virtual destructor. "
1528
+
"If you destroy instances of the derived class by deleting a pointer that points to the base class, only "
1529
+
"the destructor of the base class is executed. Thus, dynamic memory that is managed by the derived class "
1530
+
"could leak. This can be avoided by adding a virtual destructor to the base class.");
0 commit comments