Prazek added a comment.

So the problem I got is that every time I want to check if there is already a 
feature in clang-tidy/static-analyzer that solves my issue, I either have to 
deal with static-analyzer command line, which is horrible, or I have to modify 
and recompile the source code.

The case I was looking at is a check to find

  int *p = g():
  *p = 42;
  if(!p) {g(): }

I wanted to find null checks after the pointer was dereferenced, and indeed I 
found it in deadcode or unreachable code analysis in static-analyzer.

I am not sure what you are afraid of - as long as this feature is not turned by 
default everything should be fine. If someone would turn it on then as long as 
he doesn't see any false positives then everything is still fine, and it can 
always disable flag.

AFAIK there is a way to specify in cl::opt that the option is hidden, which 
could probably solve your concerns?


https://reviews.llvm.org/D28729



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

Reply via email to