[PATCH] Replace size call with empty call where appripriate in clang/tools/extra
Gábor Horváth
xazax.hun at gmail.com
Wed Jan 21 03:27:54 PST 2015
Hi alexfh,
Replace size call with empty call where appropriate in clang/tools/extra. This patch is the result of applying fixes of the ContainerSizeEmpty Clang-Tidy checker which was committed recently.
http://reviews.llvm.org/D7085
Files:
modularize/ModuleAssistant.cpp
module-map-checker/ModuleMapChecker.cpp
Index: modularize/ModuleAssistant.cpp
===================================================================
--- modularize/ModuleAssistant.cpp
+++ modularize/ModuleAssistant.cpp
@@ -68,7 +68,7 @@
// Destructor.
Module::~Module() {
// Free submodules.
- while (SubModules.size()) {
+ while (!SubModules.empty()) {
Module *last = SubModules.back();
SubModules.pop_back();
delete last;
Index: module-map-checker/ModuleMapChecker.cpp
===================================================================
--- module-map-checker/ModuleMapChecker.cpp
+++ module-map-checker/ModuleMapChecker.cpp
@@ -261,7 +261,7 @@
findUnaccountedForHeaders();
// Check for warnings.
- if (UnaccountedForHeaders.size())
+ if (!UnaccountedForHeaders.empty())
returnValue = std::error_code(1, std::generic_category());
// Dump module map if requested.
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7085.18492.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150121/d07ad9bb/attachment.bin>
More information about the cfe-commits
mailing list