[all-commits] [llvm/llvm-project] 67ee18: [Clang] Add machinery to catch overflow in unary m...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Tue Jan 31 09:35:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67ee18cc7a308ae8418689c4f03a1be73b8b874a
      https://github.com/llvm/llvm-project/commit/67ee18cc7a308ae8418689c4f03a1be73b8b874a
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CXX/expr/expr.const/p2-0x.cpp
    M clang/test/SemaCXX/integer-overflow.cpp
    M clang/unittests/Support/TimeProfilerTest.cpp

  Log Message:
  -----------
  [Clang] Add machinery to catch overflow in unary minus outside of a constant expression context

We provide several diagnostics for various undefined behaviors due to signed
integer overflow outside of a constant expression context. We were missing the
machinery to catch overflows due to unary minus.

Fixes: https://github.com/llvm/llvm-project/issues/31643

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




More information about the All-commits mailing list