martong added inline comments.
================ Comment at: clang/lib/StaticAnalyzer/Core/ConstraintManager.cpp:51 + ProgramStateRef StFalse = assume(State, Cond, false); + if (!StFalse) { // both infeasible + ProgramStateRef Infeasible = State->cloneAsInfeasible(); ---------------- steakhal wrote: > Should we mark this `LLVM_UNLIKELY(cond)`? > I would expect this function to be quite hot, and infeasible states rare. > > Could we measure this one? Yes, it could be. Let me come back with some measurement results soon. I am going to use llvm statistics macros to measure this, but that makes sense on top of D124758 ================ Comment at: clang/test/Analysis/sink-infeasible.c:37-48 + /* The BASELINE passes these checks ('wrning' is used to avoid lit to match) + // The parent state is already infeasible, look at this contradiction: + clang_analyzer_eval(b > 0); // expected-wrning{{FALSE}} + clang_analyzer_eval(b <= 0); // expected-wrning{{FALSE}} + // Crashes with expensive checks. + if (b > 0) { + clang_analyzer_warnIfReached(); // no-warning, OK ---------------- steakhal wrote: > You could use a non-default check prefix. No I can't, because this test code in the comment is meaningful only in the baseline, I cannot run both clang versions from lit. So, actually there is no RUN line for these, it is here only to demonstrate what happens in the baseline. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124674/new/ https://reviews.llvm.org/D124674 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits