[cfe-commits] r136103 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/FixIt/fixit-static-object-decl.m
jahanian
fjahanian at apple.com
Wed Jul 27 11:49:04 PDT 2011
On Jul 27, 2011, at 11:41 AM, Douglas Gregor wrote:
>
> On Jul 26, 2011, at 10:58 AM, Fariborz Jahanian wrote:
>
>> Author: fjahanian
>> Date: Tue Jul 26 12:58:54 2011
>> New Revision: 136103
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=136103&view=rev
>> Log:
>> Provide fixit for static use of objective-c type
>> in few more places and in each instance, fix up
>> the type to the expected type. // rdar://9603056
>
> One comment about the test below.
>
>> Modified: cfe/trunk/test/FixIt/fixit-static-object-decl.m
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-static-object-decl.m?rev=136103&r1=136102&r2=136103&view=diff
>> ==============================================================================
>> --- cfe/trunk/test/FixIt/fixit-static-object-decl.m (original)
>> +++ cfe/trunk/test/FixIt/fixit-static-object-decl.m Tue Jul 26 12:58:54 2011
>> @@ -9,10 +9,21 @@
>> // RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t
>> // rdar://9603056
>>
>> + at interface S @end
>> +
>> @interface NSArray
>> +{
>> + at public
>> + S iS;
>> +}
>> + (id) arrayWithObjects;
>> @end
>>
>> +NSArray func() {
>> + NSArray P;
>> + return P;
>> +}
>> +
>> int main() {
>> NSArray pluginNames = [NSArray arrayWithObjects];
>> }
>
> Some of the other tests in test/FixIt actually use the -fixit mode to write out a modified source file, and then verify that the source file parses without any errors. It's a great way to ensure that the location information in the fix is accurate.
Yes. Here is the command in the same test file.
// Objective-C recovery
// RUN: cp %s %t
// RUN: %clang_cc1 -fixit -x objective-c %t || true
// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c %t
// Objective-C++ recovery
// RUN: cp %s %t
// RUN: %clang_cc1 -fixit -x objective-c++ %t || true
// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t
// rdar://9603056
- Fariborz
>
> - Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110727/de04a153/attachment.html>
More information about the cfe-commits
mailing list