File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -22,17 +22,15 @@ import codingstandards.cpp.Concurrency
2222class CThreadRoot extends Function {
2323 CThreadCreateCall threadCreate ;
2424
25- CThreadRoot ( ) {
26- threadCreate .getFunction ( ) = this
27- }
25+ CThreadRoot ( ) { threadCreate .getFunction ( ) = this }
2826
2927 /* Get a function which is reachable from this function */
3028 Function getAReachableFunction ( ) { calls * ( result ) }
3129
3230 CThreadCreateCall getCThreadCreateCall ( ) { result = threadCreate }
3331}
3432
35- from CThreadCreateCall tc , CThreadRoot threadRoot
33+ from CThreadCreateCall tc , CThreadRoot threadRoot
3634where
3735 not isExcluded ( tc , Concurrency6Package:: threadCreatedByThreadQuery ( ) ) and
3836 tc .getEnclosingFunction ( ) = threadRoot .getAReachableFunction ( )
Original file line number Diff line number Diff line change 2828 or
2929 exists ( PointerFieldAccess fa |
3030 expr = fa and
31- fa .getQualifier ( ) .getType ( ) .stripTopLevelSpecifiers ( ) .( PointerType ) .getBaseType ( ) .hasSpecifier ( "atomic" ) and
31+ fa .getQualifier ( )
32+ .getType ( )
33+ .stripTopLevelSpecifiers ( )
34+ .( PointerType )
35+ .getBaseType ( )
36+ .hasSpecifier ( "atomic" ) and
3237 field = fa .getTarget ( )
3338 )
3439 )
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ void f(int p) {
7878 atomic_thread_fence (memory_order_seq_cst * 1 ); // COMPLIANT
7979 atomic_thread_fence (1 ); // NON-COMPLIANT
8080 atomic_thread_fence (100 ); // NON-COMPLIANT
81- atomic_thread_fence (g1 + 1 ); // NON_COMPLIANT[FALSE_NEGATIVE]
81+ atomic_thread_fence (g1 + 1 ); // NON_COMPLIANT[FALSE_NEGATIVE]
8282
8383 // No unsafe flow, currently accepted:
8484 atomic_thread_fence (p ); // COMPLIANT
You can’t perform that action at this time.
0 commit comments