budimirarandjelovichtec wrote:
@AaronBallman @aaronpuchert @vitalybuka @Endilll
Last found issues are addressed and new PR is created:
https://github.com/llvm/llvm-project/pull/105479
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits ma
vitalybuka wrote:
Thank you!
Sorry, I should search for reverts before complaining.
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
> @budimirarandjelovicsyrmia Any updates? Should we revert the patch?
I already reverted in 9d1017204a253782a82d1b7d16c59eea3f811a11 so the bots have
been slowly getting back to green
https://github.com/llvm/llvm-project/pull/70024
__
vitalybuka wrote:
@budimirarandjelovicsyrmia Any updates? Should we revert the patch?
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`sanitizer-aarch64-linux-bootstrap-asan` running on `sanitizer-buildbot8` while
building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/24/builds/449
Here is the relevant
AaronBallman wrote:
There are multiple distinct issues that were caught:
build failure -- https://lab.llvm.org/buildbot/#/builders/72/builds/1123
sanitizer failure -- https://lab.llvm.org/buildbot/#/builders/164/builds/920
different failure from above --
https://lab.llvm.org/buildbot/#/builders
budimirarandjelovicsyrmia wrote:
Problem is in function f41 where diagnosing depends on architecture and
operating system.
```
void f41(char *out, ... /* args */) // #f41
{
va_list args;
char *ch;
vscanf("%s", ch);
vprintf(out, args);
}
```
As this is unusual situation, I suppos
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`sanitizer-x86_64-linux-bootstrap-msan` running on `sanitizer-buildbot5` while
building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/164/builds/920
Here is the relevant
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-win-x-aarch64`
running on `as-builder-2` while building `clang` at step 9 "test-check-clang".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/193/builds/896
Here is the relevant piece of the
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin`
running on `doug-worker-3` while building `clang` at step 6
"test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/23/builds/925
Here is the rel
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-solaris11-sparcv9`
running on `solaris11-sparcv9` while building `clang` at step 5 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/13/builds/686
Here is the relevant piece of the
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux`
running on `ppc64le-sanitizer` while building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/72/builds/1123
Here is the relevant piece of the bui
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while
building `clang` at step 12 "build-stage2-unified-tree".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/168/builds/972
Here
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux`
running on `sanitizer-buildbot8` while building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/51/builds/1226
Here is the relevant piece of the b
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux`
running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/66/builds/1409
Here is the relevant piece of the bu
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running
on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/154/builds/1294
Here is the relevant piece of
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick`
running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja
check 1".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/65/builds/1303
Here is the relevant piece
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win`
running on `sie-win-worker` while building `clang` at step 7
"test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/46/builds/1528
Here is the
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while
building `clang` at step 6 "test-build-unified-tree-check-all".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/144/builds/2140
H
https://github.com/djtodoro closed
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM, thank you!
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 569ecf2818c47b355fc1130fccb611e0d40f21a2 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
AaronBallman wrote:
Pre-commit CI seems to have found a valid failure:
```
_bk;t=1720616429374FAIL: Clang :: Sema/attr-format-missing.c (16228 of 20429)
_bk;t=1720616429374 TEST 'Clang ::
Sema/attr-format-missing.c' FAILED
_bk;t=1720616429374Exit Co
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 2abeecc9379df7c87dc32ba458a4dd79c3aabb78 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 30d1b5012de980b0933011881fd44edc367082af Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 1d184ff69cfdbb94f7b3e829d8f2e7aae13a6aaf Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia edited
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 34913edf1a2b1f294ed7a70d27ce772aca41e3dd Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia edited
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 20932c9fc48a2c320058ec48baa065fd9e59f801 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From a720cb0c8f0d1ca0f9d98385748e50e85c615612 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From a67db17140dca5f0b7e4099c08f2753eda7dd4f2 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 5bc76cd96f52cf8184712c8e1ffa521f05e3e29c Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 97cc6f1e97bb27422df8fa0ecce2f4ad1dfcacff Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From f87e413ff9dcaa2e5ab73a565f168cc55dc54db0 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
@@ -0,0 +1,303 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,beforeCxx2b
-Wmissing-format-attribute %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2b -Wmissing-format-attribute
%s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 -Wmissing-format-attribute
%s
+
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From f751c9f2aa48d80cd7facca289317fc306068f38 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
@@ -501,6 +501,9 @@ Improvements to Clang's diagnostics
- Clang emits a ``-Wparentheses`` warning for expressions with consecutive
comparisons like ``x < y < z``.
Fixes #GH20456.
+- Clang now diagnoses missing format attributes for non-template functions and
+ class/struct
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
@@ -7131,6 +7138,114 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
@@ -0,0 +1,277 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+typedef unsigned short char16_t;
+typedef unsigned int char32_t;
+typedef __WCHAR_TYPE__ wchar_t;
+typedef __SIZE_TYPE__ size_t;
+typedef __builtin_va_list va_list;
+
+__attribute__((__for
@@ -0,0 +1,303 @@
+// RUN: %clang_cc1 -fsyntax-only -verify=expected,beforeCxx2b
-Wmissing-format-attribute %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2b -Wmissing-format-attribute
%s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 -Wmissing-format-attribute
%s
+
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 33f9a9b3df756331625ea3cc081e7ee7443d03f5 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
budimirarandjelovicsyrmia wrote:
Ping @AaronBallman @aaronpuchert Any comment? (except Resolve conflicts)
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
https://github.com/Endilll commented:
Sema.h changes look good.
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
budimirarandjelovicsyrmia wrote:
ping @AaronBallman @Endilll @aaronpuchert
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 44e3593c8409a49d878d6a0b2eb97732c01cd7b3 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 0fc447dabd674597bbff456f638ee52a49ef5b0c Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 9b9177b9b6e42fdf1cd54ccd9f16aae892b59f28 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
budimirarandjelovicsyrmia wrote:
ping
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 024e4f0d0de64ba1f5f68eea578eb4ac1a554f0e Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 75ec541cdf717931afe70abc412cb1747f84e0d7 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 79873c374c982eed00c3adbc91b5cbff91c5946b Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
AaronBallman wrote:
Pre-commit CI is crashing and it seems related to your changes:
```
[10077/10756] Generating
ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.x86_64-calls.o[K_bk;t=1713432335867
_bk;t=1713432335867[31mFAILED:
[0mprojects/compiler-rt/lib/asan/tests/ASAN_NOINST_TEST_OBJECTS.gtest
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 80274db3b96ec8dc4b19da9290d3a4748b679e07 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 9286a2cc9acec86284e4b1a4b3d42e3116d46fa1 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From d74a1c4372fe343d8c7a0560e3df607e1babf913 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From e198dc5518f647fef0dff20f87dd01e2a187d892 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From c77435557c7b933f4e997b0fed64b37bb98fd8dd Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 24d342d4d3a432a6f8e1e01e410a6e9dbeb5e0dd Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
@@ -1698,6 +1698,9 @@ class Sema final {
ChangedStateAtExit
};
+ void DiagnoseMissingFormatAttributes(const FunctionDecl *FDecl,
Endilll wrote:
This declaration is placed among functions implemented in `SemaAttr.cpp`, as
you might see around line 1296
https://github.com/Endilll requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Endilll edited
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/budimirarandjelovicsyrmia reopened
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 184fa1b21011d3700f2d501c49882bb87fcb5f38 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 5 Apr 2024 15:20:37 +0200
Subject: [PATCH] [clang] Catch missing format attribut
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 1c027637176d9100d3cc0a4f92b4ee227d4afddf Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 7adedf54a6c4d509046915777600b6e66b90bb8c Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
@@ -7096,6 +7096,111 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
@@ -0,0 +1,211 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+#include
+#include
AaronBallman wrote:
Same issue here with includes as in the C file.
https://github.com/llvm/llvm-project/pull/70024
@@ -288,6 +288,9 @@ Improvements to Clang's diagnostics
- Clang now correctly diagnoses no arguments to a variadic macro parameter as
a C23/C++20 extension.
Fixes #GH84495.
+
+- Clang now diagnoses missing format attributes for non-template functions and
class/struct/unio
@@ -7096,6 +7096,111 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7096,6 +7096,111 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
@@ -0,0 +1,223 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+#include
+#include
+#include
+#include
AaronBallman wrote:
Our test files should be hermetic and not rely on anything from the test system
itself. `stdarg.h` is fine
@@ -7096,6 +7096,111 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
@@ -7096,6 +7096,111 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
@@ -7096,6 +7096,111 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// This function is called only if function call is not inside template body.
+// TODO: Add call for function calls
https://github.com/AaronBallman commented:
Precommit CI found related failures that should be addressed.
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
budimirarandjelovicsyrmia wrote:
ping
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 7adedf54a6c4d509046915777600b6e66b90bb8c Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 7adedf54a6c4d509046915777600b6e66b90bb8c Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
Endilll wrote:
I'm not able to review Sema.h changes because of a merge conflict.
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6849,6 +6849,71 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// Warn if parent function misses format attribute. Parent function misses
+// format attribute if there is an argum
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From 7adedf54a6c4d509046915777600b6e66b90bb8c Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
@@ -6849,6 +6849,71 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// Warn if parent function misses format attribute. Parent function misses
+// format attribute if there is an argum
@@ -0,0 +1,132 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s
+
+#include
+#include
+
+void f1(const std::string &str, ... /* args */)
+{
+va_list args;
+vscanf(str.c_str(), args); // no warning
+vprintf(str.c_str(), args); // no warning
+
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From ca3bfcd4052276b0a776f6acfefcd83bbeab28a1 Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// Warn if parent function misses format attribute. Parent function misses
+// format attribute if there is an argum
https://github.com/budimirarandjelovicsyrmia updated
https://github.com/llvm/llvm-project/pull/70024
From c8d3fbdf7fc494aaf5c3ac1e2ca9545d8bc4e0bc Mon Sep 17 00:00:00 2001
From: budimirarandjelovicsyrmia
Date: Fri, 13 Oct 2023 14:45:15 +0200
Subject: [PATCH] [clang] Catch missing format attribu
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// Warn if parent function misses format attribute. Parent function misses
+// format attribute if there is an argum
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// Warn if parent function misses format attribute. Parent function misses
+// format attribute if there is an argum
@@ -6849,6 +6849,73 @@ static void handleSwiftAsyncAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr);
}
+// Warn if parent function misses format attribute. Parent function misses
+// format attribute if there is an argum
https://github.com/aaronpuchert edited
https://github.com/llvm/llvm-project/pull/70024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 142 matches
Mail list logo