efriedma added a comment.

skipRValueSubobjectAdjustments has to match the rules in `[class.temporary]` in 
the standard, which includes skipping over certain explicit casts.

Would it be enough to accumulate the skipped casts into a SmallVector, like we 
do for the skipped comma operators?



================
Comment at: test/CodeGenCXX/const-init-cxx11.cpp:229
   // This creates a non-const temporary and binds a reference to it.
-  // CHECK: @[[TEMP:.*]] = internal global {{.*}} { i32 5 }, align 4
+  // CHECK: @[[TEMP:.*]] = internal constant {{.*}} { i32 5 }, align 4
   // CHECK: @_ZN16LiteralReference3litE = constant {{.*}} @[[TEMP]], align 8
----------------
This change is suspect; note the comment "this creates a non-const temporary".


Repository:
  rC Clang

https://reviews.llvm.org/D49508



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to