dcoughlin accepted this revision. dcoughlin added inline comments. This revision is now accepted and ready to land.
================ Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h:70 + /// by binding a smaller object within it to a reference. + bool IsTemporaryLifetimeExtendedViaSubobject = false; ---------------- Would you be willing to add a tiny code example to the comment? I.e., `const int &x = C().x` ================ Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:177 + assert(VD->getType()->isReferenceType()); + if (VD->getType()->getPointeeType().getCanonicalType() != + MTE->GetTemporaryExpr()->getType().getCanonicalType()) { ---------------- I *think* this is safe. But it seems like it would be more direct to use skipRValueSubobjectAdjustments() and check for sub-object adjustments since ultimately that is what you care about, right? Repository: rC Clang https://reviews.llvm.org/D43689 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits