[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322479: [clang-format] Adds a FormatStyleSet (authored by krasimir, committed by ). Changed prior to commit: https://reviews.llvm.org/D41487?vs=128933&id=129832#toc Repository: rC Clang https://revi

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-09 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. lg Repository: rC Clang https://reviews.llvm.org/D41487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 128933. krasimir added a comment. - Remove accidentally added file Repository: rC Clang https://reviews.llvm.org/D41487 Files: include/clang/Format/Format.h lib/Format/Format.cpp Index: lib/Format/Format.cpp

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 128932. krasimir marked 5 inline comments as done. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D41487 Files: 2 include/clang/Format/Format.h lib/Format/Format.cpp Index: lib/Format/Format.cpp

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-08 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer added inline comments. Comment at: include/clang/Format/Format.h:1700 +typedef std::map> +MapType; Why unique_ptr? Comment at: include/clang/Format/Format.h:1706 +// FormatStyleSet. +void Add(FormatStyle Style); +

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-08 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 128921. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D41487 Files: include/clang/Format/Format.h lib/Format/Format.cpp Index: lib/Format/Format.cpp ===

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:906-907 + } + if (!LanguageFound) +return make_error_code(ParseError::Unsuitable); + *Style = *StyleSet.Get(Language); Optional: I'd probably slightly re-structure the above to: if (!Languag

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2018-01-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 128743. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D41487 Files: include/clang/Format/Format.h lib/Format/Format.cpp Index: lib/Format/Format.cpp ===

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2017-12-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 127888. krasimir added a comment. - Remove accidentally created file Repository: rC Clang https://reviews.llvm.org/D41487 Files: include/clang/Format/Format.h lib/Format/Format.cpp Index: lib/Format/Format.cpp ==

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2017-12-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 127887. krasimir added a comment. - Address review comments Repository: rC Clang https://reviews.llvm.org/D41487 Files: ; include/clang/Format/Format.h lib/Format/Format.cpp Index: include/clang/Format/Format.h ===

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2017-12-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Format.cpp:903-907 + for (int i = Styles.size() - 1; i >= 0; --i) { +if (Styles[i].Language != FormatStyle::LK_None) { + Style->AddLanguageStyle(Styles[i]); } } klimek wrote: > This seems a

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2017-12-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Format/Format.cpp:893 for (int i = Styles.size() - 1; i >= 0; --i) { -if (Styles[i].Language == Language || -Styles[i].Language == FormatStyle::LK_None) { +if (!LanguageFound && (Styles[i].Language == Language || +

[PATCH] D41487: [clang-format] Adds a FormatStyleSet

2017-12-21 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. krasimir added reviewers: klimek, djasper. This patch adds a FormatStyleSet for storing per-language FormatStyles for the purposes of formatting code blocks inside the main code. Repository: rC Clang https://reviews.llvm.org/D41487 Files: include/clang/Forma