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
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
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
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
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);
+
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
===
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
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
===
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
==
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
===
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
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 ||
+
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
13 matches
Mail list logo