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 || + Styles[i].Language == FormatStyle::LK_None)) { ---------------- LanguageFound can't be true here. ================ 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]); } } ---------------- This seems a bit backwards. I'd have expected us to build up a Style structure after parsing above, and then just copy that into the result in the end. 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