aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-12-16 03:45:30 +0000
committerDouglas Gregor <dgregor@apple.com>2009-12-16 03:45:30 +0000
commit6864748fc9a780e6db0bb5a7bd20aa889882dc94 (patch)
treea1d9b98035b56fd6d6e4b0f922472f0e6c0b2320 /lib/Sema/SemaInit.cpp
parent88b2a17ef7930bdee22f51a8ee70bb6e2babb277 (diff)
Fix semantic diagnostics that embed English works, from Nicola Gigante!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index a732b07b9d..28e11a1010 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -73,7 +73,7 @@ static bool CheckSingleInitializer(Expr *&Init, QualType DeclType,
if (S.getLangOptions().CPlusPlus) {
// FIXME: I dislike this error message. A lot.
if (S.PerformImplicitConversion(Init, DeclType,
- "initializing", DirectInit)) {
+ Sema::AA_Initializing, DirectInit)) {
ImplicitConversionSequence ICS;
OverloadCandidateSet CandidateSet;
if (S.IsUserDefinedConversion(Init, DeclType, ICS.UserDefined,
@@ -81,7 +81,7 @@ static bool CheckSingleInitializer(Expr *&Init, QualType DeclType,
true, false, false) != OR_Ambiguous)
return S.Diag(Init->getSourceRange().getBegin(),
diag::err_typecheck_convert_incompatible)
- << DeclType << Init->getType() << "initializing"
+ << DeclType << Init->getType() << Sema::AA_Initializing
<< Init->getSourceRange();
S.Diag(Init->getSourceRange().getBegin(),
diag::err_typecheck_convert_ambiguous)
@@ -95,7 +95,7 @@ static bool CheckSingleInitializer(Expr *&Init, QualType DeclType,
Sema::AssignConvertType ConvTy =
S.CheckSingleAssignmentConstraints(DeclType, Init);
return S.DiagnoseAssignmentResult(ConvTy, Init->getLocStart(), DeclType,
- InitType, Init, "initializing");
+ InitType, Init, Sema::AA_Initializing);
}
static void CheckStringInit(Expr *Str, QualType &DeclT, Sema &S) {
@@ -279,7 +279,7 @@ bool Sema::CheckInitializerTypes(Expr *&Init, QualType &DeclType,
// destination type.
// FIXME: We're pretending to do copy elision here; return to this when we
// have ASTs for such things.
- if (!PerformImplicitConversion(Init, DeclType, "initializing"))
+ if (!PerformImplicitConversion(Init, DeclType, Sema::AA_Initializing))
return false;
if (InitEntity)
@@ -747,7 +747,7 @@ void InitListChecker::CheckSubElementType(InitListExpr *IList,
if (ICS.ConversionKind != ImplicitConversionSequence::BadConversion) {
if (SemaRef.PerformImplicitConversion(expr, ElemType, ICS,
- "initializing"))
+ Sema::AA_Initializing))
hadError = true;
UpdateStructuredListElement(StructuredList, StructuredIndex, expr);
++Index;
@@ -787,7 +787,7 @@ void InitListChecker::CheckSubElementType(InitListExpr *IList,
} else {
// We cannot initialize this element, so let
// PerformCopyInitialization produce the appropriate diagnostic.
- SemaRef.PerformCopyInitialization(expr, ElemType, "initializing");
+ SemaRef.PerformCopyInitialization(expr, ElemType, Sema::AA_Initializing);
hadError = true;
++Index;
++StructuredIndex;
@@ -3150,7 +3150,7 @@ InitializationSequence::Perform(Sema &S,
break;
case SK_ConversionSequence:
- if (S.PerformImplicitConversion(CurInitExpr, Step->Type, "converting",
+ if (S.PerformImplicitConversion(CurInitExpr, Step->Type, Sema::AA_Converting,
false, false, *Step->ICS))
return S.ExprError();