[all-commits] [llvm/llvm-project] 3b3509: [Sema] haveSameParameterTypes - replace repeated i...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Oct 18 04:37:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b3509b3cba272c98d2235a8664ae9625ac729f8
      https://github.com/llvm/llvm-project/commit/3b3509b3cba272c98d2235a8664ae9625ac729f8
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-10-18 (Mon, 18 Oct 2021)

  Changed paths:
    M clang/lib/Sema/SemaOverload.cpp

  Log Message:
  -----------
  [Sema] haveSameParameterTypes - replace repeated isNull() test with assertions

As reported on https://pvs-studio.com/en/blog/posts/cpp/0771/ (Snippet 2) - (and mentioned on rGdc4259d5a38409) we are repeating the T1.isNull() check instead of checking T2.isNull() as well, and at this point neither should be null - so we're better off with an assertion.

Differential Revision: https://reviews.llvm.org/D107347




More information about the All-commits mailing list