[clang] 2f1399c - clang/APINotes: fix parenthesization of &&, ||
Ramkumar Ramachandra via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 10:54:37 PST 2023
Author: Ramkumar Ramachandra
Date: 2023-11-29T18:53:30Z
New Revision: 2f1399c73f52aac77afbdd2ba53dd9f1dcbb7c98
URL: https://github.com/llvm/llvm-project/commit/2f1399c73f52aac77afbdd2ba53dd9f1dcbb7c98
DIFF: https://github.com/llvm/llvm-project/commit/2f1399c73f52aac77afbdd2ba53dd9f1dcbb7c98.diff
LOG: clang/APINotes: fix parenthesization of &&, ||
Follow up on 59edb43 (clang/APINotes: squelch a -Wparantheses warning
(NFC)) to fix parenthesization, as requested by David Blaikie.
Added:
Modified:
clang/include/clang/APINotes/APINotesManager.h
Removed:
################################################################################
diff --git a/clang/include/clang/APINotes/APINotesManager.h b/clang/include/clang/APINotes/APINotesManager.h
index c19082fdb597d84..18375c9e51a173b 100644
--- a/clang/include/clang/APINotes/APINotesManager.h
+++ b/clang/include/clang/APINotes/APINotesManager.h
@@ -159,7 +159,7 @@ class APINotesManager {
ArrayRef<APINotesReader *> getCurrentModuleReaders() const {
bool HasPublic = CurrentModuleReaders[ReaderKind::Public];
bool HasPrivate = CurrentModuleReaders[ReaderKind::Private];
- assert(!HasPrivate || (HasPublic && "private module requires public module"));
+ assert((!HasPrivate || HasPublic) && "private module requires public module");
if (!HasPrivate && !HasPublic)
return {};
return ArrayRef(CurrentModuleReaders).slice(0, HasPrivate ? 2 : 1);
More information about the cfe-commits
mailing list