[PATCH] Refactor: Simplify boolean conditional return statements in tools/llvm-symbolizer
Richard
legalize at xmission.com
Mon May 25 12:02:42 PDT 2015
Hi samsonov, rafael, ramosian.glider, zturner, chapuni, chandlerc,
Use clang-tidy to simplify boolean conditional return statements
http://reviews.llvm.org/D10006
Files:
tools/llvm-symbolizer/llvm-symbolizer.cpp
Index: tools/llvm-symbolizer/llvm-symbolizer.cpp
===================================================================
--- tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -118,9 +118,7 @@
// Skip delimiters and parse module offset.
pos += strspn(pos, kDelimiters);
int offset_length = strcspn(pos, kDelimiters);
- if (StringRef(pos, offset_length).getAsInteger(0, ModuleOffset))
- return false;
- return true;
+ return !StringRef(pos, offset_length).getAsInteger(0, ModuleOffset);
}
int main(int argc, char **argv) {
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10006.26471.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150525/f90550d2/attachment.bin>
More information about the llvm-commits
mailing list