C++: Autoformat.

This commit is contained in:
Geoffrey White
2020-04-02 09:50:14 +01:00
parent 8d3d088ae8
commit ead5feb921
2 changed files with 5 additions and 4 deletions

View File

@@ -226,7 +226,8 @@ class OperatorNewAllocationFunction extends AllocationFunction {
hasGlobalName(name) and
(
// operator new(bytes, ...)
name = "operator new" or
name = "operator new"
or
// operator new[](bytes, ...)
name = "operator new[]"
)
@@ -260,8 +261,7 @@ class CallAllocationExpr extends AllocationExpr, FunctionCall {
not (
exists(target.getReallocPtrArg()) and
getArgument(target.getSizeArg()).getValue().toInt() = 0
)
and
) and
// these are modelled directly (and more accurately), avoid duplication
not exists(NewOrNewArrayExpr new | new.getAllocatorCall() = this)
}

View File

@@ -90,7 +90,8 @@ class OperatorDeleteDeallocationFunction extends DeallocationFunction {
hasGlobalName(name) and
(
// operator delete(pointer, ...)
name = "operator delete" or
name = "operator delete"
or
// operator delete[](pointer, ...)
name = "operator delete[]"
)