[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

Richard Trieu rtrieu at google.com
Thu Jan 19 14:08:44 PST 2012


On Thu, Jan 19, 2012 at 12:47 AM, Chandler Carruth <chandlerc at google.com>wrote:

> 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.
>

Done.  r148499 has extended the fixit hints to !=, %=, ^=, &=, *=, -=, |=,
/=, <=, <<=, >=, and >>=.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120119/ffd7c0c9/attachment.html>


More information about the cfe-commits mailing list