[all-commits] [llvm/llvm-project] efbf01: Only issue warning for subtraction involving null ...

Jamie Schmeiser via All-commits all-commits at lists.llvm.org
Fri Jun 3 07:12:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: efbf0136b4108692ddd1a852b3f5b232c10d2097
      https://github.com/llvm/llvm-project/commit/efbf0136b4108692ddd1a852b3f5b232c10d2097
  Author: Jamie Schmeiser <schmeise at ca.ibm.com>
  Date:   2022-06-03 (Fri, 03 Jun 2022)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/pointer-subtraction.c
    M clang/test/Sema/pointer-subtraction.cpp

  Log Message:
  -----------
  Only issue warning for subtraction involving null pointers on live code paths

Summary:
Change the warning produced for subtraction from (or with) a null pointer
to only be produced when the code path is live.
https://github.com/llvm/llvm-project/issues/54570

Author: Jamie Schmeiser <schmeise at ca.ibm.com>
Reviewed By: anarazel (Andres Freund)
Differential Revision: https://reviews.llvm.org/D126816




More information about the All-commits mailing list