[clang-tools-extra] 9abbc05 - [clangd] Use !empty() instead of size()>0
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 17 06:29:08 PST 2021
Author: Utkarsh Saxena
Date: 2021-01-17T15:26:40+01:00
New Revision: 9abbc050974ff117b79e8e049c52c56db3f49aec
URL: https://github.com/llvm/llvm-project/commit/9abbc050974ff117b79e8e049c52c56db3f49aec
DIFF: https://github.com/llvm/llvm-project/commit/9abbc050974ff117b79e8e049c52c56db3f49aec.diff
LOG: [clangd] Use !empty() instead of size()>0
Added:
Modified:
clang-tools-extra/clangd/Quality.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp
index f076b44f5743..27b959ecacb3 100644
--- a/clang-tools-extra/clangd/Quality.cpp
+++ b/clang-tools-extra/clangd/Quality.cpp
@@ -512,7 +512,7 @@ evaluateDecisionForest(const SymbolQualitySignals &Quality,
E.setIsNameInContext(NumMatch > 0);
E.setNumNameInContext(NumMatch);
E.setFractionNameInContext(
- Relevance.ContextWords && Relevance.ContextWords->empty()
+ Relevance.ContextWords && !Relevance.ContextWords->empty()
? NumMatch * 1.0 / Relevance.ContextWords->size()
: 0);
E.setIsInBaseClass(Relevance.InBaseClass);
More information about the cfe-commits
mailing list