[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap +== + +Warns if any arguments to the sprintf family of functions overlap with the EugeneZelenko wrote: Please synchr

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -131,6 +131,12 @@ New checks Gives warnings for tagged unions, where the number of tags is different from the number of data members inside the union. +- New :doc:`bugprone-undefined-sprintf-overlap + ` check. + + Warns if any arguments to the sprintf family of functi

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap +== + +Warns if any arguments to the sprintf family of functions overlap with the EugeneZelenko wrote: ```suggestion

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/114244 >From fd914cc82688b122654d2d7ada72007541b197c0 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH 1/2] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTidyM

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -131,6 +131,12 @@ New checks Gives warnings for tagged unions, where the number of tags is different from the number of data members inside the union. +- New :doc:`bugprone-undefined-sprintf-overlap + ` check. + + Finds calls to sprintf family of functions whose first

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap +== + +Warns if any arguments to the sprintf family of functions overlap with the +first argument. + +.. code-block:: c++ + +char

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -0,0 +1,93 @@ +//===--- UndefinedSprintfOverlapCheck.cpp - clang-tidy ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-31 Thread via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-undefined-sprintf-overlap + +bugprone-undefined-sprintf-overlap +== + +Warns if any arguments to the sprintf family of functions overlap with the +first argument. + +.. code-block:: c++ + +char

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-30 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/114244 >From fd914cc82688b122654d2d7ada72007541b197c0 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTidyModul

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-30 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/114244 >From 835540fb51517eb2b9e80a7c3b23988419cfc962 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH 1/3] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTidyM

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Chris Cotter (ccotter) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114244.diff 8 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

[clang-tools-extra] Add bugprone-sprintf-overlap (PR #114244)

2024-10-30 Thread Chris Cotter via cfe-commits
https://github.com/ccotter created https://github.com/llvm/llvm-project/pull/114244 None >From 835540fb51517eb2b9e80a7c3b23988419cfc962 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTid