[PATCH] D10020: Refactor: Simplify boolean conditional return statements in lib/Serialization
Richard via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 24 10:18:06 PDT 2015
LegalizeAdulthood updated this revision to Diff 38310.
LegalizeAdulthood added a comment.
Update to latest
http://reviews.llvm.org/D10020
Files:
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
Index: lib/Serialization/ASTWriter.cpp
===================================================================
--- lib/Serialization/ASTWriter.cpp
+++ lib/Serialization/ASTWriter.cpp
@@ -3112,14 +3112,10 @@
/// doesn't check whether the name has macros defined; use PublicMacroIterator
/// to check that.
bool isInterestingIdentifier(const IdentifierInfo *II, uint64_t MacroOffset) {
- if (MacroOffset ||
- II->isPoisoned() ||
- (IsModule ? II->hasRevertedBuiltin() : II->getObjCOrBuiltinID()) ||
- II->hasRevertedTokenIDToIdentifier() ||
- (NeedDecls && II->getFETokenInfo<void>()))
- return true;
-
- return false;
+ return MacroOffset || II->isPoisoned() ||
+ (IsModule ? II->hasRevertedBuiltin() : II->getObjCOrBuiltinID()) ||
+ II->hasRevertedTokenIDToIdentifier() ||
+ (NeedDecls && II->getFETokenInfo<void>());
}
public:
Index: lib/Serialization/ASTReader.cpp
===================================================================
--- lib/Serialization/ASTReader.cpp
+++ lib/Serialization/ASTReader.cpp
@@ -3956,10 +3956,7 @@
case llvm::BitstreamEntry::SubBlock:
if (Entry.ID == BlockID) {
- if (Cursor.EnterSubBlock(BlockID))
- return true;
- // Found it!
- return false;
+ return Cursor.EnterSubBlock(BlockID);
}
if (Cursor.SkipBlock())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10020.38310.patch
Type: text/x-patch
Size: 1407 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151024/c3389f7b/attachment-0001.bin>
More information about the cfe-commits
mailing list