This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Description
After looking at the (filtered) results on some real world code I think sometimes the current error messages are rather hard to grok. One of the main reason is that the reader have no idea how the calls are evaluated.
Consider the following code:
std::string_view v = p->getAttribute("AttributeName");
use(v); // warning
We might get a warning about v dangling, but we have no idea why would it dangle. In this case having a note like Assuming getAttribute returns an object with the same lifetime as its argument would help a lot. Because the code above is false positive, the lifetime of the returned pointer is tied to p and not to the argument. Having a note like this makes the problem quite apparent, and gives a hint to the user how to annotate getAttribute to get rid of the warning.