[clang] [clang][analyzer] Check for label location bindings in `DereferenceChecker` (PR #91119)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sun May 5 06:50:25 PDT 2024


https://github.com/steakhal requested changes to this pull request.

The `llvm::errs()` are for only debugging stuff. The print to the stderr.
However, to form a bug report you need to use the `reportBug` here, and you also need to define a new `BugType` for representing this bug kind.
Once that's done, you should have a fatal bug report at the dereference location, causing the path to sink and never reach the next statement where we would dump the value associated with that variable.

The test is already present in the tree, as `clang/test/Analysis/gh-issue-89185.c`.
If you implementation is correct, that test should fail because we report a new bug there.

https://github.com/llvm/llvm-project/pull/91119


More information about the cfe-commits mailing list