[cfe-commits] clang formatter patch to move and rename RewriterTestContext.h

jahanian fjahanian at apple.com
Wed Dec 12 09:48:46 PST 2012


On Dec 12, 2012, at 9:42 AM, Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Wed, Dec 12, 2012 at 7:32 PM, jahanian <fjahanian at apple.com> wrote:
>> Hi,
>> 
>> We plan to use clang's new formatter in some of the lib clang tools. As such, this patch moves the common header file
>> RewriterTestContext.h to clang/Format directory and renames it as RewriterFormatContext.h.
>> 
>> In addition, this patch adds minimal support to the clang formatter to not crash formatting an objective-C method declaration.
>> This last patch will go through changes. But, it is needed for minimal testing of clang formatter for objC method declarations.
>> 
>> Ok for check-in?
> 
> 1. lib/Format/Format.cpp changes are unrelated, right?

Right.

> 
> 2. There's a naming inconsistency: the class is called
> 'RewriterTestContext', while the header is called
> 'RewriterFormatContext.h'.  I think it is important to have "Test" in
> the header name, so that it is obvious that this is not something to
> be used outside of tests.

The opposite, RewriterFormatContext.h will be used outside of tests. Name of
the class inside RewriterFormatContext.h need be changed. Something that I planned 
on doing later.
- Fariborz

> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-commits mailing list