karka228 wrote:
Ping.
https://github.com/llvm/llvm-project/pull/74440
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
karka228 wrote:
Ping. Lets pickup the discussion from before Christmas. Is the solution with
the dummy warning (that @hazohelet wrote about in a previous comment) an
acceptable solution?
https://github.com/llvm/llvm-project/pull/74440
___
cfe-commit
https://github.com/karka228 updated
https://github.com/llvm/llvm-project/pull/74440
>From a80bf9d03f19d48c0aca4af7758dc49516da8825 Mon Sep 17 00:00:00 2001
From: Karl-Johan Karlsson
Date: Tue, 5 Dec 2023 10:03:00 +0100
Subject: [PATCH 1/7] [Sema] Implement support for -Wformat-signedness
In gc
hazohelet wrote:
> I need to extend the tablegen backend ClangDiagnosticsEmitter with some kind
> of new option to handle this, right?
Alternatively, you could probably use `DiagnosticsEngine::isIgnored` to check
if the `-Wformat-signedness` is enabled or not, and control whether
`MatchSigned
AaronBallman wrote:
> I have started to implement defining the -Wformat-signedness option config in
> clang/include/clang/Basic/DiagnosticSemaKinds.td as suggested originally by
> @hazohelet and I agree that the implementation is a lot cleaner that way.
> However before finishing implementing
https://github.com/karka228 updated
https://github.com/llvm/llvm-project/pull/74440
>From a80bf9d03f19d48c0aca4af7758dc49516da8825 Mon Sep 17 00:00:00 2001
From: Karl-Johan Karlsson
Date: Tue, 5 Dec 2023 10:03:00 +0100
Subject: [PATCH 1/5] [Sema] Implement support for -Wformat-signedness
In gc
https://github.com/karka228 updated
https://github.com/llvm/llvm-project/pull/74440
>From a80bf9d03f19d48c0aca4af7758dc49516da8825 Mon Sep 17 00:00:00 2001
From: Karl-Johan Karlsson
Date: Tue, 5 Dec 2023 10:03:00 +0100
Subject: [PATCH 1/3] [Sema] Implement support for -Wformat-signedness
In gc
karka228 wrote:
I have started to implement defining the -Wformat-signedness option config in
clang/include/clang/Basic/DiagnosticSemaKinds.td as suggested originally by
@hazohelet and I agree that the implementation is a lot cleaner that way.
However before finishing implementing that I think
karka228 wrote:
> I'd like to understand the need for this diagnostic a bit more. I realize GCC
> has it, but it's off-by-default in GCC and `-Wformat` does not enable it
> either: https://godbolt.org/z/Gxczsjdj5
>
> We believe that users don't enable off by default warnings often enough to
>
@@ -918,6 +918,9 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">,
Group,
HelpText<"Enable warnings for deprecated constructs and define
__DEPRECATED">;
def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group,
Visibility<[ClangOption, CC1Option]>;
+def Wformat_signedness
@@ -264,6 +264,8 @@ class ArgType {
/// The conversion specifier and the argument type are compatible. For
/// instance, "%d" and int.
Match = 1,
+/// The conversion specifier and the argument type have different sign
AaronBallman wrote:
```sug
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/74440
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -918,6 +918,9 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">,
Group,
HelpText<"Enable warnings for deprecated constructs and define
__DEPRECATED">;
def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group,
Visibility<[ClangOption, CC1Option]>;
+def Wformat_signedness
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 383e35048e16c85ab26bc46822d3ceb11fd4d3f2
a80bf9d03f19d48c0aca4af7758dc49516da8825 --
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Karl-Johan Karlsson (karka228)
Changes
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.
---
Full
https://github.com/karka228 created
https://github.com/llvm/llvm-project/pull/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.
>From a80bf9d03f19d4
16 matches
Mail list logo