efriedma added inline comments.

================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1279
+      if (isa<MaterializeTemporaryExpr>(E))
+        return nullptr;
+
----------------
This needs a comment explaining why we're bailing out here.


================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1664
 
   // FIXME: Implement C++11 [basic.start.init]p2: if the initializer of a
   // reference is a constant expression, and the reference binds to a 
temporary,
----------------
You can probably delete this FIXME comment.


================
Comment at: clang/lib/CodeGen/CGExprConstant.cpp:1670
   // desired value of the referee.
-  if (destType->isReferenceType())
-    return nullptr;
+  if (!destType->isLValueReferenceType()) {
+    QualType nonMemoryDestType = getNonMemoryType(CGM, destType);
----------------
Why are you changing this to "isLValueReferenceType"?  I think rvalue 
references need to be handled basically the same way as lvalue references.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151587/new/

https://reviews.llvm.org/D151587

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

Reply via email to