[cfe-commits] r172601 - in /cfe/trunk: lib/Format/Format.cpp unittests/Format/FormatTest.cpp

Kim Gräsman kim.grasman at gmail.com
Wed Jan 16 02:36:05 PST 2013


On Wed, Jan 16, 2013 at 10:42 AM, Chandler Carruth <chandlerc at google.com> wrote:
>
> On Tue, Jan 15, 2013 at 11:30 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> On Jan 15, 2013 11:21 PM, "Daniel Jasper" <djasper at google.com> wrote:
>> >
>> > Author: djasper
>> > Date: Wed Jan 16 01:19:28 2013
>> > New Revision: 172601
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=172601&view=rev
>> > Log:
>> > Never merge < and ::, as it produces different tokens.
>>
>> Shouldn't this be std-specific, since this works in C++11? Speaking of
>> which - what does clang-format do with the >> in nested template types?
>
> Agreed on both fronts -- this needs to be conditioned on the standard
> version, and >> in nested templates should be handled similarly....

Just to be clear -- do you think this should be conditioned on -std or
on a separate compatibility switch?

I don't think conditioning it on -std works because I may be
formatting portable source code with clang-format that must be
buildable with an older (C++98) or incompatible (e.g. MSVC) compiler.

I think this is what your follow-up paragraph said, but I wanted to
double-check.

- Kim



More information about the cfe-commits mailing list