On 04/18, co...@sdf.org wrote: > Hi, > > I'm trying clang static analyzer. > It seems to assume that KASSERT(a != 0) => test what happens if a == 0 in the > rest of the function > any idea how to convince it to stop doing that?
Questions 1, 2, 10, and 11 of the FAQ might be of interest: https://clang-analyzer.llvm.org/faq.html And in question 10, it references custom assertion handlers: https://clang-analyzer.llvm.org/annotations.html#custom_assertions But as Taylor Campbell noted, if KASSERT sometimes does not return but other times *does* return, then it's problematic for the analyzer since it considers an assertion handler to be a function that does not return. Lewis