11import semmle.code.cil.Attribute
22import semmle.code.cil.Declaration
33
4+ private predicate isOsSpecific ( Declaration d ) { d .getQualifiedName ( ) .matches ( "%libobjc%" ) }
5+
46query predicate attrNoArg ( string dec , string attr ) {
57 exists ( Declaration d , Attribute a |
8+ not isOsSpecific ( d ) and
69 a .getDeclaration ( ) = d and
710 not exists ( a .getAnArgument ( ) )
811 |
@@ -14,6 +17,7 @@ query predicate attrNoArg(string dec, string attr) {
1417query predicate attrArgNamed ( string dec , string attr , string name , string value ) {
1518 exists ( Declaration d , Attribute a |
1619 a .getDeclaration ( ) = d and
20+ not isOsSpecific ( d ) and
1721 a .getNamedArgument ( name ) = value
1822 |
1923 dec = d .toStringWithTypes ( ) and
@@ -24,6 +28,7 @@ query predicate attrArgNamed(string dec, string attr, string name, string value)
2428query predicate attrArgPositional ( string dec , string attr , int index , string value ) {
2529 exists ( Declaration d , Attribute a |
2630 a .getDeclaration ( ) = d and
31+ not isOsSpecific ( d ) and
2732 a .getArgument ( index ) = value
2833 |
2934 dec = d .toStringWithTypes ( ) and
0 commit comments