[PATCH] D52398: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 4 06:25:13 PDT 2018


hokein added a comment.

Hi, @aaronpuchert, the patch has caused many new warnings in our internal codebase, below is a reduced one. Do you mind reverting the patch?

  // if the condition is not true, CHECK will terminate the program.
  #define CHECK(condition) (__builtin_expect((condition), true)) ? 1 : 0
  
  void foo() {
      CHECK(mu.TryLock()); 
      mu.Unlock();
  }


Repository:
  rL LLVM

https://reviews.llvm.org/D52398





More information about the cfe-commits mailing list