[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,64 @@ +//== APSIntPtr.h - Wrapper for APSInt objects owned separately -*- 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: Apach

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -165,79 +166,70 @@ class BasicValueFactory { /// Convert - Create a new persistent APSInt with the same value as 'From' /// but with the bitwidth and signedness of 'To'. - const llvm::APSInt &Convert(const llvm::APSInt& To, - const llvm::A

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Recognize adoptRef as a safe function (PR #119846)

2024-12-19 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/119846 >From 6b4a6b832f61efc26396f60309744c2e7264156d Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 13 Dec 2024 01:49:21 -0800 Subject: [PATCH 1/4] [WebKit checkers] Recognize adoptRef as a safe function adoptR

[clang] Patch series to reapply #119638 and substantially improve it (PR #120534)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc @llvm/pr-subscribers-backend-arm Author: Chandler Carruth (chandlerc) Changes This PR is for a patch series of 5 patches to try and fully address the Clang builtin string tables. I'm posting it as a single PR to give context to the series

[clang] Patch series to reapply #119638 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
chandlerc wrote: @dyung - I believe this PR may be a credible path to address the issues hit with your MSVC builders, would appreciate any help testing it in advance if possible. https://github.com/llvm/llvm-project/pull/120534 ___ cfe-commits mailin

[clang] Add configuration option PenaltyBreakBeforeMemberAccess (PR #118409)

2024-12-19 Thread Owen Pan via cfe-commits
https://github.com/owenca commented: Please rebase and run `ninja clang-format-style`. https://github.com/llvm/llvm-project/pull/118409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-19 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { HazardyKnusperkeks wrote: One additional test: How about nested templates? `template typename T>` for exampl

[clang] Patch series to reapply #119638 and substantially improve it (PR #120534)

2024-12-19 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 5c5a769cc0ccc6634a09273289e6d79da109c842 fd353de6d0cbb57a919eb44b6fbcb0784fa61ae4 --e

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc edited https://github.com/llvm/llvm-project/pull/120534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc edited https://github.com/llvm/llvm-project/pull/120534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 commented: clang-tidy part is fine for me. If it's only a refactor for clang-tidy, you could remove the `[clang-tidy]` in title. https://github.com/llvm/llvm-project/pull/118569 ___ cfe-commits mailing list cfe-commits@l

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread via cfe-commits
dyung wrote: > @dyung - I believe this PR may be a credible path to address the issues hit > with your MSVC builders, would appreciate any help testing it in advance if > possible. Sure, I'll give it a try https://github.com/llvm/llvm-project/pull/120534 __

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: #120370 was reverted, because libc++ tests expose major problem: Tests and likely many users can have `-nostdlib++ -lc++`. The if we remove c++ sanitizer runtimes from linking it will break them and force to add `-fsanitize-link-c++-runtime` I will reland unrelated parts of #1

[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)

2024-12-19 Thread Björn Schäpers via cfe-commits
@@ -11077,6 +11077,221 @@ TEST_F(FormatTest, WrapsTemplateDeclarationsWithComments) { Style); } +TEST_F(FormatTest, BreakBeforeTemplateClose) { + FormatStyle Style = getGoogleStyle(FormatStyle::LK_Cpp); + Style.ColumnLimit = 0; + verifyNoChange("template \n" +

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread via cfe-commits
dyung wrote: > > @dyung - I believe this PR may be a credible path to address the issues hit > > with your MSVC builders, would appreciate any help testing it in advance if > > possible. > > Sure, I'll give it a try You seem to still be working on it, can you tell me which commit I should try

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
chandlerc wrote: > > > @dyung - I believe this PR may be a credible path to address the issues > > > hit with your MSVC builders, would appreciate any help testing it in > > > advance if possible. > > > > > > Sure, I'll give it a try > > You seem to still be working on it, can you tell me wh

[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

2024-12-19 Thread Stephen Senran Zhang via cfe-commits
@@ -1520,15 +1520,102 @@ ConstantRange ConstantRange::binaryNot() const { return ConstantRange(APInt::getAllOnes(getBitWidth())).sub(*this); } +/// Estimate the 'bit-masked AND' operation's lower bound. +/// +/// E.g., given two ranges as follows (single quotes are separator

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-19 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > #120370 was reverted, because libc++ tests expose major problem: > Tests and likely many users can have `-nostdlib++ -lc++`. > The if we remove c++ sanitizer runtimes from linking it will break them and > force to add `-fsanitize-link-c++-runtime` That's indeed a problem... Ho

[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

2024-12-19 Thread Stephen Senran Zhang via cfe-commits
@@ -1520,15 +1520,102 @@ ConstantRange ConstantRange::binaryNot() const { return ConstantRange(APInt::getAllOnes(getBitWidth())).sub(*this); } +/// Estimate the 'bit-masked AND' operation's lower bound. +/// +/// E.g., given two ranges as follows (single quotes are separator

[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

2024-12-19 Thread Stephen Senran Zhang via cfe-commits
@@ -1520,15 +1520,102 @@ ConstantRange ConstantRange::binaryNot() const { return ConstantRange(APInt::getAllOnes(getBitWidth())).sub(*this); } +/// Estimate the 'bit-masked AND' operation's lower bound. +/// +/// E.g., given two ranges as follows (single quotes are separator

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread via cfe-commits
dyung wrote: > > > > @dyung - I believe this PR may be a credible path to address the issues > > > > hit with your MSVC builders, would appreciate any help testing it in > > > > advance if possible. > > > > > > > > > Sure, I'll give it a try > > > > > > You seem to still be working on it, c

[clang] [webkit.UncountedLambdaCapturesChecker] Detect protectedThis pattern. (PR #120528)

2024-12-19 Thread Rashmi Mudduluru via cfe-commits
@@ -207,6 +207,58 @@ struct RefCountableWithLambdaCapturingThis { }; call(lambda); } + + void method_captures_this_unsafe_capture_local_var_explicitly() { +RefCountable* x = make_obj(); +call([this, protectedThis = RefPtr { this }, x]() { + // expected-w

[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

2024-12-19 Thread Stephen Senran Zhang via cfe-commits
@@ -1520,15 +1520,102 @@ ConstantRange ConstantRange::binaryNot() const { return ConstantRange(APInt::getAllOnes(getBitWidth())).sub(*this); } +/// Estimate the 'bit-masked AND' operation's lower bound. +/// +/// E.g., given two ranges as follows (single quotes are separator

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > #120370 was reverted, because libc++ tests expose major problem: > > Tests and likely many users can have `-nostdlib++ -lc++`. > > The if we remove c++ sanitizer runtimes from linking it will break them and > > force to add `-fsanitize-link-c++-runtime` > > That's indeed a

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
chandlerc wrote: > I'll try it and let you know. Give me about an hour or so. Awesome! But no huge rush, mostly just hoping this happens to dodge whatever has been tripping up things here. https://github.com/llvm/llvm-project/pull/120534 ___ cfe-comm

[clang] [llvm] [ConstantRange] Estimate tighter lower (upper) bounds for masked binary and (or) (PR #120352)

2024-12-19 Thread Stephen Senran Zhang via cfe-commits
https://github.com/zsrkmyn edited https://github.com/llvm/llvm-project/pull/120352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [driver] Fix sanitizer libc++ runtime linking (PR #120370)

2024-12-19 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This was reverted, because https://github.com/llvm/llvm-project/blob/main/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp in libc++ started passing unexpectedly. I'm not entirely sure about why that is though - previously, it used to fail like this

[libcxx] [libcxxabi] [libunwind] [llvm] [runtimes] Probe for -nostdlib++ and -nostdinc++ with the C compiler (PR #108357)

2024-12-19 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > > #120370 was reverted, because libc++ tests expose major problem: > > > Tests and likely many users can have `-nostdlib++ -lc++`. > > > The if we remove c++ sanitizer runtimes from linking it will break them > > > and force to add `-fsanitize-link-c++-runtime` > > > > > >

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-19 Thread Louis Dionne via cfe-commits
@@ -1,13 +1,6 @@ -// RUN: %clang -cc1 -fcuda-is-device -isysroot /var/empty \ -// RUN: -triple nvptx-nvidia-cuda -aux-triple i386-apple-macosx \ -// RUN: -E -fcuda-is-device -v -o /dev/null -x cuda %s 2>&1 | FileCheck %s - -// RUN: %clang -cc1 -isysroot /var/empty \ -// RUN:

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-19 Thread via cfe-commits
@@ -319,10 +319,9 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - con

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Thurston Dang via cfe-commits
thurstond wrote: I've reverted it in https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1 to clear up some buildbots https://github.com/llvm/llvm-project/pull/116462 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] 2b9abf0 - Revert "[analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (#116462)"

2024-12-19 Thread Thurston Dang via cfe-commits
Author: Thurston Dang Date: 2024-12-19T17:02:16Z New Revision: 2b9abf0db2d106c7208b4372e662ef5df869e6f1 URL: https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1 DIFF: https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1.diff LOG:

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Balazs Benics via cfe-commits
steakhal wrote: > I've reverted it in > https://github.com/llvm/llvm-project/commit/2b9abf0db2d106c7208b4372e662ef5df869e6f1 > to clear up some buildbots Thanks! Ill have a look later. https://github.com/llvm/llvm-project/pull/116462 ___ cfe-commits

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
chandlerc wrote: > > > I'll try it and let you know. Give me about an hour or so. > > > > Awesome! But no huge rush, mostly just hoping this happens to dodge > > whatever has been tripping up things here. > > Sorry for the delay, but the failures still seem to be present. :( (The tests > are

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread Chandler Carruth via cfe-commits
chandlerc wrote: > Overall, I'm positive on this, and think this is beneficial. If this is > something we can get to settle (I recognize this is probably what you were > talking about with the RFC to increase the 'required MSVC version'), I'm all > for it. Yeah, this was the motivation. Th

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-19 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/120087 >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.noreply.github.com> Date: Mon, 16 Dec 2024 19:43:42 +0530 Subject: [PATCH 01/25] Up

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/119820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-19 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,26 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-19 Thread Chris B via cfe-commits
llvm-beanz wrote: Quick sanity check question for @bogner: In DXC we apply the `fast` flag, which in LLVM 3.7 implies: `nnan ninf nsz arcp` and includes the modern interpretation of `reassoc` With this change we are applying: `reassoc nnan ninf nsz arcp afn` (no `fast` because its meaning is

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-19 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/120149 >From e578bd75d82a5ff16168222e4f30c32f9aa5e6bd Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 16 Dec 2024 13:28:38 -0500 Subject: [PATCH 1/3] [clang][Darwin] Remove legacy framework search path logic in

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-19 Thread Louis Dionne via cfe-commits
@@ -2539,6 +2550,18 @@ void DarwinClang::AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs llvm::sys::path::append(P, "usr", "include"); addExternCSystemInclude(DriverArgs, CC1Args, P.str()); } + + // Add default framework search paths + auto addFramew

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-12-19 Thread Slava Zakharin via cfe-commits
vzakhari wrote: Thank you for the pointers and the information, Tom! It looks like exchange2 is pretty much the same problem as with bwaves. I posted a note into https://github.com/llvm/llvm-project/issues/117318 https://github.com/llvm/llvm-project/pull/110063 __

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Ronan Keryell via cfe-commits
keryell wrote: @dkolsen-pgi Great PR! Since it touches functions returning `!void` or `!cir.void`, I made some changes recently with https://github.com/llvm/clangir/commit/568b51537e573c7a8fb616cda5cdd0aa54bc0832 to avoid disrupting some MLIR invariants. Are you up-streaming the changes in c

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-12-19 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/9] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] Patch series to reapply #118734 and substantially improve it (PR #120534)

2024-12-19 Thread via cfe-commits
dyung wrote: > > I'll try it and let you know. Give me about an hour or so. > > Awesome! But no huge rush, mostly just hoping this happens to dodge whatever > has been tripping up things here. Sorry for the delay, but the failures still seem to be present. :( (The tests are still running, but

[clang] [FMV][AArch64] Emit mangled default version if explicitly specified. (PR #120022)

2024-12-19 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/120022 >From f3997c43e57265444bade9372833a9235e3426cb Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Fri, 13 Dec 2024 12:42:31 + Subject: [PATCH 1/2] [FMV][AArch64] Emit mangled default version if expl

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120547 Fixes: #103499 >From 2927ef2ccd286e1efeb12ef12eb5f0fd2dcf2454 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Dec 2024 15:23:02 +0800 Subject: [PATCH] [clang-tidy] support parameters file in comm

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes Fixes: #103499 --- Full diff: https://github.com/llvm/llvm-project/pull/120547.diff 4 Files Affected: - (modified) clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp (+16) - (modified) clang-to

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto approved this pull request. https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix dangling false positives for conditional operators. (PR #120233)

2024-12-19 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/120233 >From 1bd4bf164082d236d17ada8240d7ba096a94609d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 17 Dec 2024 14:28:00 +0100 Subject: [PATCH] [clang] Fix dangling false positives for conditional operators. --

[clang-tools-extra] [clang-tidy] support parameters file in command line (PR #120547)

2024-12-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/120547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread David Olsen via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/120590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Hi and thanks for the PR! To keep our history readable, please this up into smaller more focused PRs with an appropriate title ("Add a few things" won't be accepted ;)). This could be split into e.g. additions to the `File` interface, additions to the

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -2631,55 +2643,65 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( } case ToolChain::CST_Libstdcxx: -llvm::SmallString<128> UsrIncludeCxx = Sysroot; -llvm::sys::path::append(UsrIncludeCxx, "usr", "include", "c++"); - -llvm::Triple::ArchType arch = getTripl

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2024-12-19 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 6f8afafd308d37d9abc4af0801dd5a4451c13718...1c68440616b555c376a3c227338f23ca80a2c777 clang

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [CIR] floating-point, pointer, and function types (PR #120484)

2024-12-19 Thread Erich Keane via cfe-commits
@@ -18,6 +21,87 @@ mlir::MLIRContext &CIRGenTypes::getMLIRContext() const { return *builder.getContext(); } +/// Return true if the specified type in a function parameter or result position +/// can be converted to a CIR type at this point. This boils down to being +/// whe

[clang] [Clang][AArch64] Add signed index/offset variants of sve2p1 qword stores (PR #120549)

2024-12-19 Thread via cfe-commits
https://github.com/SpencerAbson created https://github.com/llvm/llvm-project/pull/120549 This patch adds signed offset/index variants to the SVE2p1 quadword store intrinsics, in accordance with https://github.com/ARM-software/acle/pull/359. >From f1969c173dcefd23a2384f4e6d63f7f7804c1c45 Mon Se

[clang] [Clang][AArch64] Add signed index/offset variants of sve2p1 qword stores (PR #120549)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SpencerAbson) Changes This patch adds signed offset/index variants to the SVE2p1 quadword store intrinsics, in accordance with https://github.com/ARM-software/acle/pull/359. --- Patch is 35.89 KiB, truncated to 20.00 KiB below, ful

[clang] b41240b - [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (#120435)

2024-12-19 Thread via cfe-commits
Author: Balazs Benics Date: 2024-12-19T12:04:04+01:00 New Revision: b41240be6b9e58687011b2bd1b942c6625cbb5ad URL: https://github.com/llvm/llvm-project/commit/b41240be6b9e58687011b2bd1b942c6625cbb5ad DIFF: https://github.com/llvm/llvm-project/commit/b41240be6b9e58687011b2bd1b942c6625cbb5ad.diff

[clang] [analyzer][NFC] Introduce APSIntPtr, a safe wrapper of APSInt (1/4) (PR #120435)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/120435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Migrate nonloc::ConcreteInt to use APSIntPtr (2/4) (PR #120436)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/120436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Migrate nonloc::ConcreteInt to use APSIntPtr (2/4) (PR #120436)

2024-12-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/120436 >From 75579cb057f440a70352b6ed6cc99529cbb933e7 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Wed, 18 Dec 2024 15:55:27 +0100 Subject: [PATCH] [analyzer][NFC] Migrate nonloc::ConcreteInt to use APSIntPtr (

[clang] [Clang][AArch64] Remove const from base pointers in sve2p1 stores (PR #120551)

2024-12-19 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov approved this pull request. https://github.com/llvm/llvm-project/pull/120551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add signed index/offset variants of sve2p1 qword stores (PR #120549)

2024-12-19 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov approved this pull request. https://github.com/llvm/llvm-project/pull/120549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Sync ContainerSizeEmptyCheck with container-size-empty doc (PR #118459)

2024-12-19 Thread Niels Dekker via cfe-commits
N-Dekker wrote: @HerrCai0907 Thanks again for your approval, _and_ for merging my very first LLVM PR (#117629). Can you please 🙏 merge this one as well? https://github.com/llvm/llvm-project/pull/118459 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang-tools-extra] [clangd] Allow specifying what headers are always included via "" or <> (PR #67749)

2024-12-19 Thread Travis Downs via cfe-commits
travisdowns wrote: @kleinesfilmroellchen or @ADKaster it's been quiet for a while, do you think there's any hope for this one still, or is this PR abandoned? Great work to date, BTW, this would be a big win for a project I work on as well (which unconditionally uses <> for internal headers).

[clang] [compiler-rt] Move interceptors for libresolv functions to MSan (PR #119071)

2024-12-19 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: That configuration output is from `compiler-rt`, but we need it in `llvm`. In `llvm/lib/ExecutionEngine/Orc/CMakeLists.txt`: ```cmake if( CMAKE_HOST_UNIX AND HAVE_LIBRT ) set(rt_lib rt) endif() ``` We have `CMAKE_HOST_UNIX` = 1, but `HAVE_LIBRT` is empty. It comes from `ch

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + jroelofs wrote: As written, this requires an `aarch64-registered-target`. I think you can avoid that though by turning these

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [llvm] [InstCombine] Infer nuw for gep inbounds from base of object (PR #119225)

2024-12-19 Thread Nikita Popov via cfe-commits
nikic wrote: @fmayer The `withoutNoUnsignedSignedWrap()` API already removed the inbounds flag as well (because inbounds requires nusw). So I think the effect of your change is to drop inbounds in case all indices are negative, which should generally not be necessary. It's pretty likely that

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2024-12-19 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2024-12-19 Thread Mathias Stearn via cfe-commits
https://github.com/RedBeard0531 created https://github.com/llvm/llvm-project/pull/120590 I modified a local copy of cindex.py to add these when working on something and wanted to upstream the improvements. >From 1c68440616b555c376a3c227338f23ca80a2c777 Mon Sep 17 00:00:00 2001 From: Mathias St

[clang] [libclang/python] Add a few things to the python api (PR #120590)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mathias Stearn (RedBeard0531) Changes I modified a local copy of cindex.py to add these when working on something and wanted to upstream the improvements. --- Full diff: https://github.com/llvm/llvm-project/pull/120590.diff 1 Files Affe

[clang] [Clang][Sema] Process warnings conditionally (PR #120591)

2024-12-19 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh created https://github.com/llvm/llvm-project/pull/120591 There are a few functions that emit warnings related to positional arguments in format strings. These functions use `getLocationOfByte()` which has O(n) complexity and may lead to silent hang of compilation i

[clang] [Clang][Sema] Process warnings conditionally (PR #120591)

2024-12-19 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh edited https://github.com/llvm/llvm-project/pull/120591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1f2d934 - [clang][bytecode] Support pointers in __builtin_mem{move,cpy} (#120560)

2024-12-19 Thread via cfe-commits
Author: Timm Baeder Date: 2024-12-19T16:38:58+01:00 New Revision: 1f2d934525833c4aae5f0436fd99551c776fd246 URL: https://github.com/llvm/llvm-project/commit/1f2d934525833c4aae5f0436fd99551c776fd246 DIFF: https://github.com/llvm/llvm-project/commit/1f2d934525833c4aae5f0436fd99551c776fd246.diff L

[clang] [clang][bytecode] Support pointers in __builtin_mem{move, cpy} (PR #120560)

2024-12-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/120560 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Process warnings conditionally (PR #120591)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dmitry Chestnykh (chestnykh) Changes There are a few functions that emit warnings related to positional arguments in format strings. These functions use `getLocationOfByte()` which has O(n) complexity and may lead to silent hang of compil

[clang] [Clang][Sema] Process warnings conditionally (PR #120591)

2024-12-19 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 6f8afafd308d37d9abc4af0801dd5a4451c13718 5b61245bbdc9d1874684f29bba880f6b5a4cfe82 --e

[clang] [libclang/python] Add python binding for clang_Cursor_isAnonymousRecordDecl (PR #120483)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum approved this pull request. https://github.com/llvm/llvm-project/pull/120483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Process warnings conditionally (PR #120591)

2024-12-19 Thread Dmitry Chestnykh via cfe-commits
https://github.com/chestnykh updated https://github.com/llvm/llvm-project/pull/120591 >From 5b61245bbdc9d1874684f29bba880f6b5a4cfe82 Mon Sep 17 00:00:00 2001 From: Dmitry Chestnykh Date: Thu, 19 Dec 2024 18:35:35 +0300 Subject: [PATCH 1/2] [Clang][Sema] Process warnings conditionally There are

[clang-tools-extra] Added options to readability-implicit-bool-conversion (PR #120087)

2024-12-19 Thread via cfe-commits
@@ -319,10 +319,9 @@ Changes in existing checks diagnostic. - Improved :doc:`readability-implicit-bool-conversion - ` check - by adding the option `UseUpperCaseLiteralSuffix` to select the - case of the literal suffix in fixes and fixing false positive for implicit - con

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -981,3 +983,13 @@ def test_from_result_null(self): def test_from_cursor_result_null(self): tu = get_tu("") self.assertEqual(tu.cursor.semantic_parent, None) + +def test_pretty_print(self): +tu = get_tu("struct X { int x; }; void f(bool x) { }"

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: Thanks for the PR! Two minor comments and formatting, otherwise LGTM! https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/120494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add python bindings for PrintingPolicy (PR #120494)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -3685,6 +3695,71 @@ def write_main_file_to_stdout(self): conf.lib.clang_CXRewriter_writeMainFileToStdOut(self) +class PrintingPolicyProperty(BaseEnumeration): + +""" +A PrintingPolicyProperty identifies a property of a PrintingPolicy. +""" +Indentat

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-12-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I made the followup for this one in #120572 Please severt and reland with followup. Followup is good way to go for trivial cases which can be landed with quick or no review https://github.com/llvm/llvm-project/pull/116462 ___ cfe-

[clang] [clang analyzer]consume `llvm::Error` (PR #120597)

2024-12-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/120597 `llvm::Error` must be consumed, otherwise it will cause trap during destructor >From de02085e535f21c74e8a7efb26272590398b Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 20 Dec 2024 00:10:03 +08

[clang] [clang analyzer]consume `llvm::Error` (PR #120597)

2024-12-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes `llvm::Error` must be consumed, otherwise it will cause trap during destructor --- Full diff: https://github.com/llvm/llvm-project/pull/120597.diff 1 Files Affected: - (modified) clang/lib/StaticAnaly

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum commented: I'm only familiar with the Python-side of the bindings, so only reviewed those. Minor comments, otherwise LGTM! https://github.com/llvm/llvm-project/pull/120300 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -437,6 +437,8 @@ LLVM_19 { LLVM_20 { global: clang_isBeforeInTranslationUnit; +clang_getOffsetOfBase; +clang_visitCXXBaseClasses; DeinAlptraum wrote: Not sure if this actually matters, but since all the other entries follow an alphabetic orde

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -1,4 +1,5 @@ import os +import clang.cindex DeinAlptraum wrote: This import seems to be unused https://github.com/llvm/llvm-project/pull/120300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum edited https://github.com/llvm/llvm-project/pull/120300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -2663,6 +2671,21 @@ def visitor(field, children): conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor), fields) return iter(fields) +def get_bases(self): +"""Return an iterator for accessing the base classes of this type.""" + +

[clang] [libclang] Add API to query more information about base classes. (PR #120300)

2024-12-19 Thread Jannick Kremer via cfe-commits
@@ -2663,6 +2671,21 @@ def visitor(field, children): conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor), fields) return iter(fields) +def get_bases(self): +"""Return an iterator for accessing the base classes of this type.""" + +

[clang] [HLSL] Make fast math the default for HLSL (PR #119820)

2024-12-19 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/119820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >