[PATCH] D74235: [clang] [NFC] Rename Sema::DiagnoseMultipleUserConversion to DiagnoseAmbiguousUserConversion
Logan Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 7 10:17:20 PST 2020
logan-5 created this revision.
logan-5 added a reviewer: rsmith.
logan-5 added a project: clang.
Herald added a subscriber: cfe-commits.
logan-5 added a child revision: D74238: [clang] [clang] Improve diagnostic note for implicit conversion sequences that would work if more than one implicit user-defined conversion were allowed..
This is to avoid confusion in an upcoming patch that uses the term "multiple user-defined conversions" to refer to (invalid) implicit conversion sequences that involve applying more than one user conversion.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D74235
Files:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaOverload.cpp
Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -3606,7 +3606,7 @@
}
bool
-Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {
+Sema::DiagnoseAmbiguousUserDefinedConversion(Expr *From, QualType ToType) {
ImplicitConversionSequence ICS;
OverloadCandidateSet CandidateSet(From->getExprLoc(),
OverloadCandidateSet::CSK_Normal);
@@ -5465,7 +5465,7 @@
if (!ICS.isBad())
return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting);
- if (!DiagnoseMultipleUserDefinedConversion(From, Context.BoolTy))
+ if (!DiagnoseAmbiguousUserDefinedConversion(From, Context.BoolTy))
return Diag(From->getBeginLoc(), diag::err_typecheck_bool_condition)
<< From->getType() << From->getSourceRange();
return ExprError();
@@ -5579,7 +5579,7 @@
break;
case ImplicitConversionSequence::AmbiguousConversion:
case ImplicitConversionSequence::BadConversion:
- if (!S.DiagnoseMultipleUserDefinedConversion(From, T))
+ if (!S.DiagnoseAmbiguousUserDefinedConversion(From, T))
return S.Diag(From->getBeginLoc(),
diag::err_typecheck_converted_constant_expression)
<< From->getType() << From->getSourceRange() << T;
Index: clang/include/clang/Sema/Sema.h
===================================================================
--- clang/include/clang/Sema/Sema.h
+++ clang/include/clang/Sema/Sema.h
@@ -3011,7 +3011,7 @@
bool CStyle, bool &ObjCLifetimeConversion);
bool IsFunctionConversion(QualType FromType, QualType ToType,
QualType &ResultTy);
- bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType);
+ bool DiagnoseAmbiguousUserDefinedConversion(Expr *From, QualType ToType);
bool isSameOrCompatibleFunctionType(CanQualType Param, CanQualType Arg);
ExprResult PerformMoveOrCopyInitialization(const InitializedEntity &Entity,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74235.243213.patch
Type: text/x-patch
Size: 2095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200207/b59761f6/attachment-0001.bin>
More information about the cfe-commits
mailing list