[cfe-commits] r45558 - in /cfe/trunk: Sema/SemaExpr.cpp include/clang/Basic/DiagnosticKinds.def
Chris Lattner
sabre at nondot.org
Thu Jan 3 15:13:36 PST 2008
Author: lattner
Date: Thu Jan 3 17:13:36 2008
New Revision: 45558
URL: http://llvm.org/viewvc/llvm-project?rev=45558&view=rev
Log:
regroup assignment-related diagnostics, fix a mistake in one.
Modified:
cfe/trunk/Sema/SemaExpr.cpp
cfe/trunk/include/clang/Basic/DiagnosticKinds.def
Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=45558&r1=45557&r2=45558&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Thu Jan 3 17:13:36 2008
@@ -2254,7 +2254,7 @@
argExpr->getSourceRange());
break;
case CompatiblePointerDiscardsQualifiers:
- Diag(l, diag::ext_typecheck_passing_discards_qualifiers,
+ Diag(l, diag::ext_typecheck_sending_discards_qualifiers,
rhsType.getAsString(), lhsType.getAsString(),
argExpr->getSourceRange());
break;
Modified: cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=45558&r1=45557&r2=45558&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticKinds.def Thu Jan 3 17:13:36 2008
@@ -759,6 +759,20 @@
"comparison of distinct pointer types ('%0' and '%1')")
DIAG(err_typecheck_assign_const, ERROR,
"read-only variable is not assignable")
+
+
+DIAG(err_typecheck_return_incompatible, ERROR,
+ "incompatible type returning '%1', expected '%0'")
+DIAG(ext_typecheck_return_pointer_int, EXTENSION,
+ "incompatible type returning '%1', expected '%0'")
+DIAG(ext_typecheck_return_pointer_void_func, EXTENSION,
+ "returning '%1' to from function expecting '%0' converts between void*"
+ " and function pointer")
+DIAG(ext_typecheck_return_incompatible_pointer, EXTENSION,
+ "incompatible pointer types returning '%1', expected '%0'")
+DIAG(ext_typecheck_return_discards_qualifiers, EXTENSION,
+ "returning '%1' from function expecting '%0' discards qualifiers")
+
DIAG(err_typecheck_assign_incompatible, ERROR,
"incompatible types assigning '%1' to '%0'")
DIAG(ext_typecheck_assign_pointer_int, WARNING,
@@ -769,24 +783,7 @@
"assigning '%1' to '%0' discards qualifiers")
DIAG(ext_typecheck_assign_pointer_void_func, EXTENSION,
"assigning '%1' to '%0' converts between void* and function pointer")
-DIAG(err_typecheck_array_not_modifiable_lvalue, ERROR,
- "array type '%0' is not assignable")
-DIAG(err_typecheck_non_object_not_modifiable_lvalue, ERROR,
- "non-object type '%0' is not assignable")
-DIAG(err_typecheck_expression_not_modifiable_lvalue, ERROR,
- "expression is not assignable")
-DIAG(err_typecheck_incomplete_type_not_modifiable_lvalue, ERROR,
- "incomplete type '%0' is not assignable")
-DIAG(err_typecheck_duplicate_vector_components_not_mlvalue, ERROR,
- "vector is not assignable (contains duplicate components)")
-DIAG(err_typecheck_call_not_function, ERROR,
- "called object is not a function or function pointer")
-DIAG(err_typecheck_call_too_few_args, ERROR,
- "too few arguments to function")
-DIAG(err_typecheck_call_too_many_args, ERROR,
- "too many arguments to function")
-DIAG(err_typecheck_call_invalid_ordered_compare, ERROR,
- "ordered compare requires two args of floating point type ('%0' and '%1')")
+
DIAG(err_typecheck_passing_incompatible, ERROR,
"incompatible types passing '%0' to function expecting '%1'")
DIAG(ext_typecheck_passing_incompatible_pointer, WARNING,
@@ -798,6 +795,7 @@
" and function pointer")
DIAG(ext_typecheck_passing_discards_qualifiers, WARNING,
"passing '%0' to '%1' discards qualifiers")
+
DIAG(err_typecheck_sending_incompatible, ERROR,
"incompatible types passing '%0' to method expecting '%1'")
DIAG(ext_typecheck_sending_incompatible_pointer, WARNING,
@@ -807,6 +805,28 @@
DIAG(ext_typecheck_sending_pointer_void_func, EXTENSION,
"sending '%1' to method expecting '%0' converts between void*"
" and function pointer")
+DIAG(ext_typecheck_sending_discards_qualifiers, WARNING,
+ "sending '%0' to '%1' discards qualifiers")
+
+
+DIAG(err_typecheck_array_not_modifiable_lvalue, ERROR,
+ "array type '%0' is not assignable")
+DIAG(err_typecheck_non_object_not_modifiable_lvalue, ERROR,
+ "non-object type '%0' is not assignable")
+DIAG(err_typecheck_expression_not_modifiable_lvalue, ERROR,
+ "expression is not assignable")
+DIAG(err_typecheck_incomplete_type_not_modifiable_lvalue, ERROR,
+ "incomplete type '%0' is not assignable")
+DIAG(err_typecheck_duplicate_vector_components_not_mlvalue, ERROR,
+ "vector is not assignable (contains duplicate components)")
+DIAG(err_typecheck_call_not_function, ERROR,
+ "called object is not a function or function pointer")
+DIAG(err_typecheck_call_too_few_args, ERROR,
+ "too few arguments to function")
+DIAG(err_typecheck_call_too_many_args, ERROR,
+ "too many arguments to function")
+DIAG(err_typecheck_call_invalid_ordered_compare, ERROR,
+ "ordered compare requires two args of floating point type ('%0' and '%1')")
DIAG(err_typecheck_cond_expect_scalar, ERROR,
"used type '%0' where arithmetic or pointer type is required")
DIAG(err_typecheck_expect_scalar_operand, ERROR,
@@ -913,17 +933,6 @@
"previous case value occurrence defined here")
DIAG(warn_case_empty_range, WARNING,
"empty case range specified")
-DIAG(err_typecheck_return_incompatible, ERROR,
- "incompatible type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_pointer_int, EXTENSION,
- "incompatible type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_pointer_void_func, EXTENSION,
- "returning '%1' to from function expecting '%0' converts between void*"
- " and function pointer")
-DIAG(ext_typecheck_return_incompatible_pointer, EXTENSION,
- "incompatible pointer type returning '%1', expected '%0'")
-DIAG(ext_typecheck_return_discards_qualifiers, EXTENSION,
- "returning '%1' from function expecting '%0' discards qualifiers")
DIAG(err_typecheck_statement_requires_scalar, ERROR,
"statement requires expression of scalar type ('%0' invalid)")
DIAG(err_typecheck_statement_requires_integer, ERROR,
More information about the cfe-commits
mailing list