r232996 - Refactor: Simplify boolean expressions in libclang
Dmitri Gribenko
gribozavr at gmail.com
Mon Mar 23 12:23:50 PDT 2015
Author: gribozavr
Date: Mon Mar 23 14:23:50 2015
New Revision: 232996
URL: http://llvm.org/viewvc/llvm-project?rev=232996&view=rev
Log:
Refactor: Simplify boolean expressions in libclang
Simplify boolean expresions using true and false with clang-tidy.
Patch by Richard.
Modified:
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=232996&r1=232995&r2=232996&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Mon Mar 23 14:23:50 2015
@@ -1718,7 +1718,7 @@ public:
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:
More information about the cfe-commits
mailing list