aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2025-07-06 14:19:30 -0700
committerGitHub <noreply@github.com>2025-07-06 14:19:30 -0700
commit5ccbea9f480d5c387c7f21aa101e72774c91f1d3 (patch)
tree165b015ba243551f9b126d22a5865f788e692abc /clang/lib/Format/Format.cpp
parent6a9a16da7a380e18b996bb6573eeb18b913204fc (diff)
downloadllvm-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.cpp2
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);
}