sgatev added inline comments.
================ Comment at: clang/include/clang/Analysis/FlowSensitive/Value.h:189 public: - explicit PointerValue(StorageLocation &PointeeLoc) + explicit PointerValue(StorageLocation *PointeeLoc) : Value(Kind::Pointer), PointeeLoc(PointeeLoc) {} ---------------- Can you please document when this can be null? ================ Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:266-267 - auto &Loc = Env.createStorageLocation(*S); - Env.setStorageLocation(*S, Loc); - Env.setValue(Loc, Env.takeOwnership(std::make_unique<ReferenceValue>( - SubExprVal->getPointeeLoc()))); + // If PointeeLoc is null, then we are dereferencing a nullptr, skip + // creating a value for the dereference + if (auto *PointeeLoc = SubExprVal->getPointeeLoc()) { ---------------- Can you please add a test for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127746/new/ https://reviews.llvm.org/D127746 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits