We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79b679c commit 24b9f37Copy full SHA for 24b9f37
cpp/misra/src/rules/RULE-21-6-3/AdvancedMemoryManagementUsed.ql
@@ -68,6 +68,10 @@ class NonStandardDeleteOrDeleteArrayOperator extends CustomOperatorNewOrDelete {
68
}
69
70
71
+class ExplicitDestructorCall extends DestructorCall {
72
+ ExplicitDestructorCall() { not this.isCompilerGenerated() }
73
+}
74
+
75
from Element element, string message
76
where
77
not isExcluded(element, Memory6Package::advancedMemoryManagementUsedQuery()) and
@@ -87,7 +91,7 @@ where
87
91
or
88
92
(
89
93
element instanceof VacuousDestructorCall or
90
- element instanceof DestructorCall
94
+ element instanceof ExplicitDestructorCall
95
) and
96
message = "This expression is a call to a destructor."
97
0 commit comments