[llvm] r267737 - Silence a -Wdangling-else

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 09:46:33 PDT 2016


Author: rnk
Date: Wed Apr 27 11:46:33 2016
New Revision: 267737

URL: http://llvm.org/viewvc/llvm-project?rev=267737&view=rev
Log:
Silence a -Wdangling-else

Modified:
    llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp?rev=267737&r1=267736&r2=267737&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp Wed Apr 27 11:46:33 2016
@@ -1701,11 +1701,12 @@ AMDGPUAsmParser::parseHwregOp(OperandVec
         // HwRegCode (6) [5:0]
         // Offset (5) [10:6]
         // WidthMinusOne (5) [15:11]
-        if (HwRegCode < 0 || HwRegCode > 63)
+        if (HwRegCode < 0 || HwRegCode > 63) {
           if (IsIdentifier)
             Error(S, "invalid symbolic name of hardware register");
           else
             Error(S, "invalid code of hardware register: only 6-bit values are legal");
+        }
         if (Offset < 0 || Offset > 31)
           Error(S, "invalid bit offset: only 5-bit values are legal");
         if (Width < 1 || Width > 32)




More information about the llvm-commits mailing list