[cfe-dev] clang-format, recognizing alternative binary operator tokens
Reid Kleckner
rnk at google.com
Mon May 5 11:36:37 PDT 2014
On Mon, May 5, 2014 at 9:30 AM, Philip Reames <listmail at philipreames.com>wrote:
>
> On 05/03/2014 02:52 PM, Bobby Moretti wrote:
>>
>> Would such a change to clang-format be welcome? If so, what would be
>> the preferred implementation?
>>
>> Thanks,
>>
> This seems like a useful enhancement. Why don't you either a) file a bug,
> or b) propose a patch?
>
> I would suggest that we should default to recognizing the keyword whenever
> it's legal for the language being compiled. We shouldn't need to opt-in to
> standard defined language features. I don't really see any downside to
> having it enabled. If we support a MSVC++ compatibility mode (do we?), it
> should be controlled by that flag.
These operators are always available in Clang's C++ mode, so IMO
clang-format should enable this LangOption by default. There doesn't
appear to be a flag for turning this off in C++.
MSVC requires that you include <iso646.h> if you want to use these:
http://msdn.microsoft.com/en-us/library/w6b8ws6z.aspx
I don't think we need a flag in clang-format to turn it off.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140505/4ff30784/attachment.html>
More information about the cfe-dev
mailing list