[PATCH] Proposal on how to fix temporary dtors.

Jordan Rose jordan_rose at apple.com
Thu Jun 19 09:30:59 PDT 2014


I think the algorithm makes sense. I'm not sure it's different, though, than just passing up the first (or last) CXXBindTemporaryExpr visited for a given expression, which would look like this:

    // For a logical expression...
    VisitForTemporaryDtors(E->getLHS(), false, &LastBTE);
    const CXXBindTemporaryExpr *InnerBTE = nullptr;
    VisitForTemporaryDtors(E->getRHS(), false, &InnerBTE);
    InsertTempDtorDecisionBlock(InnerBTE);

Are there any cases that wouldn't cover?

http://reviews.llvm.org/D3627






More information about the cfe-commits mailing list