[PATCH] D75971: Should not need the second predicate.If `II->hasMacroDefinition()` is true, then the whole expr is always true.
Vy Nguyen via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 21:34:01 PDT 2020
oontvoo created this revision.
oontvoo added a reviewer: jyknight.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
remove redundant pred
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75971
Files:
clang/include/clang/Lex/Preprocessor.h
Index: clang/include/clang/Lex/Preprocessor.h
===================================================================
--- clang/include/clang/Lex/Preprocessor.h
+++ clang/include/clang/Lex/Preprocessor.h
@@ -1042,8 +1042,7 @@
return isMacroDefined(&Identifiers.get(Id));
}
bool isMacroDefined(const IdentifierInfo *II) {
- return II->hasMacroDefinition() &&
- (!getLangOpts().Modules || (bool)getMacroDefinition(II));
+ return II->hasMacroDefinition();
}
/// Determine whether II is defined as a macro within the module M,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75971.249549.patch
Type: text/x-patch
Size: 554 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200311/2ec35988/attachment-0001.bin>
More information about the cfe-commits
mailing list