diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 17:50:40 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 17:50:40 +0900 |
commit | fea7da1b00cc97d742faede2df96c7d327950f49 (patch) | |
tree | 4de1d6b4ddc69f4f32daabb11ad5c71ab0cf895e /clang/lib/AST/ExprConstant.cpp | |
parent | 9b99dde0d47102625d93c5d1cbbc04951025a6c9 (diff) | |
parent | 0aa930a41f2d1ebf1fa90ec42da8f96d15a4dcbb (diff) | |
download | llvm-users/chapuni/cov/single/nextcount.zip llvm-users/chapuni/cov/single/nextcount.tar.gz llvm-users/chapuni/cov/single/nextcount.tar.bz2 |
Merge branch 'users/chapuni/cov/single/nextcount-base' into users/chapuni/cov/single/nextcountusers/chapuni/cov/single/nextcount
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index dd75dca..e220f69 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -9858,7 +9858,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, if (Info.getLangOpts().CPlusPlus11) Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 - << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str(); + << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp); else Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr); [[fallthrough]]; @@ -9903,8 +9903,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, // FIXME: We can compare the bytes in the correct order. if (IsRawByte && !isOneByteCharacterType(CharTy)) { Info.FFDiag(E, diag::note_constexpr_memchr_unsupported) - << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str() - << CharTy; + << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp) << CharTy; return false; } // Figure out what value we're actually looking for (after converting to @@ -9966,7 +9965,7 @@ bool PointerExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, if (Info.getLangOpts().CPlusPlus11) Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 - << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str(); + << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp); else Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr); [[fallthrough]]; @@ -13241,7 +13240,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, if (Info.getLangOpts().CPlusPlus11) Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 - << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str(); + << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp); else Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr); [[fallthrough]]; @@ -13266,7 +13265,7 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, if (Info.getLangOpts().CPlusPlus11) Info.CCEDiag(E, diag::note_constexpr_invalid_function) << /*isConstexpr*/ 0 << /*isConstructor*/ 0 - << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str(); + << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp); else Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr); [[fallthrough]]; @@ -13321,8 +13320,8 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, !(isOneByteCharacterType(CharTy1) && isOneByteCharacterType(CharTy2))) { // FIXME: Consider using our bit_cast implementation to support this. Info.FFDiag(E, diag::note_constexpr_memcmp_unsupported) - << ("'" + Info.Ctx.BuiltinInfo.getName(BuiltinOp) + "'").str() - << CharTy1 << CharTy2; + << Info.Ctx.BuiltinInfo.getQuotedName(BuiltinOp) << CharTy1 + << CharTy2; return false; } |