Skip to content

Commit 1b4e90e

Browse files
committed
Avoid implicit conversion in non-empty check
1 parent 08b470d commit 1b4e90e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/tools/clang-scan-deps/ClangScanDeps.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ class FullDeps {
510510
JOS.object([&] {
511511
JOS.attribute("clang-context-hash",
512512
StringRef(I.ContextHash));
513-
if (I.ModuleName.size())
513+
if (!I.ModuleName.empty())
514514
JOS.attribute("module-name", (I.ModuleName));
515515
if (!I.NamedModuleDeps.empty())
516516
JOS.attributeArray("named-module-deps", [&] {
@@ -530,7 +530,7 @@ class FullDeps {
530530
} else {
531531
JOS.object([&] {
532532
JOS.attribute("clang-context-hash", StringRef(I.ContextHash));
533-
if (I.ModuleName.size())
533+
if (!I.ModuleName.empty())
534534
JOS.attribute("module-name", (I.ModuleName));
535535
if (!I.NamedModuleDeps.empty())
536536
JOS.attributeArray("named-module-deps", [&] {

0 commit comments

Comments
 (0)