[Object] Fix a warning
authorKazu Hirata <kazu@google.com>
Sat, 15 Oct 2022 19:43:12 +0000 (12:43 -0700)
committerKazu Hirata <kazu@google.com>
Sat, 15 Oct 2022 19:43:12 +0000 (12:43 -0700)
This patch fixes:

  llvm/lib/Object/XCOFFObjectFile.cpp:1001:20: warning: suggest
  parentheses around ‘&&’ within ‘||’ [-Wparentheses]

llvm/lib/Object/XCOFFObjectFile.cpp

index dfaeb1b..c758e35 100644 (file)
@@ -998,8 +998,8 @@ Expected<ArrayRef<Reloc>> XCOFFObjectFile::relocations(const Shdr &Sec) const {
 
 template <typename ExceptEnt>
 Expected<ArrayRef<ExceptEnt>> XCOFFObjectFile::getExceptionEntries() const {
-  assert(is64Bit() && sizeof(ExceptEnt) == sizeof(ExceptionSectionEntry64) ||
-         !is64Bit() && sizeof(ExceptEnt) == sizeof(ExceptionSectionEntry32));
+  assert((is64Bit() && sizeof(ExceptEnt) == sizeof(ExceptionSectionEntry64)) ||
+         (!is64Bit() && sizeof(ExceptEnt) == sizeof(ExceptionSectionEntry32)));
 
   Expected<uintptr_t> ExceptionSectOrErr =
       getSectionFileOffsetToRawData(XCOFF::STYP_EXCEPT);