@@ -9858,7 +9858,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
9858
9858
if (Info.getLangOpts().CPlusPlus11)
9859
9859
Info.CCEDiag(E, diag::note_constexpr_invalid_function)
9860
9860
<< /*isConstexpr*/ 0 << /*isConstructor*/ 0
9861
- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
9861
+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
9862
9862
else
9863
9863
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
9864
9864
[[fallthrough]];
@@ -9903,8 +9903,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
9903
9903
// FIXME: We can compare the bytes in the correct order.
9904
9904
if (IsRawByte && !isOneByteCharacterType(CharTy)) {
9905
9905
Info.FFDiag(E, diag::note_constexpr_memchr_unsupported)
9906
- << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str()
9907
- << CharTy;
9906
+ << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp) << CharTy;
9908
9907
return false;
9909
9908
}
9910
9909
// Figure out what value we're actually looking for (after converting to
@@ -9966,7 +9965,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
9966
9965
if (Info.getLangOpts().CPlusPlus11)
9967
9966
Info.CCEDiag(E, diag::note_constexpr_invalid_function)
9968
9967
<< /*isConstexpr*/ 0 << /*isConstructor*/ 0
9969
- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
9968
+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
9970
9969
else
9971
9970
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
9972
9971
[[fallthrough]];
@@ -13241,7 +13240,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
13241
13240
if (Info.getLangOpts().CPlusPlus11)
13242
13241
Info.CCEDiag(E, diag::note_constexpr_invalid_function)
13243
13242
<< /*isConstexpr*/ 0 << /*isConstructor*/ 0
13244
- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
13243
+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
13245
13244
else
13246
13245
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
13247
13246
[[fallthrough]];
@@ -13266,7 +13265,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
13266
13265
if (Info.getLangOpts().CPlusPlus11)
13267
13266
Info.CCEDiag(E, diag::note_constexpr_invalid_function)
13268
13267
<< /*isConstexpr*/ 0 << /*isConstructor*/ 0
13269
- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
13268
+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
13270
13269
else
13271
13270
Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
13272
13271
[[fallthrough]];
@@ -13321,8 +13320,8 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
13321
13320
!(isOneByteCharacterType(CharTy1) && isOneByteCharacterType(CharTy2))) {
13322
13321
// FIXME: Consider using our bit_cast implementation to support this.
13323
13322
Info.FFDiag(E, diag::note_constexpr_memcmp_unsupported)
13324
- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str()
13325
- << CharTy1 << CharTy2;
13323
+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp) << CharTy1
13324
+ << CharTy2;
13326
13325
return false;
13327
13326
}
13328
13327
0 commit comments