[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: > > It looks like this is similar to `__builtin_constant_p` - what is the > > proposed behavior wrt. side effects in the evaluated expression? gcc and > > clang disagree about this a lot currently: https://godbolt.org/z/rbneznT9z > > It is intended to have no side-effects. I fo

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-22 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen edited https://github.com/llvm/llvm-project/pull/131041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (PR #132363)

2025-03-22 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/132363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread Kees Cook via cfe-commits
kees wrote: > It looks like this is similar to `__builtin_constant_p` - what is the > proposed behavior wrt. side effects in the evaluated expression? gcc and > clang disagree about this a lot currently: https://godbolt.org/z/rbneznT9z It is intended to have no side-effects. I followed the sam

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/8] [libclang/python] Add equality comparison operators fo

[clang] [clang] Use *Set::insert_range (NFC) (PR #132507)

2025-03-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/132507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer]: fix 'UninitializedObject false positive with unnamed fields' (PR #132457)

2025-03-22 Thread Balazs Benics via cfe-commits
steakhal wrote: Hey @YLChenZ. Please join the review of #132427. Your test case and review comments are more than welcomed! You probably have debugged the checker thus gained important insights that would be useful to challenge the existing proposal. https://github.com/llvm/llvm-project/pull/1

[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObject (PR #132427)

2025-03-22 Thread Balazs Benics via cfe-commits
steakhal wrote: @YLChenZ had a slightly different solution. I redirected him here to challenge your proposal. https://github.com/llvm/llvm-project/pull/132427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [clang][analyzer]: fix 'UninitializedObject false positive with unnamed fields' (PR #132457)

2025-03-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/132457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Ignore unnamed bitfields in UninitializedObjectChecker (PR #132427)

2025-03-22 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/132427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix false positives in `bugprone-crtp-constructor-accessibility` check (PR #132543)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes Fix false positives in `bugprone-crtp-constructor-accessibility` check on deleted constructors that cannot be used to construct objects, even if they have public or protected access. Closes h

[clang-tools-extra] [clang-tidy] Fix false positives in `bugprone-crtp-constructor-accessibility` check (PR #132543)

2025-03-22 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/132543 Fix false positives in `bugprone-crtp-constructor-accessibility` check on deleted constructors that cannot be used to construct objects, even if they have public or protected access. Closes https://github.com

[clang-tools-extra] [clang-tidy] Fix false positives in `bugprone-crtp-constructor-accessibility` check (PR #132543)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes Fix false positives in `bugprone-crtp-constructor-accessibility` check on deleted constructors that cannot be used to construct objects, even if they have public or protected access. Closes https://

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-22 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: As for investigation: I wrote four tests in `test_file.py` that just assert all files as equal (the ones named `test_file_eq_failing...`) which is expected to fail, and all four of these tests fail for me locally. But in the CI, it seems that indeed all in-memory files seem

[clang] [Clang][Sema] Retain the expanding index for unevaluated type constraints (PR #109518)

2025-03-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > @zyn0217 > > > > I am having second thoughts on both this PR and the follow up fix > https://github.com/llvm/llvm-project/commit/adb0d8ddceb143749c519d14b8b31b481071da77 > > > > We shouldn't be adding information that is required for correct substitution > into `SubstTem

[clang] [Clang][Sema] Retain the expanding index for unevaluated type constraints (PR #109518)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I have a patch, I'll post it soon! https://github.com/llvm/llvm-project/pull/109518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-22 Thread Daniel Chen via cfe-commits
@@ -223,6 +223,13 @@ endif() # This can be used to detect whether we're in the runtimes build. set(LLVM_RUNTIMES_BUILD ON) +if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + # Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't s

[clang] [clang][analyzer] Move 'alpha.core.FixedAddressDereference' out of alpha (PR #132404)

2025-03-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/132404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-22 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/132072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] link_bc target should depends on target builtins.link.clc-arch_suffix (PR #132338)

2025-03-22 Thread Wenju He via cfe-commits
@@ -313,8 +314,8 @@ function(add_libclc_builtin_set) INTERNALIZE TARGET ${builtins_link_lib_tgt} INPUTS $ -${ARG_INTERNAL_LINK_DEPENDENCIES} - DEPENDENCIES ${builtins_link_lib_tmp_tgt} +$ wenju-he wrote: thanks, changed t

[clang] [compiler-rt] [Clang][PGO] Fix profile function visibility bug (PR #127257)

2025-03-22 Thread David Tellenbach via cfe-commits
dtellenbach wrote: @EthanLuisMcDonough I think your patch effectively introduces a dependency on libc because `__llvm_write_custom_profile` has `__attribute__((uses))`` but calls e.g. `atoi` through `setupIOBuffer`. In compiler-rt it's not safe to make that assumption because it potentially b

[clang-tools-extra] 3fbc9b9 - [clang-doc] Correct improper file paths in HTML output (#132103)

2025-03-22 Thread via cfe-commits
Author: Paul Kirth Date: 2025-03-20T14:11:42-07:00 New Revision: 3fbc9b9efc669a236ab21ab06f854bd9ad751af3 URL: https://github.com/llvm/llvm-project/commit/3fbc9b9efc669a236ab21ab06f854bd9ad751af3 DIFF: https://github.com/llvm/llvm-project/commit/3fbc9b9efc669a236ab21ab06f854bd9ad751af3.diff LO

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-22 Thread Daniel Chen via cfe-commits
DanielCChen wrote: I will revert this commit first. https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/14962

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132232 >From 5008e3cff11bb019e22148926f0088fbb8fc530f Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 20 Mar 2025 11:00:05 -0400 Subject: [PATCH 1/4] [Docs] Document freestanding requirements This adds so

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-22 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > clang/lib/CodeGen/CGBuiltin.cpp is over 1MB long (>23k LoC), and can take > > minutes to recompile (depending on compiler and host system) when modified, > > and 5 seconds for clangd to update for every edit. Splitting this file was > > discussed in this thread: > > It loo

[clang] [libc] [clang] diagnose invalid member pointer class on instantiation (PR #132516)

2025-03-22 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Why was this landed w/o any approvals? https://github.com/llvm/llvm-project/pull/132516 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang,llvm` at step 8 "test-build-unified-tree-check-lld". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/22785 Here is th

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/8811 Here is th

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (PR #132184)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-ubuntu-fast` running on `as-builder-4` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/13572 Here is the relevant piec

[clang] b858ba0 - [RISCV] Fix capitalization of CHECK prefix in riscv-target-features.c. NFC

2025-03-22 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2025-03-21T09:24:11-07:00 New Revision: b858ba0f6597c66e5c276ca9e2564ca27e7e28e7 URL: https://github.com/llvm/llvm-project/commit/b858ba0f6597c66e5c276ca9e2564ca27e7e28e7 DIFF: https://github.com/llvm/llvm-project/commit/b858ba0f6597c66e5c276ca9e2564ca27e7e28e7.diff

[clang-tools-extra] [clang-tidy] 'modernize-use-starts-ends-with': fixed false positives on `find` and `rfind` (PR #129564)

2025-03-22 Thread Baranov Victor via cfe-commits
vbvictor wrote: Rebase and PR-checks are done, ready to merge https://github.com/llvm/llvm-project/pull/129564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-22 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/131237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] Revert "[clang] NFC: Clear some uses of MemberPointerType::getClass" (PR #132281)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/132281 Reverts llvm/llvm-project#131965 Reverted due to issue reported here: https://github.com/llvm/llvm-project/pull/131965#issuecomment-2741619498 >From 9d96ab9704ba87c81e71d7b26095b68b2ca8aa80 Mon Sep 17 00:00:0

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-22 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/130734 >From b9876822acdca4eaea6496a1d6471e2c0f4ad2e1 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 11 Mar 2025 16:20:08 +0800 Subject: [PATCH 1/9] [Clang][CodeGen] Do not set inbounds flag for struct GEP wi

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-ubuntu-fast` running on `as-builder-4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/13582 Here is th

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread A. Jiang via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s + frederick-vs-ja wrote: Would it make more sense to use `_Static_assert(__builtin_is_modifiable_lvalue(...), "")`? Also, I think it would be valuable to cover more types. N1570 6.3.2.1/1,

[clang] c51d396 - [clang][bytecode] Fix __builtin_memmove type diagnostics (#132544)

2025-03-22 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-22T14:58:32+01:00 New Revision: c51d396f4dec65bac24e00ace3f5ce5582d2c699 URL: https://github.com/llvm/llvm-project/commit/c51d396f4dec65bac24e00ace3f5ce5582d2c699 DIFF: https://github.com/llvm/llvm-project/commit/c51d396f4dec65bac24e00ace3f5ce5582d2c699.diff L

[clang] [clang][bytecode] Fix __builtin_memmove type diagnostics (PR #132544)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/132544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c5d4dfb - [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (#132369)

2025-03-22 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-22T23:04:46+08:00 New Revision: c5d4dfb291af1f9c099c25b78dd2ea0a6496a45f URL: https://github.com/llvm/llvm-project/commit/c5d4dfb291af1f9c099c25b78dd2ea0a6496a45f DIFF: https://github.com/llvm/llvm-project/commit/c5d4dfb291af1f9c099c25b78dd2ea0a6496a45f.diff

[clang] [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (PR #132369)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/132369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Add PreInc and PreDec ops for this purpose and ignore the overflow if UnaryOperator::canOverflow() returns false. --- Full diff: https://github.com/llvm/llvm-project/pull/132557.diff 4 Files Affected: - (

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-03-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/132372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/132557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Matheus Izvekov via cfe-commits
@@ -17,3 +16,134 @@ void k() { } } // namespace GH64347 + +namespace GH123591 { + + +template < typename... _Types > +struct variant { + template + variant(_Types...); +}; + +template +using AstNode = variant; + +AstNode tree(42, 43, 44); + +} + +namespace GH123591_2 { + +

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Matheus Izvekov via cfe-commits
@@ -17,3 +16,134 @@ void k() { } } // namespace GH64347 + +namespace GH123591 { + + +template < typename... _Types > +struct variant { + template + variant(_Types...); +}; + +template +using AstNode = variant; + +AstNode tree(42, 43, 44); + +} + +namespace GH123591_2 { + +

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Jessica Clarke via cfe-commits
https://github.com/jrtc27 edited https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Check PP presence when printing stats (PR #131608)

2025-03-22 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for the fix! Second, that we need a summary explaining the problem and solution. Is this linked to a bug report, if it is, then we should mention that bug report as well. I would also like to see a test showing a case where we successfully print

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Alexander Richardson via cfe-commits
arichardson wrote: Would be good to get a review from e.g. amdgpu folks since the non-zero globals AS would result in a functional change (assuming this intrinsic is supported there). https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits m

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -490,15 +490,17 @@ genReferencesBlock(const std::vector &References, } return Out; } - static std::unique_ptr -writeFileDefinition(const Location &L, -std::optional RepositoryUrl = std::nullopt) { - if (!L.IsFileInRootDir && !RepositoryUrl) +writeF

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - write

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -57,11 +58,13 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L, OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber) << "*"; } else { -OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.Line

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread via cfe-commits
@@ -12985,6 +12985,16 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, assert(Src.isInt()); return Success((Src.getInt() & (Alignment - 1)) == 0 ? 1 : 0, E); } + case Builtin::BI__builtin_is_modifiable_lvalue: { +const Expr *Arg = E->getArg(0);

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
@@ -490,15 +490,17 @@ genReferencesBlock(const std::vector &References, } return Out; } - static std::unique_ptr -writeFileDefinition(const Location &L, -std::optional RepositoryUrl = std::nullopt) { - if (!L.IsFileInRootDir && !RepositoryUrl) +writeF

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
@@ -57,11 +58,13 @@ static void writeFileDefinition(const ClangDocContext &CDCtx, const Location &L, OS << "*Defined at " << L.Filename << "#" << std::to_string(L.LineNumber) << "*"; } else { -OS << "*Defined at [" << L.Filename << "#" << std::to_string(L.Line

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - write

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/132285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
https://github.com/Sirraide commented: Fix overall looks fine. https://github.com/llvm/llvm-project/pull/132285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix static_cast bypassing access control (PR #132285)

2025-03-22 Thread via cfe-commits
@@ -23,3 +22,67 @@ void test(A &a, B &b) { const A &&ar10 = static_cast(xvalue()); const A &&ar11 = static_cast(xvalue()); } + +struct C : private A { // expected-note 4 {{declared private here}} +C&& that(); + +void f() { +(void)static_cast(*this); +

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv edited https://github.com/llvm/llvm-project/pull/131280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -276,6 +286,62 @@ // HTML-CIRCLE: return // HTML-CIRCLE: double The perimeter of the circle. +// HTML-SHAPE-PREFIX: class Shape +// HTML-SHAPE-PREFIX-NEXT: +// HTML-SHAPE-PREFIX-NEXT: Defined at line +// HTML-SHAPE-PREFIX-NEXT: https://repository.com/./incl

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -383,4 +449,4 @@ // MD-ALL-FILES: ## [GlobalNamespace](GlobalNamespace{{[\/]}}index.md) // MD-INDEX: # C/C++ Reference -// MD-INDEX: * Namespace: [GlobalNamespace](GlobalNamespace) +// MD-INDEX: * Namespace: [GlobalNamespace](GlobalNamespace) ilovepi wrote

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. 'Thraed' typo in the commit message but otherwise LGTM. But someone else should also approve this. https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcisync (Sync Delay) extension (PR #132184)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve2-vla` running on `linaro-g4-02` while building `clang,llvm` at step 6 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/198/builds/3067 Here is the relevant piece of t

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-03-22 Thread via cfe-commits
ZhongUncle wrote: @ilovepi I am not familiar with PR, so accidentally closed the previous PR. This is a new one. Sorry for that. https://github.com/llvm/llvm-project/pull/132510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread Timm Baeder via cfe-commits
tbaederr wrote: > > It looks like this is similar to `__builtin_constant_p` - what is the > > proposed behavior wrt. side effects in the evaluated expression? gcc and > > clang disagree about this a lot currently: https://godbolt.org/z/rbneznT9z > > IIUC this intrinsic shouldn't be similar to

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-22 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/130383 >From e8bf3b6f08f0e0030ea36fe8c42fcde166ad27e3 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Thu, 19 Dec 2024 16:22:04 +0100 Subject: [PATCH 1/7] [libclang/python] Add equality comparison operators fo

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-22 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 a27da0a20cbfb9f0c600d53bf2520f068b222f59 262f6602c76de472ddcacfe1d13069f777aaec73 --e

[clang] [llvm] dot2add working for dxil without sema check (PR #131237)

2025-03-22 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays updated https://github.com/llvm/llvm-project/pull/131237 >From 6d5c4053c90975d64e378e52779dab9c3ffb64cd Mon Sep 17 00:00:00 2001 From: Sumit Agarwal Date: Thu, 13 Mar 2025 16:02:32 -0700 Subject: [PATCH 1/4] dot2add working for dxil without sema check --- clang/in

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread Younan Zhang via cfe-commits
zyn0217 wrote: I'll merge without a release note, instead I plan to backport it to the 20 release along with a changelog. https://github.com/llvm/llvm-project/pull/132061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang] Use *Set::insert_range (NFC) (PR #132507)

2025-03-22 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/132507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Use MarkUsedTemplateParameters in building alias CTAD guides (PR #132369)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. Nice cleanup, LGTM https://github.com/llvm/llvm-project/pull/132369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
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/13778 Here is the relevant piece o

[clang] [clang] fix RecursiveASTVisitor traversal from type to decl (PR #132551)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/132551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Ignore overflow in unary operators if requested (PR #132557)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132557 Add PreInc and PreDec ops for this purpose and ignore the overflow if UnaryOperator::canOverflow() returns false. >From 06a6ab84ce28373731bd3750b876f951f849b129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread Baranov Victor via cfe-commits
@@ -159,8 +159,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static``` values on member initialization and by detecting - explicit casting of built-in types within member list initialization. +

[clang] db7475a - [clang][bytecode] Ignore overflow in unary operators if requested (#132557)

2025-03-22 Thread via cfe-commits
Author: Timm Baeder Date: 2025-03-22T18:03:50+01:00 New Revision: db7475a770c360a42560aa01859d5dcbb808ade8 URL: https://github.com/llvm/llvm-project/commit/db7475a770c360a42560aa01859d5dcbb808ade8 DIFF: https://github.com/llvm/llvm-project/commit/db7475a770c360a42560aa01859d5dcbb808ade8.diff L

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

2025-03-22 Thread via cfe-commits
https://github.com/CarolineConcatto commented: Hi Marian, I am seeing some errors by the CI, but it goes away If I re-run update_cc_tests it fixes it. But like the other files it also adds some extra check lines. https://github.com/llvm/llvm-project/pull/127043 _

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s + Sirraide wrote: > Edit: Perhaps it's wanted to make this intrinsic accept VLA (and report > `false`) and variably-modified types without evaluating the non-constant > array size. That sho

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm < %s| FileCheck %s + +void report(int value); Sirraide wrote: Yeah, all of these should just be sema tests using `static_assert`; maybe 1 or 2 codegen tests just to make sure we can emit

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

2025-03-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/132550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread Baranov Victor via cfe-commits
@@ -159,8 +159,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static``` values on member initialization and by detecting - explicit casting of built-in types within member list initialization. +

[clang] [clang][bytecode][NFC] Use getElemType() in __builtin_memchr as well (PR #132550)

2025-03-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/14750 Here is the relevant piece of the

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/132555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/132555 See https://github.com/llvm/llvm-project/pull/132061?notification_referrer_id=NT_kwDOBv04MLUxNTM5NjQwOTM5MToxMTcyNTgyODg#issuecomment-2745313527 >From e74045c3cb0264d434411b7a9046637e1d9984ae Mon Sep 17 00:00:0

[clang] 868c89f - [Clang] Fix a bot failure after 032ad590 (#132555)

2025-03-22 Thread via cfe-commits
Author: Younan Zhang Date: 2025-03-22T23:58:15+08:00 New Revision: 868c89ff0e0ef09ac504873cb9bab8197f5fca2d URL: https://github.com/llvm/llvm-project/commit/868c89ff0e0ef09ac504873cb9bab8197f5fca2d DIFF: https://github.com/llvm/llvm-project/commit/868c89ff0e0ef09ac504873cb9bab8197f5fca2d.diff

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/132555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a bot failure after 032ad590 (PR #132555)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes See https://github.com/llvm/llvm-project/pull/132061?notification_referrer_id=NT_kwDOBv04MLUxNTM5NjQwOTM5MToxMTcyNTgyODg#issuecomment-2745313527 --- Full diff: https://github.com/llvm/llvm-project/pull/13255

[clang] [NFC][Static Analyzer] Rename and discuss about `NotNullConstraint` & `NotNullBufferConstraint` (PR #131374)

2025-03-22 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/131374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Added Conflicting Global Accesses checker (PR #130421)

2025-03-22 Thread via cfe-commits
https://github.com/ConcreteCactus updated https://github.com/llvm/llvm-project/pull/130421 >From 41c7e3093e9943383d25d7c8d0c31b5ab2edd18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ron=20H=C3=A1rn=C3=A1si?= Date: Fri, 22 Nov 2024 21:43:04 +0100 Subject: [PATCH] [clang-tidy] Added Conflictin

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-22 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I posted an alternative fix for this here: https://github.com/llvm/llvm-project/pull/132559 https://github.com/llvm/llvm-project/pull/131649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Jessica Clarke via cfe-commits
jrtc27 wrote: As far as I know GPUs don't do TLS... https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From c81ff04def9d2198c84b96fb5cfa1de90ca57a11 Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/129370 >From 4e5e44c721e1867b9263d0a0ea4669d0bd3bdd4a Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sat, 1 Mar 2025 02:09:02 -0500 Subject: [PATCH] [clang-tidy] detect arithmetic operations within member list in

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
@@ -159,8 +159,8 @@ Changes in existing checks - Improved :doc:`modernize-use-default-member-init ` check by matching - ``constexpr`` and ``static``` values on member initialization and by detecting - explicit casting of built-in types within member list initialization. +

[clang-tools-extra] [clang-tidy] detect arithmetic operations within member list initialization in modernize-use-default-member-init check (PR #129370)

2025-03-22 Thread David Rivera via cfe-commits
RiverDave wrote: @HerrCai0907 could we merge this? https://github.com/llvm/llvm-project/pull/129370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/132559 >From 27cf231f8497cc483c44d5e5ada05af9ae48e6ab Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sat, 22 Mar 2025 14:39:10 -0300 Subject: [PATCH] [clang] ASTContex: fix getCommonSugaredType for array types

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This corrects the behaviour for getCommonSugaredType with regards to array top level qualifiers: remove differing top level qualifiers, as they must be redundant with element qualifiers. Fixes https://g

[clang] [clang] ASTContex: fix getCommonSugaredType for array types (PR #132559)

2025-03-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/132559 This corrects the behaviour for getCommonSugaredType with regards to array top level qualifiers: remove differing top level qualifiers, as they must be redundant with element qualifiers. Fixes https://github.

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-22 Thread Paul Kirth via cfe-commits
@@ -749,13 +752,8 @@ genHTML(const EnumInfo &I, const ClangDocContext &CDCtx) { Out.emplace_back(std::move(Table)); - if (I.DefLoc) { -if (!CDCtx.RepositoryUrl) - Out.emplace_back(writeFileDefinition(*I.DefLoc)); -else - Out.emplace_back( - write

  1   2   >