r317793 - [clang-format] Apply a clang-tidy suggestion, NFC
Krasimir Georgiev via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 9 07:12:17 PST 2017
Author: krasimir
Date: Thu Nov 9 07:12:17 2017
New Revision: 317793
URL: http://llvm.org/viewvc/llvm-project?rev=317793&view=rev
Log:
[clang-format] Apply a clang-tidy suggestion, NFC
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=317793&r1=317792&r2=317793&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Thu Nov 9 07:12:17 2017
@@ -466,7 +466,7 @@ template <> struct DocumentListTraits<st
if (Index >= Seq.size()) {
assert(Index == Seq.size());
FormatStyle Template;
- if (Seq.size() > 0 && Seq[0].Language == FormatStyle::LK_None) {
+ if (!Seq.empty() && Seq[0].Language == FormatStyle::LK_None) {
Template = Seq[0];
} else {
Template = *((const FormatStyle *)IO.getContext());
More information about the cfe-commits
mailing list