File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
c/misra/src/rules/RULE-7-4 Expand file tree Collapse file tree 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 {
2020 override string getAPrimaryQlClass ( ) { result = "WideCharPointerType" }
2121}
2222
23- class GenericCharPointerType extends PointerType {
23+ class GenericCharPointerType extends Type {
2424 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
2727 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
3034 }
3135}
3236
You can’t perform that action at this time.
0 commit comments