Skip to content

Commit 2c106bc

Browse files
committed
EssentialType: Handle type specifiers
Ensure when calculating the essential type category, we strip the type specifiers, otherwise we will not match the correct type category.
1 parent ebae3e6 commit 2c106bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c/misra/src/codingstandards/c/misra/EssentialTypes.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private IntegralType stlr(Expr const) {
7979
EssentialTypeCategory getEssentialTypeCategory(Type type) {
8080
exists(Type essentialType |
8181
// Resolve typedefs to ensure
82-
essentialType = type.getUnderlyingType()
82+
essentialType = type.getUnspecifiedType()
8383
|
8484
result = EssentiallyBooleanType() and essentialType instanceof MisraBoolType
8585
or

0 commit comments

Comments
 (0)