[all-commits] [llvm/llvm-project] 8c42b5: [SelectionDAG] Add missing semicolon after return.

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Oct 25 10:24:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c42b5e89e1948e3a2ccfa3f09d4360f5eb47833
      https://github.com/llvm/llvm-project/commit/8c42b5e89e1948e3a2ccfa3f09d4360f5eb47833
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-10-25 (Tue, 25 Oct 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp

  Log Message:
  -----------
  [SelectionDAG] Add missing semicolon after return.

I'm unsure what the code does without the semicolon. On the surface it
seems like the assert below it would be considered part of the if
and thus the assert would only execute if DestReg is 0. But 0 isn't
considered a virtual register so the assert should fail.

Found by PVS Studio.
Reported https://pvs-studio.com/en/blog/posts/cpp/1003/ (N7)




More information about the All-commits mailing list