[llvm] r252448 - [Hexagon] Fixing warnings.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 12:03:59 PST 2015


We tend not to put multiple statements on the same line (clang-format will
split these, for example) - though I don't think there's a massively
overriding convention about whether the cast to void should go before or
after the assert.

On Sun, Nov 8, 2015 at 9:47 PM, Colin LeMahieu via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: colinl
> Date: Sun Nov  8 23:47:56 2015
> New Revision: 252448
>
> URL: http://llvm.org/viewvc/llvm-project?rev=252448&view=rev
> Log:
> [Hexagon] Fixing warnings.
>
> Modified:
>     llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
>
> Modified: llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp?rev=252448&r1=252447&r2=252448&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp (original)
> +++ llvm/trunk/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp Sun Nov
> 8 23:47:56 2015
> @@ -87,8 +87,6 @@ class HexagonAsmParser : public MCTarget
>    MCAssembler *getAssembler() const { return Assembler; }
>    MCAsmLexer &getLexer() const { return Parser.getLexer(); }
>
> -  unsigned ArchVersion;
> -
>    bool equalIsAsmAssignment() override { return false; }
>    bool isLabel(AsmToken &Token) override;
>
> @@ -1190,7 +1188,7 @@ bool HexagonAsmParser::isLabel(AsmToken
>      return true;
>    if (!MatchRegisterName(String.lower()))
>      return true;
> -  assert(Second.is(AsmToken::Colon));
> +  assert(Second.is(AsmToken::Colon)); (void)Second;
>    StringRef Raw (String.data(), Third.getString().data() - String.data() +
>                   Third.getString().size());
>    std::string Collapsed = Raw;
> @@ -1566,7 +1564,7 @@ int HexagonAsmParser::processInstruction
>      MCOperand &MO = Inst.getOperand(2);
>      int64_t Value;
>      bool Success = MO.getExpr()->evaluateAsAbsolute(Value);
> -    assert(Success && "Assured by matcher");
> +    assert(Success && "Assured by matcher"); (void)Success;
>      if (Value == 0) {
>        MCInst TmpInst;
>        MCOperand &Pd = Inst.getOperand(0);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151109/15914435/attachment.html>


More information about the llvm-commits mailing list