================
@@ -5992,6 +5992,15 @@ static ExprResult BuildConvertedConstantExpression(Sema 
&S, Expr *From,
                                   /*InOverloadResolution=*/false,
                                   /*AllowObjCWritebackConversion=*/false,
                                   /*AllowExplicit=*/false);
+
+  // TryCopyInitialization returns incorrect info for attempts to bind 
reference
+  // to bit-field due to C++ [over.ics.ref]p4, so check it here.
+  if (From->refersToBitField() && T.getTypePtr()->isReferenceType()) {
+    return S.Diag(From->getBeginLoc(),
+                  diag::err_reference_bind_to_bitfield_in_cce)
+           << From->getSourceRange();
+  }
----------------
bolshakov-a wrote:

This citation is already present here. I've moved the new code closer to the 
last cited piece.

https://github.com/llvm/llvm-project/pull/71077
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to