Skip to content

Commit 9617ffc

Browse files
committed
[LLD] [ELF] Add parentheses to silence a GCC warning. NFC.
This silences the following warning: ../tools/lld/ELF/SyntheticSections.cpp:1596:48: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 1596 | assert((index != 0 || type != target->gotRel && type != target->pltRel || Differential Revision: https://reviews.llvm.org/D127395
1 parent 8ab2c38 commit 9617ffc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/ELF/SyntheticSections.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@ uint32_t DynamicReloc::getSymIndex(SymbolTableBaseSection *symTab) const {
15931593
return 0;
15941594

15951595
size_t index = symTab->getSymbolIndex(sym);
1596-
assert((index != 0 || type != target->gotRel && type != target->pltRel ||
1596+
assert((index != 0 || (type != target->gotRel && type != target->pltRel) ||
15971597
!mainPart->dynSymTab->getParent()) &&
15981598
"GOT or PLT relocation must refer to symbol in dynamic symbol table");
15991599
return index;

0 commit comments

Comments
 (0)