<div dir="ltr">Looks good, committed in r233002</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 22, 2015 at 12:43 PM, Richard <span dir="ltr"><<a href="mailto:legalize@xmission.com" target="_blank">legalize@xmission.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi alexfh, sunfish, craig.topper,<br>
<br>
Simplify boolean expressions with `true` and `false` with `clang-tidy`<br>
<br>
<a href="http://reviews.llvm.org/D8519" target="_blank">http://reviews.llvm.org/D8519</a><br>
<br>
Files:<br>
  lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp<br>
  lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp<br>
  lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp<br>
<br>
Index: lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp<br>
===================================================================<br>
--- lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp<br>
+++ lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp<br>
@@ -310,11 +310,8 @@<br>
                                uint8_t prefix,<br>
                                uint64_t location)<br>
 {<br>
-  if (insn->prefixPresent[prefix] == 1 &&<br>
-     insn->prefixLocations[prefix] == location)<br>
-    return true;<br>
-  else<br>
-    return false;<br>
+  return insn->prefixPresent[prefix] == 1 &&<br>
+     insn->prefixLocations[prefix] == location;<br>
 }<br>
<br>
 /*<br>
Index: lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp<br>
===================================================================<br>
--- lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp<br>
+++ lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp<br>
@@ -36,7 +36,7 @@<br>
<br>
     MCSymbol *Sym = Ctx.GetOrCreateSymbol(SymName);<br>
     // FIXME: check that the value is actually the same.<br>
-    if (Sym->isVariable() == false)<br>
+    if (!Sym->isVariable())<br>
       Sym->setVariableValue(MCConstantExpr::Create(SymAddr, Ctx));<br>
<br>
     const MCExpr *Expr = nullptr;<br>
Index: lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp<br>
===================================================================<br>
--- lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp<br>
+++ lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp<br>
@@ -38,7 +38,7 @@<br>
<br>
     MCSymbol *Sym = Ctx.GetOrCreateSymbol(SymName);<br>
     // FIXME: check that the value is actually the same.<br>
-    if (Sym->isVariable() == false)<br>
+    if (!Sym->isVariable())<br>
       Sym->setVariableValue(MCConstantExpr::Create(SymAddr, Ctx));<br>
     const MCExpr *Expr = nullptr;<br>
<br>
@@ -93,7 +93,7 @@<br>
         RSymI->getName(RSymName);<br>
<br>
         MCSymbol *RSym = Ctx.GetOrCreateSymbol(RSymName);<br>
-        if (RSym->isVariable() == false)<br>
+        if (!RSym->isVariable())<br>
           RSym->setVariableValue(MCConstantExpr::Create(RSymAddr, Ctx));<br>
<br>
         const MCExpr *RHS = MCSymbolRefExpr::Create(RSym, Ctx);<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>