File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,19 @@ import codingstandards.c.Signal
21
21
*/
22
22
class UnsafeSharedVariableAccess extends VariableAccess {
23
23
UnsafeSharedVariableAccess ( ) {
24
- // static or thread local storage duration
25
- (
26
- this .getTarget ( ) instanceof StaticStorageDurationVariable or
27
- this .getTarget ( ) .isThreadLocal ( )
28
- ) and
29
24
// excluding `volatile sig_atomic_t` type
30
25
not this .getType ( ) .( SigAtomicType ) .isVolatile ( ) and
31
- // excluding lock-free atomic objects
32
- not exists ( MacroInvocation mi , VariableAccess va |
33
- mi .getMacroName ( ) = "atomic_is_lock_free" and
34
- mi .getExpr ( ) .getChild ( 0 ) = va .getEnclosingElement * ( ) and
35
- va .getTarget ( ) = this .getTarget ( )
26
+ exists ( Variable target | target = this .getTarget ( ) |
27
+ // static or thread local storage duration
28
+ (
29
+ target instanceof StaticStorageDurationVariable or
30
+ target .isThreadLocal ( )
31
+ ) and
32
+ // excluding lock-free atomic objects
33
+ not exists ( MacroInvocation mi , VariableAccess va | va .getTarget ( ) = target |
34
+ mi .getMacroName ( ) = "atomic_is_lock_free" and
35
+ mi .getExpr ( ) .getChild ( 0 ) = va .getEnclosingElement * ( )
36
+ )
36
37
)
37
38
}
38
39
}
You can’t perform that action at this time.
0 commit comments