The check bugprone-exception-escape should not register
if -fno-exceptions is set for the compile options. Bailing out on non-cplusplus
and non-exceptions language options resolves the issue.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This should definitly be backported, as exception-escape is in 7.0 and it hangs up on no-except builds
How shall i test it? It feels that this condition should have been there from the beginning on, as the check only makes sense in c++ and with exceptions.
I'm guessing you need a run line with -x c, and with -x c++ -fno-exceptions, not sure about the contents of the file, but the clang-tidy crashes are easy to creduce.
Have you figured out why exactly does the check hang? Disabling it for -fno-exceptions may just hide a logical problem in the check.
(disabling it for these cases seems to be the right thing to do anyways, but it might be nice to use the opportunity to investigate the possible issue deeper)
I did not investigate further, as the fix was so straight forward. I did verify it works though and that it actually fixes the issue :)
Deeper analysis could be done by @baloghadamsoftware as the original author?
This patch does not fix the underlying issue. I do have a candidate that might cause it, but I am not sure if it is functionally preserving (tests seems to work though!). I think it is best if @baloghadamsoftware takes a look at it as well!