NoQ added inline comments.

================
Comment at: lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:177
+          assert(VD->getType()->isReferenceType());
+          if (VD->getType()->getPointeeType().getCanonicalType() !=
+              MTE->GetTemporaryExpr()->getType().getCanonicalType()) {
----------------
dcoughlin wrote:
> 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?
> skipRValueSubobjectAdjustments()

This function doesn't do anything anymore (since rC288563) (in most cases, at 
least). We now have lvalue sub-objects adjustments that are outside of 
`MaterializeTemporaryExpr`, and i'm trying to see if there are any by comparing 
the variable type with the temporary type. If there are still any rvalue 
sub-object adjustments present in the AST, then i'd have to skip them, as an 
additional step.


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

Reply via email to