[all-commits] [llvm/llvm-project] ea92b1: [Sema] Implement support for -Wformat-signedness (...

Karl-Johan Karlsson via All-commits all-commits at lists.llvm.org
Sun Mar 31 02:10:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ea92b1f9d0fc31f1fd97ad04eb0412003a37cb0d
      https://github.com/llvm/llvm-project/commit/ea92b1f9d0fc31f1fd97ad04eb0412003a37cb0d
  Author: Karl-Johan Karlsson <karl-johan.karlsson at ericsson.com>
  Date:   2024-03-31 (Sun, 31 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/FormatString.h
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/AST/FormatString.cpp
    M clang/lib/Sema/SemaChecking.cpp
    A clang/test/Sema/format-strings-signedness-fixit.c
    A clang/test/Sema/format-strings-signedness.c

  Log Message:
  -----------
  [Sema] Implement support for -Wformat-signedness (#74440)

In gcc there exist a modifier option -Wformat-signedness that turns on
additional signedness warnings in the already existing -Wformat warning.

This patch implements that support in clang. This is done by adding a dummy
warning diag::warn_format_conversion_argument_type_mismatch_signedness that
is never emitted and only used as an option to toggle the signedness warning
in -Wformat. This will ensure gcc compatibility.



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