- Replace
malloc
+memset
withcalloc
- Replace
malloc(X*Y)
withreallocarray(X, Y)
Clang Matchers
edit- Match return expression on
returnStmt
- Extend
hasParameter
toFunctionProtoType
nodes - Extend
returns
toFunctionProtoType
nodes - Extend
parameterCountIs
toFunctionProtoType
nodes - Extend
hasAnyParameter
toFunctionProtoType
nodes - Match statement ordering in a
compoundStmt
block