[all-commits] [llvm/llvm-project] db5bc8: [Clang] Warn about `[[noreturn]]` on coroutines (#...

nerix via All-commits all-commits at lists.llvm.org
Tue Feb 18 13:31:02 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db5bc8e9d07729ce4994cc908275722a093e5c0c
      https://github.com/llvm/llvm-project/commit/db5bc8e9d07729ce4994cc908275722a093e5c0c
  Author: nerix <nerixdev at outlook.de>
  Date:   2025-02-18 (Tue, 18 Feb 2025)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/AnalysisBasedWarnings.cpp
    M clang/lib/Sema/SemaCoroutine.cpp
    M clang/lib/Sema/SemaStmt.cpp
    A clang/test/SemaCXX/coroutine-noreturn.cpp

  Log Message:
  -----------
  [Clang] Warn about `[[noreturn]]` on coroutines (#127623)

Declaring a coroutine `[[noreturn]]` doesn't make sense, because it will
always return its handle. Clang previously crashed when trying to warn
about this (diagnostic ID was 0).

Fixes #127327.



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