NoQ added a subscriber: NoQ.
NoQ added a comment.

While investigating http://reviews.llvm.org/D12726 , i accidentally came up 
with a way to test this patch; with the extension of `ExprInspectionChecker` in 
the aforementioned review, which allows testing SymbolReaper directly, the 
following test passes as soon as the old (accepted) version of this diff is 
applied:

  void clang_analyzer_warnOnDeadSymbol(int);
  void clang_analyzer_warnIfReached(void);
  
  // SymbolRegionValue should live as long as its region is live but has no
  // direct bindings that override its value.
  void test_region_value_lifetime_after_binding(int x) {
    clang_analyzer_warnOnDeadSymbol(x);
    if (x) {}
    x = 0;
    (void)0; // expected-warning{{SYMBOL DEAD}}
    if (x) {
      clang_analyzer_warnIfReached(); // no-warning
    }
  } // no-warning


http://reviews.llvm.org/D5104



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to