[all-commits] [llvm/llvm-project] 51ad29: [Clang] Improve diagnostic on `[[nodiscard]]` attr...

Yihe Li via All-commits all-commits at lists.llvm.org
Tue Nov 19 02:05:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51ad2901ca54a01a72db71622b116eb27ea6dcf2
      https://github.com/llvm/llvm-project/commit/51ad2901ca54a01a72db71622b116eb27ea6dcf2
  Author: Yihe Li <winmikedows at hotmail.com>
  Date:   2024-11-19 (Tue, 19 Nov 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/Expr.cpp
    M clang/lib/Sema/SemaStmt.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp
    M clang/test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p3.cpp
    M clang/test/Sema/c2x-nodiscard.c
    M clang/test/SemaCXX/warn-unused-result.cpp

  Log Message:
  -----------
  [Clang] Improve diagnostic on `[[nodiscard]]` attribute (#112521)

A follow-up to #112289.

When diagnosing an unused return value, if the diagnostic
is triggered by an attribute attached to a type, the type name
is now included in the diagnostic.

---------

Co-authored-by: Sirraide <aeternalmail at gmail.com>



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