[PATCH] Refactor: Simplify boolean conditional return statements in clang-apply-replacements
Richard
legalize at xmission.com
Mon May 25 15:31:47 PDT 2015
Hi alexfh,
Use clang-tidy to simplify conditional return statements
http://reviews.llvm.org/D10025
Files:
clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
Index: clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
===================================================================
--- clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
+++ clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
@@ -183,10 +183,7 @@
}
// Ask clang to deduplicate and report conflicts.
- if (deduplicateAndDetectConflicts(GroupedReplacements, SM))
- return false;
-
- return true;
+ return !deduplicateAndDetectConflicts(GroupedReplacements, SM);
}
bool applyReplacements(const FileToReplacementsMap &GroupedReplacements,
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10025.26496.patch
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150525/001f6fc5/attachment.bin>
More information about the cfe-commits
mailing list