[all-commits] [llvm/llvm-project] 7ffaaf: [Clang] Warning as error for fold expressions over...

cor3ntin via All-commits all-commits at lists.llvm.org
Thu May 1 08:00:25 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ffaaf47528ff42d4c037e1b003d940e51347db5
      https://github.com/llvm/llvm-project/commit/7ffaaf47528ff42d4c037e1b003d940e51347db5
  Author: cor3ntin <corentinjabot at gmail.com>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/test/Parser/cxx1z-fold-expressions.cpp
    M clang/test/SemaTemplate/cxx1z-fold-expressions.cpp

  Log Message:
  -----------
  [Clang] Warning as error for fold expressions over comparison operators (#136836)

We made chained comparisons an error.
Fold-expressions over a comparison operator produce chained comparisons,
so we should be consistent there too.

We only emit the warning when instantiating the fold expression so as
not to warn on types with user-defined comparisons.

Partially addresses #129570



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list