[llvm] r346365 - Add parentheses to silence warning.

Jorge Gorbe Moya via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 14:30:01 PST 2018


Author: jgorbe
Date: Wed Nov  7 14:30:01 2018
New Revision: 346365

URL: http://llvm.org/viewvc/llvm-project?rev=346365&view=rev
Log:
Add parentheses to silence warning.

DWARFContext.cpp:356:20: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]

Modified:
    llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp

Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=346365&r1=346364&r2=346365&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Wed Nov  7 14:30:01 2018
@@ -353,7 +353,7 @@ void DWARFContext::dump(
 
   auto dumpDebugInfo = [&](const char *Name, unit_iterator_range Units) {
     OS << '\n' << Name << " contents:\n";
-    if (DumpOffset = DumpOffsets[DIDT_ID_DebugInfo])
+    if ((DumpOffset = DumpOffsets[DIDT_ID_DebugInfo]))
       for (const auto &U : Units)
         U->getDIEForOffset(DumpOffset.getValue())
             .dump(OS, 0, DumpOpts.noImplicitRecursion());




More information about the llvm-commits mailing list