If we dereference a dangling pointer (pointee went out of scope) multiple times we will get multiple warnings. We unique warnings based on the report location. But in fact, all the errors were the same. So maybe we should have emitted only one warning per pointee out of scope. So maybe, for some warnings, we should use the notes as a uniqueing location instead of the actual warning. The clang static analyzer does something similar for leaks, instead of reporting them on every path, it reports leaks only once per allocation site.
If we dereference a dangling pointer (pointee went out of scope) multiple times we will get multiple warnings. We unique warnings based on the report location. But in fact, all the errors were the same. So maybe we should have emitted only one warning per pointee out of scope. So maybe, for some warnings, we should use the notes as a uniqueing location instead of the actual warning. The clang static analyzer does something similar for leaks, instead of reporting them on every path, it reports leaks only once per allocation site.