Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2
# de8b2f0c 29-Sep-2023 ziqingluo-90 <ziqing@udel.edu>

[-Wunsafe-buffer-usage] Extract the included part in tests to separate header files

Extract included parts in the following tests to separate header files:
- SemaCXX/warn-unsafe-buffer-usage-fixits-

[-Wunsafe-buffer-usage] Extract the included part in tests to separate header files

Extract included parts in the following tests to separate header files:
- SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span-overload.cpp
- SemaCXX/warn-unsafe-buffer-usage-fixits-parm-span.cpp

Removed the included part in the following tests as it is not useful:
- SemaCXX/warn-unsafe-buffer-usage-warning-unevaluated-context.cpp

show more ...


# 33f6161d 21-Sep-2023 Ziqing Luo <ziqing@udel.edu>

[-Wunsafe-buffer-usage] Group parameter fix-its

For a function `F` whose parameters need to be fixed, we group fix-its
of F's parameters together so that either all of the parameters get
fixed or no

[-Wunsafe-buffer-usage] Group parameter fix-its

For a function `F` whose parameters need to be fixed, we group fix-its
of F's parameters together so that either all of the parameters get
fixed or none of them gets fixed.

Reviewed by: NoQ (Artem Dergachev), t-rasmud (Rashmi Mudduluru), jkorous (Jan Korous)

Differential revision: https://reviews.llvm.org/D153059

show more ...


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# 41279e87 17-Aug-2023 Ziqing Luo <ziqing@udel.edu>

[-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

- Factor out the code that will be shared by both parameter and local variable fix-its
- Add a check to ensure that a TypeLoc::isNu

[-Wunsafe-buffer-usage] Refactor and improve for parameter fix-its

- Factor out the code that will be shared by both parameter and local variable fix-its
- Add a check to ensure that a TypeLoc::isNull is false before using the TypeLoc
- Remove the special check for whether a fixing variable involves unnamed types. This check is unnecessary now.
- Move tests for cv-qualified parameters and unnamed types out of the "...-unsupported.cpp" test file.

Reviewed by: NoQ (Artem Dergachev)

Differential revision: https://reviews.llvm.org/D156188

show more ...


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 4b5f17e0 19-Jul-2023 Ziqing Luo <ziqing@udel.edu>

[-Wunsafe-buffer-usage] Do not assert that function parameters have names

It is possible that a function parameter does not have a name even in
a function definition. This patch deals with such cas

[-Wunsafe-buffer-usage] Do not assert that function parameters have names

It is possible that a function parameter does not have a name even in
a function definition. This patch deals with such cases in generating
function overload fix-its for safe buffers.

Reviewed by: NoQ (Artem Dergachev)

Differential revision: https://reviews.llvm.org/D155641

show more ...


# a07a6f6c 15-Jul-2023 ziqingluo-90 <ziqing@udel.edu>

Re-land "5b012bf5ab5fcb840fe7f6c8664b8981ce6f24f3"

Removed dependency on `clangSema` from UnsafeBufferAnalysis.


# c915908f 15-Jul-2023 NAKAMURA Takumi <geek4civic@gmail.com>

Revert D150338, "[-Wunsafe-buffer-usage] Improving insertion of the [[clang::unsafe_buffer_usage]] attribute"

clangAnalysis should not depend on clangSema.

This reverts commit 5b012bf5ab5fcb840fe7f

Revert D150338, "[-Wunsafe-buffer-usage] Improving insertion of the [[clang::unsafe_buffer_usage]] attribute"

clangAnalysis should not depend on clangSema.

This reverts commit 5b012bf5ab5fcb840fe7f6c8664b8981ce6f24f3.

show more ...


# 5b012bf5 14-Jul-2023 ziqingluo-90 <ziqing@udel.edu>

[-Wunsafe-buffer-usage] Improving insertion of the [[clang::unsafe_buffer_usage]] attribute

For a fix-it that inserts the `[[clang::unsafe_buffer_usage]]`
attribute, it will lookup existing macros d

[-Wunsafe-buffer-usage] Improving insertion of the [[clang::unsafe_buffer_usage]] attribute

For a fix-it that inserts the `[[clang::unsafe_buffer_usage]]`
attribute, it will lookup existing macros defined for the attribute
and use the (last defined such) macro directly. Fix-its will use raw
`[[clang::unsafe_buffer_usage]]` if no such macro is defined.

The implementation mimics how a similar machine for the
`[[fallthrough]]` attribute was implemented.

Reviewed by: NoQ (Artem Dergachev)

Differential revision: https://reviews.llvm.org/D150338

show more ...


Revision tags: llvmorg-16.0.6
# 1e270be0 09-Jun-2023 ziqingluo-90 <ziqing@udel.edu>

[-Wunsafe-buffer-usage] Add fix-its for function parameters using the `span` strategy

Generate fix-its for function parameters that are raw pointers used
unsafely. Currently, the analyzer fixes one

[-Wunsafe-buffer-usage] Add fix-its for function parameters using the `span` strategy

Generate fix-its for function parameters that are raw pointers used
unsafely. Currently, the analyzer fixes one parameter at a time.

Fix-its for a function parameter includes:

- Fix the parameter declaration of the definition, result in a new
overload of the function. We call the function with the original
signature the old overload.
- For any other existing declaration of the old overload, mark it with
the [[unsafe_buffer_usage]] attribute and generate a new overload
declaration next to it.
- Creates a new definition for the old overload, which is simply
defined by a call to the new overload.

Reviewed by: NoQ (Artem Dergachev), t-rasmud (Rashmi Mudduluru), and
jkorous (Jan Korous)

Differential revision: https://reviews.llvm.org/D143048

show more ...