[clang] [Clang] Fix potential null pointer dereferences in Sema::AddInitializerToDecl (PR #94368)

Fred Grim via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 4 09:04:22 PDT 2024


https://github.com/feg208 commented:

Why add the check here rather than add an assertion at the point of assignation (i.e.
```
Init = Result.getAs<Expr>();
```
Since Init is passed into CheckSelfReference on line 13712 where it's dereferenced the same issue binds there as well

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


More information about the cfe-commits mailing list