================
@@ -17726,6 +17764,10 @@ static bool EvaluateAsStringImpl(Sema &SemaRef, Expr 
*Message,
 
   SourceLocation Loc = Message->getBeginLoc();
   QualType T = Message->getType().getNonReferenceType();
+  if (T->isPointerType() && T->getPointeeType()->isCharType())
+    return EvaluateAsNullTerminatedCharBuffer(
+        SemaRef, Message, Result, Ctx, EvalContext, ErrorOnInvalidMessage);
+
----------------
ojhunt wrote:

A _gross_ option would be to have a langopt + "enable this" cli flag, but that 
would imply people be able to rely on being able to do this.

https://github.com/llvm/llvm-project/pull/173140
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to