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
2121 */
2222class UnsafeSharedVariableAccess extends VariableAccess {
2323 UnsafeSharedVariableAccess ( ) {
24- // static or thread local storage duration
25- (
26- this .getTarget ( ) instanceof StaticStorageDurationVariable or
27- this .getTarget ( ) .isThreadLocal ( )
28- ) and
2924 // excluding `volatile sig_atomic_t` type
3025 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+ )
3637 )
3738 }
3839}
You can’t perform that action at this time.
0 commit comments