[cfe-commits] r58986 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def include/clang/Basic/OperatorKinds.def include/clang/Basic/OperatorKinds.h lib/Basic/IdentifierTable.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDeclCXX.cpp

Chris Lattner clattner at apple.com
Sun Nov 16 20:52:11 PST 2008


On Nov 10, 2008, at 5:38 AM, Douglas Gregor wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=58986&view=rev
> Log:
> Some cleanups to the declaration/checking of overloaded operators in  
> C++. Thanks to Sebastian for the review

I'm going to follow up to cfe-dev about some brain ramblings, but:

> @@ -1945,11 +1885,19 @@
>       ParamIsInt = BT->getKind() == BuiltinType::Int;
>
>     if (!ParamIsInt) {
> +      diag::kind DK;
> +      if (Op == OO_PlusPlus) {
> +        if (MethodDecl)
> +          DK =  
> diag::err_operator_overload_post_inc_must_be_int_member;
> +        else
> +          DK = diag::err_operator_overload_post_inc_must_be_int;

If you can provide good location info (i.e. point to the parameter in  
question), you don't need the "second parameter" vs "parameter"  
distinction.  Just calling it the 'parameter' should be sufficient.

-Chris



More information about the cfe-commits mailing list