[all-commits] [llvm/llvm-project] b0cc94: [Clang] Diagnose jumps into statement expressions

cor3ntin via All-commits all-commits at lists.llvm.org
Tue Jul 11 12:41:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0cc947b5d0a74f4ffe63c53b32978b21498e72e
      https://github.com/llvm/llvm-project/commit/b0cc947b5d0a74f4ffe63c53b32978b21498e72e
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/JumpDiagnostics.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp
    M clang/test/Sema/asm-goto.cpp
    M clang/test/Sema/scope-check.c
    M clang/test/SemaCXX/constant-expression-cxx14.cpp
    M clang/test/SemaObjC/scope-check.m

  Log Message:
  -----------
  [Clang] Diagnose jumps into statement expressions

Such jumps are not allowed by GCC and allowing them
can lead to situations where we jumps into unevaluated
statements.

Fixes #63682

Reviewed By: aaron.ballman, #clang-language-wg

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




More information about the All-commits mailing list