================ @@ -1703,7 +1703,7 @@ namespace { bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) { if (Designator.Invalid) return false; - if (IsNullPtr) { + if (getLValueBase().isNull()) { ---------------- tbaederr wrote:
The offset is added in `adjustOffset()`, which calls `clearIsNullPointer()`. This is called _before_ we call `addDecl()`, so at that point the pointer is already considered non-null. https://github.com/llvm/llvm-project/pull/113885 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits