File tree 1 file changed +9
-5
lines changed
c/misra/src/rules/RULE-7-4
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,17 @@ class WideCharPointerType extends PointerType {
20
20
override string getAPrimaryQlClass ( ) { result = "WideCharPointerType" }
21
21
}
22
22
23
- class GenericCharPointerType extends PointerType {
23
+ class GenericCharPointerType extends Type {
24
24
GenericCharPointerType ( ) {
25
- /* This type resolves to wchar_t* (which is in turn a typedef depending on its implementation) */
26
- this . resolveTypedefs * ( ) instanceof WideCharPointerType
25
+ // A wide char pointer type
26
+ this instanceof WideCharPointerType
27
27
or
28
- /* This type eventually resolves to char* */
29
- this .resolveTypedefs * ( ) instanceof CharPointerType
28
+ // A char pointer type
29
+ this .getUnspecifiedType ( ) instanceof CharPointerType
30
+ or
31
+ // A typedef to any such type.
32
+ // Note: wchar_t is usually a typedef, so we cannot just use getUnspecifiedType() here.
33
+ this .( TypedefType ) .getBaseType ( ) instanceof GenericCharPointerType
30
34
}
31
35
}
32
36
You can’t perform that action at this time.
0 commit comments