@@ -9858,7 +9858,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
98589858 if (Info.getLangOpts().CPlusPlus11)
98599859 Info.CCEDiag(E, diag::note_constexpr_invalid_function)
98609860 << /*isConstexpr*/ 0 << /*isConstructor*/ 0
9861- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
9861+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
98629862 else
98639863 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
98649864 [[fallthrough]];
@@ -9903,8 +9903,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
99039903 // FIXME: We can compare the bytes in the correct order.
99049904 if (IsRawByte && !isOneByteCharacterType(CharTy)) {
99059905 Info.FFDiag(E, diag::note_constexpr_memchr_unsupported)
9906- << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str()
9907- << CharTy;
9906+ << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp) << CharTy;
99089907 return false;
99099908 }
99109909 // Figure out what value we're actually looking for (after converting to
@@ -9966,7 +9965,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
99669965 if (Info.getLangOpts().CPlusPlus11)
99679966 Info.CCEDiag(E, diag::note_constexpr_invalid_function)
99689967 << /*isConstexpr*/ 0 << /*isConstructor*/ 0
9969- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
9968+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
99709969 else
99719970 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
99729971 [[fallthrough]];
@@ -13241,7 +13240,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
1324113240 if (Info.getLangOpts().CPlusPlus11)
1324213241 Info.CCEDiag(E, diag::note_constexpr_invalid_function)
1324313242 << /*isConstexpr*/ 0 << /*isConstructor*/ 0
13244- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
13243+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
1324513244 else
1324613245 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
1324713246 [[fallthrough]];
@@ -13266,7 +13265,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
1326613265 if (Info.getLangOpts().CPlusPlus11)
1326713266 Info.CCEDiag(E, diag::note_constexpr_invalid_function)
1326813267 << /*isConstexpr*/ 0 << /*isConstructor*/ 0
13269- << ("'" + Info.Ctx.BuiltinInfo.getName (BuiltinOp) + "'").str( );
13268+ << Info.Ctx.BuiltinInfo.getQuotedName (BuiltinOp);
1327013269 else
1327113270 Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
1327213271 [[fallthrough]];
@@ -13321,8 +13320,8 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
1332113320 !(isOneByteCharacterType(CharTy1) && isOneByteCharacterType(CharTy2))) {
1332213321 // FIXME: Consider using our bit_cast implementation to support this.
1332313322 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;
1332613325 return false;
1332713326 }
1332813327
0 commit comments