[cfe-dev] Assertion in BugReport::getLocation()?
Ádám Balogh via cfe-dev
cfe-dev at lists.llvm.org
Mon Sep 30 06:25:21 PDT 2019
Hello,
We have a checker that we plan to open source, but it crashes upon a strange assertion. We create a non-fatal `BugReport` which we try to emit. Before emitting the code tries to check whether its location is valid using `getLocation(...).isValid()`, to prevent assertion in `emit()`, however `getLocation()` itself already asserts that the location is valid. This makes the `isValid()` function useless because we cannot get the location to check whether its is valid because it crashes with assertion if it is not. Of course the location should be valid in a non-fatal error node (probably this is the root problem), but there is no way to check it. What is the reason for this assertion in `getLocation()`? How to check its validity? What can make the location of a non-fatal `BugReport` invalid? Thanks for the answers in advance!
Regards,
Ádám
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190930/ff358547/attachment.html>
More information about the cfe-dev
mailing list