r194710 - [objcmt] Introduce "objcmt-white-list-dir-path=" option.

Argyrios Kyrtzidis kyrtzidis at apple.com
Tue Dec 10 10:53:46 PST 2013


On Dec 10, 2013, at 8:04 AM, Alp Toker <alp at nuanti.com> wrote:

> 
> On 14/11/2013 16:33, Argyrios Kyrtzidis wrote:
>> Author: akirtzidis
>> Date: Thu Nov 14 10:33:29 2013
>> New Revision: 194710
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=194710&view=rev
>> Log:
>> [objcmt] Introduce "objcmt-white-list-dir-path=" option.
>> 
>> This options accepts a path to a directory, collects the filenames of the files
>> it contains, and the migrator will only modify files with the same filename.
>> 
>> Added:
>>     cfe/trunk/test/ARCMT/whitelisted/
>>     cfe/trunk/test/ARCMT/whitelisted/Inputs/
>>     cfe/trunk/test/ARCMT/whitelisted/Inputs/header1.h
>>     cfe/trunk/test/ARCMT/whitelisted/header1.h
>>     cfe/trunk/test/ARCMT/whitelisted/header1.h.result
>>     cfe/trunk/test/ARCMT/whitelisted/header2.h
>>     cfe/trunk/test/ARCMT/whitelisted/header2.h.result
>>     cfe/trunk/test/ARCMT/whitelisted/objcmt-with-whitelist.m
>> Modified:
>>     cfe/trunk/include/clang/Driver/Options.td
>>     cfe/trunk/include/clang/Frontend/FrontendOptions.h
>>     cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
>>     cfe/trunk/lib/Driver/Tools.cpp
>>     cfe/trunk/lib/Frontend/CompilerInvocation.cpp
>> 
>> Modified: cfe/trunk/include/clang/Driver/Options.td
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=194710&r1=194709&r2=194710&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/Driver/Options.td (original)
>> +++ cfe/trunk/include/clang/Driver/Options.td Thu Nov 14 10:33:29 2013
>> @@ -178,13 +178,14 @@ def objcmt_migrate_nsmacros : Flag<["-"]
>>    HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">;
>>  def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>,
>>    HelpText<"Enable migration to add protocol conformance on classes">;
>> -def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">,
>> -  Flags<[CC1Option]>,
>> +def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>,
>>    HelpText<"Make migration to 'atomic' properties">;
>>  def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>,
>>    HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">;
>>  def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>,
>>    HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">;
>> +def objcmt_white_list_dir_path: Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>,
>> +  HelpText<"Only modify files with a filename contained in the provided directory path">;
> 
> Hi Argyrios,
> 
> Whitelist is one word.
> 
> This set of changes will need s/white[_-]list/whitelist/ and s/WhiteList/Whitelist/.
> 
> If you need compatibility with the misspelt form it's OK to add an option alias.

I changed it with r196944 and added an alias.
Please don't change the option from the test case. At some point I'll remove the alias and update the test.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131210/25521960/attachment.html>


More information about the cfe-commits mailing list