[PATCH] D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC).
    Balázs Benics via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Sat Mar 20 09:56:30 PDT 2021
    
    
  
steakhal added inline comments.
================
Comment at: clang/test/Analysis/pthreadlock_state.c:55
+  // CHECK-NEXT:      "mtx: conj_$11{int, LC1, S1874, #1}", 
+  // CHECK-NEXT:      ""
+  // CHECK-NEXT:    ]}
----------------
Out of curiosity, what is the purpose of this 'empty' line? I've seen it many times in other tests but I still don't know.
================
Comment at: clang/test/Analysis/pthreadlock_state.c:70
+  // CHECK-NEXT:      "Mutexes in unresolved possibly destroyed state:", 
+  // CHECK-NEXT:      "SymRegion{reg_$12<pthread_mutex_t * mtx1>}: conj_$15{int, LC1, S1921, #1}", 
+  // CHECK-NEXT:      ""
----------------
I recommend not hardcoding symbol identifier numbers. `reg$NN`, `conj_$NN`, `LCNN`, `SNNNN`
It would result in a less fragile test.
I'm pretty sure you can use some regexp to achieve this.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98502/new/
https://reviews.llvm.org/D98502
    
    
More information about the cfe-commits
mailing list