diff options
Diffstat (limited to 'clang/include/clang')
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 10 | ||||
| -rw-r--r-- | clang/include/clang/Basic/OperatorKinds.def | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index a6586a8246b..3d9073d8294 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -1123,11 +1123,19 @@ def err_bad_memptr_rhs : Error< "right hand operand to %0 has non pointer-to-member type %1">; def err_memptr_rhs_incomplete : Error< "right hand operand is a pointer to member of incomplete type %0">; - def err_bad_memptr_lhs : Error< "left hand operand to %0 must be a %select{|pointer to }1class " "compatible with the right hand operand, but is %2">; +def err_conditional_void_nonvoid : Error< + "%select{left|right}1 operand to ? is void, but %select{right|left}1 operand " + "is of type %0">; +def err_conditional_ambiguous : Error< + "conditional expression is ambiguous; %0 can be converted to %1 " + "and vice versa">; +def err_conditional_ambiguous_ovl : Error< + "conditional expression is ambiguous; %0 and %1 can be converted to several " + "common types">; def err_invalid_use_of_function_type : Error< "a function type is not allowed here">; diff --git a/clang/include/clang/Basic/OperatorKinds.def b/clang/include/clang/Basic/OperatorKinds.def index 0836faf0f36..d011e9d39ff 100644 --- a/clang/include/clang/Basic/OperatorKinds.def +++ b/clang/include/clang/Basic/OperatorKinds.def @@ -98,6 +98,9 @@ OVERLOADED_OPERATOR(ArrowStar , "->*" , arrowstar , false, t OVERLOADED_OPERATOR(Arrow , "->" , arrow , true , false, true) OVERLOADED_OPERATOR_MULTI(Call , "()" , true , true , true) OVERLOADED_OPERATOR_MULTI(Subscript , "[]" , false, true , true) +// ?: can *not* be overloaded, but we need the overload +// resolution machinery for it. +OVERLOADED_OPERATOR_MULTI(Conditional , "?" , false, true , false) #undef OVERLOADED_OPERATOR_MULTI #undef OVERLOADED_OPERATOR |

