[PATCH] Allow predefined styles to define different options for different languages.

Alexander Kornienko alexfh at google.com
Mon Dec 9 11:24:16 PST 2013


Hi djasper,

Allow predefined styles to define different options for different
languages so that one can run:
  clang-format -style=google file1.cpp file2.js

or use a single .clang-format file with "BasedOnStyle: Google" for both c++ and
JS files.

Added Google style for JavaScript with "BreakBeforeTernaryOperators" set to
false.

http://llvm-reviews.chandlerc.com/D2364

Files:
  include/clang/Format/Format.h
  lib/Format/Format.cpp
  unittests/Format/FormatTest.cpp
  unittests/Format/FormatTestJS.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2364.1.patch
Type: text/x-patch
Size: 23337 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131209/fc7d359d/attachment.bin>


More information about the cfe-commits mailing list