================ @@ -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); + ---------------- cor3ntin wrote:
The problem of doing that here is that it is a non-standard behavior. So at the minimum we'd need extension warnings. But I'm a bit uncomfortable adding that extension to begin with. I think the functionality is best left to format string / ptrauth for now. Which brings the question... how do we test 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
