sgatev added inline comments.
================ Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:345 + // FIXME: Support reference-type returns. + assert(Val->getKind() != Value::Kind::Reference); + ---------------- Let's do `if (Val->getKind() == Value::Kind::Reference) return;`. Otherwise the framework will be unusable in practice. ================ Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:348 + auto *Loc = Env.getReturnStorageLocation(); + assert(Loc != nullptr); + // FIXME: Model NRVO. ---------------- Let's do `if (Loc == nullptr) return;` ================ Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:564 + assert(ReturnLoc != nullptr); + Env.setStorageLocation(*S, *ReturnLoc); + Env.popCall(ExitEnv); ---------------- We use stable storage locations to ensure convergence. In that spirit, shouldn't we assign `ReturnLoc`'s value to `S`'s storage location instead of changing the storage location? Alternatively, we can pass `S`'s storage location to `pushCall` so that it can store it as `ReturnLoc`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130600/new/ https://reviews.llvm.org/D130600 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits