File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
cpp/misra/src/rules/RULE-21-6-3 Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1515
1616import cpp
1717import codingstandards.cpp.misra
18- import codingstandards.cpp.UnintializedMemoryAllocation
18+ import codingstandards.cpp.standardlibrary.Memory
1919import codingstandards.cpp.allocations.CustomOperatorNewDelete
2020
2121class AdvancedMemoryManagementFunction extends Function {
@@ -54,10 +54,7 @@ class UserDeclaredOperatorNewOrDelete extends FunctionDeclarationEntry {
5454 exists ( this .getFile ( ) .getRelativePath ( ) ) and
5555 /* Not in a file called `new`, which is likely to be a stub of the standard library */
5656 not this .getFile ( ) .getBaseName ( ) = "new" and
57- (
58- this .getName ( ) in [ "operator new" , "operator new[]" ] or
59- this .getName ( ) in [ "operator delete" , "operator delete[]" ]
60- )
57+ this .getFunction ( ) instanceof OperatorNewOrDelete
6158 }
6259}
6360
You can’t perform that action at this time.
0 commit comments