[clang] 59edb43 - clang/APINotes: squelch a -Wparantheses warning (NFC)

Ramkumar Ramachandra via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 24 01:44:05 PST 2023


Author: Ramkumar Ramachandra
Date: 2023-11-24T09:43:37Z
New Revision: 59edb432256064ee4f66c3a30fd4875030c5166b

URL: https://github.com/llvm/llvm-project/commit/59edb432256064ee4f66c3a30fd4875030c5166b
DIFF: https://github.com/llvm/llvm-project/commit/59edb432256064ee4f66c3a30fd4875030c5166b.diff

LOG: clang/APINotes: squelch a -Wparantheses warning (NFC)

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 823b52ed28b5981..c19082fdb597d84 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