[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-14 Thread Dominik Wójt via cfe-commits
domin144 wrote: @MaskRay @petrhosek @smithp35 @mplatings Looking at previous reviews for multilib related changes you might be interested. (ingore the buildkite failure for now. It seems unrelated.) https://github.com/llvm/llvm-project/pull/81474

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial functions (PR #81829)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81829 >From 382ce72e206ca80e3414d5a141afa0f4f8b8 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 23:30:27 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial functions (PR #81829)

2024-02-14 Thread via cfe-commits
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 dcbb574cfc3445251ff1c751f27b52ed6503bead 793c72168db3a27ad189e9c95d7701d19cefec1e --

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial functions (PR #81829)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Allow address-of operator (), enum constant, and a reference to constant as well as materializing temporqary expression and an expression with cleanups to appear within a trivial function.

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial functions (PR #81829)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Allow address-of operator (), enum constant, and a reference to constant as well as materializing temporqary expression and an expression with cleanups to appear within a trivial function. --- Full diff:

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect more trivial functions (PR #81829)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81829 Allow address-of operator (&), enum constant, and a reference to constant as well as materializing temporqary expression and an expression with cleanups to appear within a trivial function. >From

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-14 Thread Kito Cheng via cfe-commits
kito-cheng wrote: RISC-V GCC has enabled `-fasynchronous-unwind-tables` and `-funwind-tables` by default for Linux target, and disabled by default for baremetal, so generally LGTM since it align the behavior with GCC, but I would like to wait @asb's response. NOTE: The patch[1] is come from

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-14 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni closed https://github.com/llvm/llvm-project/pull/81257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ab76e48 - [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (#81257)

2024-02-14 Thread via cfe-commits
Author: NAKAMURA Takumi Date: 2024-02-15T16:24:37+09:00 New Revision: ab76e48ac2c2dbfc7d6a600b9b0dd0672e6d9439 URL: https://github.com/llvm/llvm-project/commit/ab76e48ac2c2dbfc7d6a600b9b0dd0672e6d9439 DIFF:

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
@@ -538,11 +564,222 @@ std::optional checkName(const NamedDecl , Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Result); +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
@@ -538,11 +564,222 @@ std::optional checkName(const NamedDecl , Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Result); +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
@@ -696,7 +982,7 @@ renameOutsideFile(const NamedDecl , llvm::StringRef MainFilePath, FilePath); } auto RenameEdit = -buildRenameEdit(FilePath, AffectedFileCode, *RenameRanges, NewName); +buildRenameEdit(FilePath, AffectedFileCode,

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
@@ -538,11 +564,222 @@ std::optional checkName(const NamedDecl , Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Result); +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks, lgtm! https://github.com/llvm/llvm-project/pull/76466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
@@ -538,11 +564,222 @@ std::optional checkName(const NamedDecl , Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Result); +

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-14 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/76466 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-14 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 updated https://github.com/llvm/llvm-project/pull/81474 From e25d580c7297071f067200639d8b8fe3be74eec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Mon, 12 Feb 2024 13:38:14 +0100 Subject: [PATCH 1/2] [clang][AArch64] multilib: fix deduction

[clang] [llvm] [ASAN] For Asan instrumented global, emit two symbols, one with actual size and other with instrumented size. (PR #70166)

2024-02-14 Thread via cfe-commits
skc7 wrote: Hi @hctim, In this patch, we are identifying globals that are instrumented using an new IR attribute and for them extra symbol with padded size is emitted. This is done only in ASAN pass. Not sure how would that affect HWAsan and MTE-globals. Could you please give an example for

[clang] 36adfec - Adding support of AMDLIBM vector library (#78560)

2024-02-14 Thread via cfe-commits
Author: Rohit Aggarwal Date: 2024-02-15T12:13:07+05:30 New Revision: 36adfec155de366d722f2bac8ff9162289dcf06c URL: https://github.com/llvm/llvm-project/commit/36adfec155de366d722f2bac8ff9162289dcf06c DIFF:

[clang] [llvm] Adding support of AMDLIBM vector library (PR #78560)

2024-02-14 Thread via cfe-commits
https://github.com/ganeshgit closed https://github.com/llvm/llvm-project/pull/78560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b93916c - [clang][Interp][NFC] Convert test to verify=expected,both style

2024-02-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-15T07:23:35+01:00 New Revision: b93916c9798ea09488e30b9b0aae9e54ef0b1956 URL: https://github.com/llvm/llvm-project/commit/b93916c9798ea09488e30b9b0aae9e54ef0b1956 DIFF: https://github.com/llvm/llvm-project/commit/b93916c9798ea09488e30b9b0aae9e54ef0b1956.diff

[clang] [clang][Interp] Do r-to-l conversion immediately when returning (PR #80662)

2024-02-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/80662 >From b93916c9798ea09488e30b9b0aae9e54ef0b1956 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 15 Feb 2024 07:03:58 +0100 Subject:

[clang] b200dfc - [clang][Interp] Fix calling invalid function pointers

2024-02-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-15T07:23:35+01:00 New Revision: b200dfc15904f0f7f19443fd5a399242c80213dc URL: https://github.com/llvm/llvm-project/commit/b200dfc15904f0f7f19443fd5a399242c80213dc DIFF: https://github.com/llvm/llvm-project/commit/b200dfc15904f0f7f19443fd5a399242c80213dc.diff

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-14 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/5] [clang] Use separator for large numeric values in overflow

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Justin Stitt via cfe-commits
JustinStitt wrote: My original idea was to get the SIO sanitizer working with `-fwrapv`, the issue [here](https://github.com/KSPP/linux/issues/26) even suggests it as a viable option. However, after seeing literal checks like: ```cpp case LangOptions::SOB_Undefined: if

[clang] 6087d7b - [clang-format][NFC] Sort options in Format.cpp

2024-02-14 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-02-14T21:40:07-08:00 New Revision: 6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7 URL: https://github.com/llvm/llvm-project/commit/6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7 DIFF: https://github.com/llvm/llvm-project/commit/6087d7bc0a9d7d4ad2c94a131c2bc427b767c9d7.diff

[clang] d53515a - [clang][Interp] Fix variadic member functions

2024-02-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-15T05:59:53+01:00 New Revision: d53515afef57a3abf84daff169fbc7626a306817 URL: https://github.com/llvm/llvm-project/commit/d53515afef57a3abf84daff169fbc7626a306817 DIFF: https://github.com/llvm/llvm-project/commit/d53515afef57a3abf84daff169fbc7626a306817.diff

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-14 Thread Timm Baeder via cfe-commits
@@ -2187,6 +2188,12 @@ void APInt::toString(SmallVectorImpl , unsigned Radix, bool Signed, } } + // Number of digits in a group between separators. + unsigned Grouping = (Radix == 8 || Radix == 10) ? 3 : 4; + if (Radix == 8 || Radix == 10) { +Grouping = 3; + }

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-14 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: Thanks all for the review! @AaronBallman, Could you please land this patch for me? https://github.com/llvm/llvm-project/pull/77092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [MC/DC] Refactor: Let MCDCConditionID int16_t with zero-origin (PR #81257)

2024-02-14 Thread Jessica Paquette via cfe-commits
https://github.com/ornata approved this pull request. https://github.com/llvm/llvm-project/pull/81257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Use separator for large numeric values in overflow diagnostic (PR #80939)

2024-02-14 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa updated https://github.com/llvm/llvm-project/pull/80939 >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date: Tue, 6 Feb 2024 21:02:05 -0800 Subject: [PATCH 1/5] [clang] Use separator for large numeric values in overflow

[clang] fa9e297 - [ClangPackager] Fix passing in multiple instances of `file`

2024-02-14 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-02-14T22:11:21-06:00 New Revision: fa9e297b8b63dacb962d99814e698658ad71f946 URL: https://github.com/llvm/llvm-project/commit/fa9e297b8b63dacb962d99814e698658ad71f946 DIFF: https://github.com/llvm/llvm-project/commit/fa9e297b8b63dacb962d99814e698658ad71f946.diff

[clang] [clang-format][NFC] Drop "Always" in "AlwaysBreakAfterReturnType". (PR #81591)

2024-02-14 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/81591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d821650 - [clang-format][NFC] Drop "Always" in "AlwaysBreakAfterReturnType". (#81591)

2024-02-14 Thread via cfe-commits
Author: rmarker Date: 2024-02-14T20:10:56-08:00 New Revision: d821650e13145a1acccd337c9853354ad6531507 URL: https://github.com/llvm/llvm-project/commit/d821650e13145a1acccd337c9853354ad6531507 DIFF: https://github.com/llvm/llvm-project/commit/d821650e13145a1acccd337c9853354ad6531507.diff LOG:

[clang] dcbb574 - [analyzer] Teach scan-build to filter reports by file.

2024-02-14 Thread Artem Dergachev via cfe-commits
Author: Brianna Fan Date: 2024-02-14T19:08:07-08:00 New Revision: dcbb574cfc3445251ff1c751f27b52ed6503bead URL: https://github.com/llvm/llvm-project/commit/dcbb574cfc3445251ff1c751f27b52ed6503bead DIFF: https://github.com/llvm/llvm-project/commit/dcbb574cfc3445251ff1c751f27b52ed6503bead.diff

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/81343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6fce42f - [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (#81343)

2024-02-14 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-14T19:03:37-08:00 New Revision: 6fce42f89a2c3f12b019bd3d7fef3e8db2d4671f URL: https://github.com/llvm/llvm-project/commit/6fce42f89a2c3f12b019bd3d7fef3e8db2d4671f DIFF: https://github.com/llvm/llvm-project/commit/6fce42f89a2c3f12b019bd3d7fef3e8db2d4671f.diff

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM let's land! https://github.com/llvm/llvm-project/pull/81343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/81343 >From 791130c5c5de31084c168db33531a5d856104506 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 8 Feb 2024 14:30:20 -0800 Subject: [PATCH 1/5] [-Wunsafe-buffer-usage][NFC] Factor out .data() fixit to

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/81808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a7982d5 - [analyzer] UncountedCallArgsChecker: Detect & ignore trivial function calls. (#81808)

2024-02-14 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-14T18:46:30-08:00 New Revision: a7982d5e7a16f681e80891a819bdf14dde928755 URL: https://github.com/llvm/llvm-project/commit/a7982d5e7a16f681e80891a819bdf14dde928755 DIFF: https://github.com/llvm/llvm-project/commit/a7982d5e7a16f681e80891a819bdf14dde928755.diff

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. Looks great now! https://github.com/llvm/llvm-project/pull/81808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: LGTM! I have a couple minor nitpicks. https://github.com/llvm/llvm-project/pull/81343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -std=c++20 -Wunsafe-buffer-usage \ +// RUN:-fsafe-buffer-usage-suggestions \ +// RUN:-fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s + +void safe_array_assigned_to_safe_ptr(unsigned idx) { + int buffer[10]; + //

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -1490,6 +1548,26 @@ PointerAssignmentGadget::getFixits(const FixitStrategy ) const { return std::nullopt; } +/// \returns fixit that adds .data() call after \DRE. +static inline std::optional createDataFixit(const ASTContext , +

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/81701 >From 9d0da0010f145b23ce2b7e5b6183558609600789 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 13 Feb 2024 18:22:23 -0800 Subject: [PATCH 1/4] [clang][InstallAPI] Add input file support to library

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -848,6 +852,60 @@ class PointerAssignmentGadget : public FixableGadget { } }; +/// An assignment expression of the form: +/// \code +/// ptr = array; +/// \endcode +/// where `p` is a pointer and `array` is a constant size array. +class CArrayToPtrAssignmentGadget :

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808 >From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 16:21:33 -0800 Subject: [PATCH 1/5] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/75425 >From ee88c6e666759c27587f900c99a4aba23c0d4cf4 Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 14 Dec 2023 03:40:57 + Subject: [PATCH] [InstrProf] Single byte counters in coverage This

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -406,6 +406,39 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { } return false; } + +AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { + // FIXME: Proper solution: + // - refactor Sema::CheckArrayAccess + //- split safe/OOB/unknown decision

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808 >From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 16:21:33 -0800 Subject: [PATCH 1/4] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jkorous-apple) Changes depends on https://github.com/llvm/llvm-project/pull/80347 --- Full diff: https://github.com/llvm/llvm-project/pull/81343.diff 4 Files Affected: - (modified)

[clang] [-Wunsafe-buffer-usage] Add fixits for array to pointer assignment (PR #81343)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/81343 >From 791130c5c5de31084c168db33531a5d856104506 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 8 Feb 2024 14:30:20 -0800 Subject: [PATCH 1/4] [-Wunsafe-buffer-usage][NFC] Factor out .data() fixit to

[clang-tools-extra] 8ce1448 - [clangd][test] Fix -Wmissing-field-initializers in DiagnosticsTests.cpp (NFC)

2024-02-14 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-02-15T10:17:58+08:00 New Revision: 8ce144800a7ed7c1e42343b3a9ac5e0ffdbfddbf URL: https://github.com/llvm/llvm-project/commit/8ce144800a7ed7c1e42343b3a9ac5e0ffdbfddbf DIFF: https://github.com/llvm/llvm-project/commit/8ce144800a7ed7c1e42343b3a9ac5e0ffdbfddbf.diff LOG:

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/80504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a1e637 - [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (#80504)

2024-02-14 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-14T18:16:44-08:00 New Revision: 9a1e6373ab3edc38486af504154db2d804e72d3d URL: https://github.com/llvm/llvm-project/commit/9a1e6373ab3edc38486af504154db2d804e72d3d DIFF: https://github.com/llvm/llvm-project/commit/9a1e6373ab3edc38486af504154db2d804e72d3d.diff

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80504 >From e075dc3ac10c0cd2e12b223988ec4821b40b55d2 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Fri, 2 Feb 2024 14:46:59 -0800 Subject: [PATCH 1/7] [-Wunsafe-buffer-usage] Ignore safe array subscripts

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/80504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -598,16 +623,16 @@ class ArraySubscriptGadget : public WarningGadget { } static Matcher matcher() { -// FIXME: What if the index is integer literal 0? Should this be -// a safe gadget in this case? - // clang-format off +// clang-format off

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808 >From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 16:21:33 -0800 Subject: [PATCH 1/3] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Kees Cook via cfe-commits
kees wrote: > Sure -fwrapv makes wraparound defined, but it doesn't prevent us from making > -fsanitize=signed-integer-overflow useful. "-fwrapv => no > signed-integer-overflow" is not a solid argument. > > I think we can try making -fsanitize=signed-integer-overflow effective even > when

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
@@ -598,16 +623,16 @@ class ArraySubscriptGadget : public WarningGadget { } static Matcher matcher() { -// FIXME: What if the index is integer literal 0? Should this be -// a safe gadget in this case? - // clang-format off +// clang-format off

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
@@ -222,4 +223,210 @@ bool isPtrConversion(const FunctionDecl *F) { return false; } +bool isSingleton(const FunctionDecl *F) { + assert(F); + // FIXME: check # of params == 1 + if (auto *MethodDecl = dyn_cast(F)) { +if (!MethodDecl->isStatic()) + return false; +

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
@@ -222,4 +223,210 @@ bool isPtrConversion(const FunctionDecl *F) { return false; } +bool isSingleton(const FunctionDecl *F) { + assert(F); + // FIXME: check # of params == 1 + if (auto *MethodDecl = dyn_cast(F)) { +if (!MethodDecl->isStatic()) + return false; +

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80504 >From e075dc3ac10c0cd2e12b223988ec4821b40b55d2 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Fri, 2 Feb 2024 14:46:59 -0800 Subject: [PATCH 1/6] [-Wunsafe-buffer-usage] Ignore safe array subscripts

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808 >From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 16:21:33 -0800 Subject: [PATCH 1/2] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread via cfe-commits
@@ -821,15 +822,23 @@ void InstrProfRecord::merge(InstrProfRecord , uint64_t Weight, for (size_t I = 0, E = Other.Counts.size(); I < E; ++I) { bool Overflowed; -uint64_t Value = -SaturatingMultiplyAdd(Other.Counts[I], Weight, Counts[I], ); -if (Value >

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread via cfe-commits
https://github.com/gulfemsavrun updated https://github.com/llvm/llvm-project/pull/75425 >From 5553825da82306a3bb0b959f4cbfadc624b1d14f Mon Sep 17 00:00:00 2001 From: Gulfem Savrun Yeniceri Date: Thu, 14 Dec 2023 03:40:57 + Subject: [PATCH] [InstrProf] Single byte counters in coverage This

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Kees Cook via cfe-commits
kees wrote: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102317 https://github.com/llvm/llvm-project/pull/80089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -E -fsyntax-only -verify %s + +// expected-error@+2{{invalid character ')' character in raw string delimiter; use PREFIX( )PREFIX to delimit raw string}} jroelofs wrote: This has the old spelling of that diagnostic. Also,

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -222,4 +223,210 @@ bool isPtrConversion(const FunctionDecl *F) { return false; } +bool isSingleton(const FunctionDecl *F) { + assert(F); + // FIXME: check # of params == 1 + if (auto *MethodDecl = dyn_cast(F)) { +if (!MethodDecl->isStatic()) + return false; +

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-14 Thread via cfe-commits
https://github.com/gulfemsavrun edited https://github.com/llvm/llvm-project/pull/75425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/80504 >From e075dc3ac10c0cd2e12b223988ec4821b40b55d2 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Fri, 2 Feb 2024 14:46:59 -0800 Subject: [PATCH 1/4] [-Wunsafe-buffer-usage] Ignore safe array subscripts

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Artem Dergachev via cfe-commits
@@ -222,4 +223,210 @@ bool isPtrConversion(const FunctionDecl *F) { return false; } +bool isSingleton(const FunctionDecl *F) { + assert(F); + // FIXME: check # of params == 1 + if (auto *MethodDecl = dyn_cast(F)) { +if (!MethodDecl->isStatic()) + return false; +

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: LGTM! Just one nitpick. https://github.com/llvm/llvm-project/pull/81808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/81808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/80358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4cd7616 - [-Wunsafe-buffer-usage] Fixits for array args of func-ptr calls (#80358)

2024-02-14 Thread via cfe-commits
Author: jkorous-apple Date: 2024-02-14T17:19:39-08:00 New Revision: 4cd7616f6b13513bb13f2b6dd14d140a4c62c937 URL: https://github.com/llvm/llvm-project/commit/4cd7616f6b13513bb13f2b6dd14d140a4c62c937 DIFF: https://github.com/llvm/llvm-project/commit/4cd7616f6b13513bb13f2b6dd14d140a4c62c937.diff

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread via cfe-commits
jkorous-apple wrote: Currently we ignore calls on function pointers (unlike direct calls of functions and class methods). This patch adds support for function pointers as well. The change is to simply replace use of forEachArgumentWithParam matcher in UPC gadget with

[clang] [-Wunsafe-buffer-usage] Fixits for unsafe arguments of function pointer calls (PR #80358)

2024-02-14 Thread via cfe-commits
@@ -282,8 +282,8 @@ isInUnspecifiedPointerContext(internal::Matcher InnerMatcher) { //(i.e., computing the distance between two pointers); or ... auto CallArgMatcher = - callExpr(forEachArgumentWithParam(InnerMatcher, - hasPointerType() /* array

[clang] [compiler-rt] [Sanitizer] add signed-integer-wrap sanitizer (PR #80089)

2024-02-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: This is a UI discussion about how command line options should behave. Some folks prefer simpler rules while some prefer smart rules (guessing what the user intends). A [-fwrapv](https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fwrapv) user may either: * rely on

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808 >From 857decc27550e2b15938a7846a03561f9ad73f48 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 16:21:33 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial

[clang] bad error message on incorrect string literal #18079 (PR #81670)

2024-02-14 Thread via cfe-commits
https://github.com/akshaykumars614 updated https://github.com/llvm/llvm-project/pull/81670 >From c2f716ee5f787ec3df63511fd5f565a3deee4d6e Mon Sep 17 00:00:00 2001 From: akshaykumars614 Date: Tue, 13 Feb 2024 16:29:51 -0500 Subject: [PATCH 1/6] issue: #18079 (bad errwqor message on incorrect

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81808 >From 5a5b26fc3ed2c1c263cd3495b8844e2daeb2e54b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 14 Feb 2024 16:21:33 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial

[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: I wonder whether GCC considers using `-fno-asynchronous-unwind-tables` for all RISC-V configurations. https://github.com/llvm/llvm-project/pull/81727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/81701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/81701 >From 9d0da0010f145b23ce2b7e5b6183558609600789 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 13 Feb 2024 18:22:23 -0800 Subject: [PATCH 1/3] [clang][InstallAPI] Add input file support to library

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread via cfe-commits
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 fe20a759fcd20e1755ea1b34c5e6447a787925dc 26f7904095ddd54ab54a94b3ae84db61d2135833 --

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This PR introduces the concept of a "trivial function" which applies to a function that only calls other trivial functions and contain literals and expressions that don't result in heap mutations

[clang] [alpha.webkit.UncountedCallArgsChecker] Detect & ignore trivial function calls. (PR #81808)

2024-02-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81808 This PR introduces the concept of a "trivial function" which applies to a function that only calls other trivial functions and contain literals and expressions that don't result in heap mutations (specifically it

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Cyndy Ishida via cfe-commits
@@ -0,0 +1,53 @@ +//===- InstallAPI/FileList.h *- C++ -*-===// +// +// 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:

[clang] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2024-02-14 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2024-02-14 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Juergen Ributzka via cfe-commits
@@ -0,0 +1,53 @@ +//===- InstallAPI/FileList.h *- C++ -*-===// +// +// 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:

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Juergen Ributzka via cfe-commits
@@ -0,0 +1,53 @@ +//===- InstallAPI/FileList.h *- C++ -*-===// +// +// 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:

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/81701 >From 9d0da0010f145b23ce2b7e5b6183558609600789 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 13 Feb 2024 18:22:23 -0800 Subject: [PATCH 1/2] [clang][InstallAPI] Add input file support to library

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
@@ -406,6 +406,31 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { } return false; } + +AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { + const DeclRefExpr * BaseDRE = dyn_cast_or_null(Node.getBase()->IgnoreParenImpCasts()); + if (!BaseDRE) +

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
@@ -406,6 +406,31 @@ AST_MATCHER(CXXConstructExpr, isSafeSpanTwoParamConstruct) { } return false; } + +AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { + const DeclRefExpr * BaseDRE = dyn_cast_or_null(Node.getBase()->IgnoreParenImpCasts()); + if (!BaseDRE) +

[clang] [-Wunsafe-buffer-usage] Ignore constant safe indices in array subscripts (PR #80504)

2024-02-14 Thread via cfe-commits
@@ -598,16 +623,16 @@ class ArraySubscriptGadget : public WarningGadget { } static Matcher matcher() { -// FIXME: What if the index is integer literal 0? Should this be -// a safe gadget in this case? - // clang-format off +// clang-format off

[clang] [clang][InstallAPI] Add input file support to library (PR #81701)

2024-02-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/81701 >From 9d0da0010f145b23ce2b7e5b6183558609600789 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Tue, 13 Feb 2024 18:22:23 -0800 Subject: [PATCH] [clang][InstallAPI] Add input file support to library This

  1   2   3   4   >