Skip to content

Commit 7e0ff96

Browse files
Ensure Config::resolvesTypedefs() enforced, remove comments
1 parent 4b8cdd3 commit 7e0ff96

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

c/misra/src/rules/RULE-8-4/CompatibleDeclarationFunctionDefined.ql

-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ where
5252
not FunctionDeclarationTypeEquivalence<TypesCompatibleConfig, interestedInFunctions/2>::equalReturnTypes(f1,
5353
f2)
5454
or
55-
//not compatibleReturns(f1, f2)
5655
//parameter types differ
5756
not FunctionDeclarationTypeEquivalence<TypesCompatibleConfig, interestedInFunctions/2>::equalParameterTypes(f1,
5857
f2)
5958
or
60-
//not compatibleParams(f1, f2)
6159
//parameter names differ
6260
parameterNamesUnmatched(f1, f2)
6361
)

cpp/common/src/codingstandards/cpp/types/Compatible.qll

+3-2
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,6 @@ module TypeEquivalence<TypeEquivalenceSig Config, interestedInEquality/2 interes
390390
or
391391
equalDerivedTypes(t1, t2)
392392
or
393-
equalTypedefTypes(t1, t2)
394-
or
395393
equalFunctionTypes(t1, t2)
396394
or
397395
Config::resolveTypedefs() and
@@ -400,6 +398,9 @@ module TypeEquivalence<TypeEquivalenceSig Config, interestedInEquality/2 interes
400398
or
401399
equalTypes(t1, t2.(TypedefType).getBaseType())
402400
)
401+
or
402+
not Config::resolveTypedefs() and
403+
equalTypedefTypes(t1, t2)
403404
)
404405
)
405406
}

0 commit comments

Comments
 (0)