rjmccall added a comment. I'm fine with being more aggressive about this, and I agree that the standard should be making aliasing UB here. We use a similarly aggressive rule with return values: NRVO can allow direct access to the return slot, which we mark `noalias`, but which can in fact be aliased if we're doing copy-elision in the caller. IIRC the standard has analogously weak wording about what's supposed to happen in that case, but UB is really the only sensible rule.
Repository: rC Clang https://reviews.llvm.org/D46441 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits