[cfe-dev] clang-format, recognizing alternative binary operator tokens

Bobby Moretti bobmoretti at gmail.com
Mon May 5 12:39:07 PDT 2014


Thanks everyone for the feedback.

It sounds like folks are ok with enabling the keyword binary operators
by default, and not adding a new option to clang-format.

Do we want to enable this even if "Language" is not "Cpp" in the Style options?

One thing that I find confusing: in the same function,
LangOpts.CPlusPlus is always set to 1. Does this mean that
clang-format always lexes all source files using C++ keywords? Even if
they are C or ObjC files?

I'd be happy to submit a patch, but I'd like to get the exact behavior
nailed down beforehand, since I'm new to clang/llvm community.

Also, FWIW, you can also keep MSVC happy with the operator keywords by
passing /Za to the compiler.



More information about the cfe-dev mailing list