steakhal added a comment.

In D96586#2601856 <https://reviews.llvm.org/D96586#2601856>, @NoQ wrote:

>> `-analyzer-opt-analyze-headers`
>
> I'm actually shocked that we provide such option at all. And that it's the 
> first option in the list in `scan-build --help`. And that I haven't noticed 
> it until now despite that.

I didn't know about this option either xD

> How did you discover the crash? Are people actually using it?

If I remember correctly, one of our test runs, analyzing the clang's source 
code with shallow and deep CTU configuration crashed.
The CodeChecker was driving the analysis, but if a configuration can crash the 
analyzer that is a problem for sure.
We always provide this flag here 
<https://github.com/Ericsson/codechecker/blob/33c16d464835ee8fe321eda05de7b5baea2dbaa3/analyzer/codechecker_analyzer/analyzers/clangsa/analyzer.py#L180-L184>.

Luckily, Richard's commit fixed this without any direct intent :D That is why I 
want to pin this via this regression test.

The funny thing is that no headers are involved, yet the crash depends on the 
`-analyzer-opt-analyze-headers` flag.

> "Force the static analyzer to analyze functions defined in header files"

I'm not sure how can this flag influence that, as no header files are involved 
in this reproducer.
I didn't feel like the time not worth investigating this more thoroughly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96586/new/

https://reviews.llvm.org/D96586

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

Reply via email to