[cfe-commits] r154949 - /cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
jahanian
fjahanian at apple.com
Tue Apr 17 14:04:12 PDT 2012
On Apr 17, 2012, at 1:43 PM, Matt Beaumont-Gay wrote:
> On Tue, Apr 17, 2012 at 13:40, David Blaikie <dblaikie at gmail.com> wrote:
>> On Tue, Apr 17, 2012 at 1:36 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:
>>> Author: matthewbg
>>> Date: Tue Apr 17 15:36:24 2012
>>> New Revision: 154949
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=154949&view=rev
>>> Log:
>>> add missing parameter index to diag
>>
>> Is there a missing or underconstrained test case here?
>
> Probably :)
>
> I think this was John's code originally, cc'd for further discussion.
>
>>
>>>
>>> Modified:
>>> cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>>>
>>> Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
>>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=154949&r1=154948&r2=154949&view=diff
>>> ==============================================================================
>>> --- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
>>> +++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Apr 17 15:36:24 2012
>>> @@ -3912,7 +3912,7 @@
>>> def err_nogetter_property_compound_assignment : Error<
>>> "a getter method is needed to perform a compound assignment on a property">;
>>> def err_nogetter_property_incdec : Error<
>>> - "no getter method %1 for %select{increment|decrement} of property">;
>>> + "no getter method %1 for %select{increment|decrement}0 of property">;
This diagnostic should be triggered by this test case:
@interface I
// - (int) P;
- (void) setP : (int)arg;
@end
@interface II @end
@implementation II
- (void) Meth : (I*) arg {
arg.P++;
}
@end
Instead, it ICEs.
But the case for setter issues the diagnostic:
@interface I
- (int) P;
// - (void) setP : (int)arg;
@end
@interface II @end
@implementation II
- (void) Meth : (I*) arg {
arg.P++;
}
@end
% clang -c t.m
t.m:10:9: error: no setter method 'setP:' for increment of property
arg.P++;
~~~~~^
1 error generated.
- fariborz
>>> def error_no_subobject_property_setting : Error<
>>> "expression is not assignable">;
>>> def err_qualified_objc_access : Error<
>>>
>>>
>>> _______________________________________________
>>> cfe-commits mailing list
>>> cfe-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list