[cfe-commits] r148433 - in /cfe/trunk: include/clang/Basic/DiagnosticParseKinds.td include/clang/Parse/Parser.h lib/Parse/ParseDecl.cpp lib/Parse/ParseExprCXX.cpp lib/Parse/Parser.cpp test/FixIt/fixit.cpp

Chandler Carruth chandlerc at google.com
Thu Jan 19 00:47:02 PST 2012


On Thu, Jan 19, 2012 at 12:26 AM, James Molloy <james.molloy at arm.com> wrote:

> Hi Richard,
>
> Would it not also be worthwhile adding a case for -=? (and possibly *= /
> /=,
> but they're less common)
>

I completely agree, we should fix this for all time. =] We should handle
<<= and friends as well.

Specifically:

On Wed, Jan 18, 2012 at 2:54 PM, Richard Trieu <rtrieu at google.com> wrote:

> Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=148433&r1=148432&r2=148433&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
> +++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Wed Jan 18
> 16:54:52 2012
> @@ -156,6 +156,8 @@
>   "expected ';' after top level declarator">;
>  def err_invalid_equalequal_after_declarator : Error<
>   "invalid '==' at end of declaration; did you mean '='?">;
> +def err_invalid_plusequal_after_declarator : Error<
> +  "invalid '+=' at end of declaration; did you mean '='?">;
>

Rather than two warnings here, lets generalize this by passing in the
operator encountered as a string argument to the diagnostic message. Then
the code to extend it becomes trivial.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120119/5c4fbc25/attachment.html>


More information about the cfe-commits mailing list