diff options
author | Owen Pan <owenpiano@gmail.com> | 2025-07-06 14:19:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-06 14:19:30 -0700 |
commit | 5ccbea9f480d5c387c7f21aa101e72774c91f1d3 (patch) | |
tree | 165b015ba243551f9b126d22a5865f788e692abc /clang/lib/Format/Format.cpp | |
parent | 6a9a16da7a380e18b996bb6573eeb18b913204fc (diff) | |
download | llvm-5ccbea9f480d5c387c7f21aa101e72774c91f1d3.zip llvm-5ccbea9f480d5c387c7f21aa101e72774c91f1d3.tar.gz llvm-5ccbea9f480d5c387c7f21aa101e72774c91f1d3.tar.bz2 |
[clang-format][NFC] Replace size() with empty() (#147164)
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index bdaf264..f0412cd 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -3582,7 +3582,7 @@ tooling::Replacements sortJavaImports(const FormatStyle &Style, StringRef Code, ImportsInBlock.push_back( {Identifier, Line, Prev, AssociatedCommentLines, IsStatic}); AssociatedCommentLines.clear(); - } else if (Trimmed.size() > 0 && !ImportsInBlock.empty()) { + } else if (!Trimmed.empty() && !ImportsInBlock.empty()) { // Associating comments within the imports with the nearest import below AssociatedCommentLines.push_back(Line); } |