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 (!LanguageFound) { if (Styles.empty() || Styles[0].Language != FS::LK_None) { return make_error_code(PE::Unsuitable); } ... } ================ Comment at: lib/Format/Format.cpp:936 +void FormatStyle::FormatStyleSet::Add(FormatStyle Style) { + Style.StyleSet.Styles.reset(); + if (!Styles) ---------------- Should we rather check that a style that's added doesn't have its own Styles map? (I'd say you're not allowed to add a Style that was gotten into another StyleSet). Repository: rC Clang https://reviews.llvm.org/D41487 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits