We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d13d596 commit e13583fCopy full SHA for e13583f
cpp/misra/src/rules/RULE-21-6-3/AdvancedMemoryManagementUsed.ql
@@ -55,8 +55,8 @@ class UserDeclaredOperatorNewOrDelete extends FunctionDeclarationEntry {
55
/* Not in a file called `new`, which is likely to be a stub of the standard library */
56
not this.getFile().getBaseName() = "new" and
57
(
58
- this.getName().regexpMatch("operator new(\\[\\])?") or
59
- this.getName().regexpMatch("operator delete(\\[\\])?")
+ this.getName() in ["operator new", "operator new[]"] or
+ this.getName() in ["operator delete", "operator delete[]"]
60
)
61
}
62
0 commit comments