Skip to content

Commit 8f65892

Browse files
authoredMar 25, 2025··
Merge pull request #867 from github/michaelrfairhurst/implement-package-generics
Implement generics package
2 parents 259dc5c + 6245f72 commit 8f65892

File tree

103 files changed

+2821
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2821
-274
lines changed
 

‎c/cert/src/rules/ARR39-C/DoNotAddOrSubtractAScaledIntegerToAPointer.ql

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import cpp
1515
import codingstandards.c.cert
16-
import codingstandards.cpp.Pointers
16+
import codingstandards.cpp.types.Pointers
1717
import semmle.code.cpp.dataflow.TaintTracking
1818
import ScaledIntegerPointerArithmeticFlow::PathGraph
1919

‎c/cert/src/rules/DCL40-C/IncompatibleFunctionDeclarations.ql

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import cpp
1818
import codingstandards.c.cert
19-
import codingstandards.cpp.Compatible
19+
import codingstandards.cpp.types.Compatible
2020
import ExternalIdentifiers
2121

2222
from ExternalIdentifiers d, FunctionDeclarationEntry f1, FunctionDeclarationEntry f2
@@ -29,12 +29,10 @@ where
2929
f1.getName() = f2.getName() and
3030
(
3131
//return type check
32-
not typesCompatible(f1.getType(), f2.getType())
32+
not FunctionDeclarationTypeEquivalence<TypesCompatibleConfig>::equalReturnTypes(f1, f2)
3333
or
3434
//parameter type check
35-
parameterTypesIncompatible(f1, f2)
36-
or
37-
not f1.getNumberOfParameters() = f2.getNumberOfParameters()
35+
not FunctionDeclarationTypeEquivalence<TypesCompatibleConfig>::equalParameterTypes(f1, f2)
3836
) and
3937
// Apply ordering on start line, trying to avoid the optimiser applying this join too early
4038
// in the pipeline

0 commit comments

Comments
 (0)
Please sign in to comment.