forked from OSchip/llvm-project
MatchTableRecord::emit - fix boolean operator precedence warnings from PVS Studio. NFCI.
Make it clear that (Flags & MTRF_????) should resolve to a boolean.
This commit is contained in:
parent
77a6b358b5
commit
43fe9afa4f
|
@ -609,7 +609,7 @@ MatchTableRecord MatchTable::LineBreak = {
|
|||
void MatchTableRecord::emit(raw_ostream &OS, bool LineBreakIsNextAfterThis,
|
||||
const MatchTable &Table) const {
|
||||
bool UseLineComment =
|
||||
LineBreakIsNextAfterThis | (Flags & MTRF_LineBreakFollows);
|
||||
LineBreakIsNextAfterThis || (Flags & MTRF_LineBreakFollows);
|
||||
if (Flags & (MTRF_JumpTarget | MTRF_CommaFollows))
|
||||
UseLineComment = false;
|
||||
|
||||
|
@ -620,7 +620,7 @@ void MatchTableRecord::emit(raw_ostream &OS, bool LineBreakIsNextAfterThis,
|
|||
if (Flags & MTRF_Label)
|
||||
OS << ": @" << Table.getLabelIndex(LabelID);
|
||||
|
||||
if (Flags & MTRF_Comment && !UseLineComment)
|
||||
if ((Flags & MTRF_Comment) && !UseLineComment)
|
||||
OS << "*/";
|
||||
|
||||
if (Flags & MTRF_JumpTarget) {
|
||||
|
|
Loading…
Reference in New Issue