[llvm] [llvm] Validate Parent object before dereference (PR #157460)

Daniel Kuts via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 01:38:47 PDT 2025


apach301 wrote:

> Could you add a test case showing this problem, please?

That was a static analyzer report, so I don't know how to run this code or have any input data. But the problem is in syntactically inconsistent code: the pointer `Parent` is dereferenced to call a method, and in its parameter it is checked on NULL. This check should be either placed before first dereference, or removed completely as redundant.

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


More information about the llvm-commits mailing list