schittir marked an inline comment as done. schittir added inline comments.
================ Comment at: clang/lib/Analysis/CFG.cpp:4156 // CFG generation for unevaluated operands. - if (S && !S->isTypeDependent() && S->isPotentiallyEvaluated()) + if (!S->isTypeDependent() && S->isPotentiallyEvaluated()) return VisitChildren(S); ---------------- erichkeane wrote: > I get that we're counting on the dereference on 4145 to have made this check > irrelevant, but are we sure that we KNOW that "S" is non-null here otherwise? > That is, is the bug actually 4145 doing 'alwaysAdd' without checking vs the > unnecessary check here? VisitCXXTypeidExpr is used only in one place - here https://github.com/llvm/llvm-project/blob/a89c9b35be08b665cc1a01d840bc20349ba1308f/clang/lib/Analysis/CFG.cpp#L2288 where S is not null. Null check for S already happens at the beginning of the method where VisitCXXTypeidExpr is called. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153589/new/ https://reviews.llvm.org/D153589 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits