[PATCH] Refactor: Simplify boolean expressions in libclang
Richard
legalize at xmission.com
Sun Mar 22 13:32:35 PDT 2015
Hi alexfh, akyrtzi, doug.gregor, krememek, gribozavr,
Simplify boolean expresions using `true` and `false` with `clang-tidy`
http://reviews.llvm.org/D8529
Files:
tools/libclang/CIndex.cpp
Index: tools/libclang/CIndex.cpp
===================================================================
--- tools/libclang/CIndex.cpp
+++ tools/libclang/CIndex.cpp
@@ -1718,7 +1718,7 @@
return VJ->getKind() == DeclVisitKind;
}
const Decl *get() const { return static_cast<const Decl *>(data[0]); }
- bool isFirst() const { return data[1] ? true : false; }
+ bool isFirst() const { return data[1] != nullptr; }
};
class TypeLocVisit : public VisitorJob {
public:
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8529.22438.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150322/2b0eff88/attachment.bin>
More information about the cfe-commits
mailing list