[clang] [clang-tools-extra] `Clang`: `*noreturn` propagation in `CFG` (PR #146355)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/146355 >From fc3b77d8c4b5dd264bd746ed997bcea6cddaf389 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 30 Jun 2025 17:05:41 +0300 Subject: [PATCH 1/2] Initial implementation --- .../bugprone/unchecked-optional

[libclc] [libclc] Reduce include usage in OpenCL builtins (PR #146840)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/146840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-07-07 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 7cd1796 - [libclc] Fix typo in OpenCL header math/sincos.h (#147244)

2025-07-07 Thread via cfe-commits
Author: Wenju He Date: 2025-07-07T17:30:40+08:00 New Revision: 7cd179612d7af420f0025e754d0051a95ac1fd11 URL: https://github.com/llvm/llvm-project/commit/7cd179612d7af420f0025e754d0051a95ac1fd11 DIFF: https://github.com/llvm/llvm-project/commit/7cd179612d7af420f0025e754d0051a95ac1fd11.diff LOG:

[libclc] [libclc] Fix typo in OpenCL header math/sincos.h (PR #147244)

2025-07-07 Thread Wenju He via cfe-commits
https://github.com/wenju-he closed https://github.com/llvm/llvm-project/pull/147244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/147284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Fraser Cormack (frasercrmck) Changes These tests aren't very meaningful and aren't immune to false positives, but they do get the project building when running 'check-all' and so enable libclc testing in CI. --- Patch is 69.21 Ki

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/87989 >From b41b2032fdb01bd91d32255bf22a94315b58a017 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 30 Jun 2025 10:59:02 +0100 Subject: [PATCH 1/9] [libclc] Place libclc files in clang's resource dir ---

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
@@ -1450,7 +1450,6 @@ def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">; def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">; def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">; def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Corentin Jabot via cfe-commits
@@ -248,7 +248,9 @@ C Language Changes not valid in C++. - The ``[[clang::assume()]]`` attribute is now correctly recognized in C. The ``__attribute__((assume()))`` form has always been supported, so the fix is - specific to the attribute syntax used. + specific to the at

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 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 HEAD~1 HEAD --extensions h,cpp,cl -- clang/test/Driver/opencl-libclc.cl libclc/test/g

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -1450,7 +1450,6 @@ def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">; def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">; def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">; def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: You've got the same typo (?) in a bunch of places. You have `/stdc:latest` instead of `/std:clatest`. Same for `/std:c++latest`. https://github.com/llvm/llvm-project/pull/147284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147286 Reverts llvm/llvm-project#145220 This breaks CI when building the documentation ``` Included from /home/runner/work/llvm-project/llvm-project/clang/docs/../include/clang/Basic/Diagnostic.td:74: /home/runner/w

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > You've got the same typo (?) in a bunch of places. You have `/stdc:latest` > instead of `/std:clatest`. Same for `/std:c++latest`. Good catch! Sheesh, fingers. Work! https://github.com/llvm/llvm-project/pull/147284 ___ cfe-commi

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes Reverts llvm/llvm-project#145220 This breaks CI when building the documentation ``` Included from /home/runner/work/llvm-project/llvm-project/clang/docs/../include/clang/Basic/Diagnostic.td:74: /home/run

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/147286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove source range from CXXOperatorCallExpr (PR #147028)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. I'm happy to approve as is then https://github.com/llvm/llvm-project/pull/147028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/147284 >From 926fd7ce1264bd263a9fd46409ec7cc8e2d2db27 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 7 Jul 2025 07:47:54 -0400 Subject: [PATCH 1/2] [clang-cl] Support /stdc:latest cl.exe has /stdc:latest

[libclc] [NFC][libclc] Fix typo in OpenCL header math/sincos.h (PR #147244)

2025-07-07 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/147244 None >From c839f41508410f0fba1206d4b1cf34e52b92fa65 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Mon, 7 Jul 2025 09:07:45 +0200 Subject: [PATCH] [NFC][libclc] Fix typo in OpenCL header math/sincos.h --- lib

[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/147066 >From 950b6dce92eb2a831e7bd7e7ba44b3e8cc354dd4 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Fri, 4 Jul 2025 17:13:20 +0300 Subject: [PATCH 1/4] Checking that some kind of constructor is called and followe

[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)

2025-07-07 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/147066 >From 950b6dce92eb2a831e7bd7e7ba44b3e8cc354dd4 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Fri, 4 Jul 2025 17:13:20 +0300 Subject: [PATCH 1/4] Checking that some kind of constructor is called and followe

[clang] 7fea83e - [clang] NFC, use LocalLocOffsetTable in getFIleIDLocal.

2025-07-07 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2025-07-07T09:57:41+02:00 New Revision: 7fea83e3143e1a88a096a37ecd13668e2da94b93 URL: https://github.com/llvm/llvm-project/commit/7fea83e3143e1a88a096a37ecd13668e2da94b93 DIFF: https://github.com/llvm/llvm-project/commit/7fea83e3143e1a88a096a37ecd13668e2da94b93.diff LO

[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)

2025-07-07 Thread Andrey Karlov via cfe-commits
negativ wrote: > Please mention changes in Release Notes. @EugeneZelenko done. https://github.com/llvm/llvm-project/pull/147066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [DenseMap] Do not align pointer sentinel values (NFC) (PR #146595)

2025-07-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang,llvm,mlir` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/16366 Here is the relevant pi

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-07-07 Thread via cfe-commits
yronglin wrote: Do we need to continue to split this MR into smaller pieces? https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-07 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/146830 >From 9eb58438d2b4061ad7a6bdbd1db82a5fd4043948 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Thu, 3 Jul 2025 00:19:52 -0700 Subject: [PATCH 01/12] [clang-tidy] Add new check: `modernize-use-concise-

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-07 Thread Victor Chernyakin via cfe-commits
@@ -0,0 +1,40 @@ +//===--- UseConcisePreprocessorDirectivesCheck.h - clang-tidy ---*- 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: Apa

[clang] 22357fe - [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (#146212)

2025-07-07 Thread via cfe-commits
Author: flovent Date: 2025-07-07T13:46:30+02:00 New Revision: 22357fe33a8a8cc221632e32cb443676f1feeda9 URL: https://github.com/llvm/llvm-project/commit/22357fe33a8a8cc221632e32cb443676f1feeda9 DIFF: https://github.com/llvm/llvm-project/commit/22357fe33a8a8cc221632e32cb443676f1feeda9.diff LOG:

[clang] [analyzer] Avoid unnecessary super region invalidation in `CStringChecker` (PR #146212)

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

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/147284 cl.exe has /stdc:latest, analogous to /stdc++:latest, which sets the language mode to the latest standard. For C, that's C23. This adds support for the option. Fixes #147233 >From 926fd7ce1264bd263a9fd46

[clang-tools-extra] [IncludeCleaner] display overview (PR #93932)

2025-07-07 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 HEAD~1 HEAD --extensions cpp -- clang-tools-extra/include-cleaner/tool/IncludeCleaner

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Aaron Ballman (AaronBallman) Changes cl.exe has /stdc:latest, analogous to /stdc++:latest, which sets the language mode to the latest standard. For C, that's C23. This adds support for the option. Fixes #147233 --- Full diff: htt

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes cl.exe has /stdc:latest, analogous to /stdc++:latest, which sets the language mode to the latest standard. For C, that's C23. This adds support for the option. Fixes #147233 --- Full diff: https://gi

[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

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

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/147030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! My cleverness didn't work out, alas. :-D https://github.com/llvm/llvm-project/pull/147030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang][AST] Fix positioning of preserve cconv attributes in TypePrinter (PR #147285)

2025-07-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andreas C. Osowski (th0br0) Changes TypePrinter currently generates function pointer declarations that do not compile when using the `preserve_.*` calling conventions as per https://clang.llvm.org/docs/AttributeReference.html#preserve-all

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -1450,7 +1450,6 @@ def MicrosoftAnonTag : DiagGroup<"microsoft-anon-tag">; def MicrosoftCommentPaste : DiagGroup<"microsoft-comment-paste">; def MicrosoftEndOfFile : DiagGroup<"microsoft-end-of-file">; def MicrosoftInaccessibleBase : DiagGroup<"microsoft-inaccessible-base">;

[clang] [clang][AST] Fix positioning of preserve cconv attributes in TypePrinter (PR #147285)

2025-07-07 Thread Andreas C. Osowski via cfe-commits
https://github.com/th0br0 created https://github.com/llvm/llvm-project/pull/147285 TypePrinter currently generates function pointer declarations that do not compile when using the `preserve_.*` calling conventions as per https://clang.llvm.org/docs/AttributeReference.html#preserve-all ff. Run

[clang] [Clang] A lone `[` does not an attribute make (PR #147306)

2025-07-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think the old code was not handling Microsoft attributes and I think the new code is also not handling Microsoft attributes, just in a different way. AIUI, Microsoft attributes are deprecated (https://godbolt.org/z/Ma45KKMvG) and only used on a decl

[clang] [libclc] [llvm] [libclc] Add initial LIT tests (PR #87989)

2025-07-07 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,32 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Excep

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -2258,6 +2258,30 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase { unsigned NumExpansions; }; + enum class PredefinedSugarKind { +/// The "size_t" type. +SizeT, + +/// The signed integer type corresponding to "size_t". --

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/146915 >From 7fc1c6efab52b4f08ec89caaa799aadeb2996c1d Mon Sep 17 00:00:00 2001 From: erichkeane Date: Tue, 1 Jul 2025 10:20:40 -0700 Subject: [PATCH 1/2] [OpenACC][CIR] 'cache' construct lowering The 'cache' constr

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -402,16 +449,19 @@ class MallocChecker const char *NL, const char *Sep) const override; private: - mutable std::unique_ptr BT_DoubleFree[CK_NumCheckKinds]; - mutable std::unique_ptr BT_DoubleDelete; - mutable std::unique_ptr BT_Leak[CK_NumCheckKinds]; -

[libunwind] [libunwind] Add CMake option to enable execute-only code generation on AArch64 (PR #140554)

2025-07-07 Thread Csanád Hajdú via cfe-commits
@@ -16,6 +16,8 @@ #if defined(_AIX) .toc +#elif defined(__aarch64__) && defined(__ELF__) && defined(_LIBUNWIND_EXECUTE_ONLY_CODE) Il-Capitano wrote: `.section .text,"axy",@progbits,unique,0` is an ELF-specific directive, so I think it makes sense to check

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -488,6 +488,13 @@ unsigned Parser::ParseAttributeArgsCommon( bool AttributeHasVariadicIdentifierArg = attributeHasVariadicIdentifierArg(*AttrName, Form.getSyntax(), ScopeName); + if (Tok.is(tok::hash) || Tok.is(tok::hashhash)) { AaronBallman wrote

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Aaron Ballman via cfe-commits
@@ -830,6 +830,8 @@ def err_ms_property_expected_comma_or_rparen : Error< "expected ',' or ')' at end of property accessor list">; def err_ms_property_initializer : Error< "property declaration cannot have a default member initializer">; +def err_invalid_attribute_argument

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-07-07 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/137665 From a701cd52fb572fb3b0f1f2f6dd96f77db632d2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Mon, 28 Apr 2025 17:05:46 +0200 Subject: [PATCH 1/3] Pre-commit test: [Pr

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -3150,7 +3094,7 @@ void MallocChecker::checkPreCall(const CallEvent &Call, if (const auto *DC = dyn_cast(&Call)) { const CXXDeleteExpr *DE = DC->getOriginExpr(); -if (!ChecksEnabled[CK_NewDeleteChecker]) +if (!NewDeleteChecker.isEnabled()) Nag

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-07-07 Thread via cfe-commits
Shoreshen wrote: > This is still doing the target intrinsic instead of handling ptrmask first? Hi @arsenm, I'm going to open a new PR for ptrmask. But since the backward propagate is in the initialization, it may cause some problem (depend on potential constant attr). I'll need to read the co

[clang] b7c4ac2 - NFC, use structured binding to simplify the code.

2025-07-07 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2025-07-07T17:07:37+02:00 New Revision: b7c4ac2db4cdd99203b836bd94b3392fd7536de5 URL: https://github.com/llvm/llvm-project/commit/b7c4ac2db4cdd99203b836bd94b3392fd7536de5 DIFF: https://github.com/llvm/llvm-project/commit/b7c4ac2db4cdd99203b836bd94b3392fd7536de5.diff LO

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -3187,7 +3131,7 @@ void MallocChecker::checkPreCall(const CallEvent &Call, if (!FD) return; -if (ChecksEnabled[CK_MallocChecker] && isFreeingCall(Call)) +if (MallocChecker.isEnabled() && isFreeingCall(Call)) NagyDonat wrote: `MallocChecke

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -3902,16 +3846,15 @@ void MallocChecker::printState(raw_ostream &Out, ProgramStateRef State, for (auto [Sym, Data] : RS) { const RefState *RefS = State->get(Sym); AllocationFamily Family = RefS->getAllocationFamily(); - std::optional CheckKind = -

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread Erich Keane via cfe-commits
@@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, +

[clang] [clang][AST] Fix positioning of preserve cconv attributes in TypePrinter (PR #147285)

2025-07-07 Thread via cfe-commits
Sirraide wrote: AST printing has historically only really been best-effort, i.e. we don’t actually care too much that the code that we print actually compiles, but I think @AaronBallman has a more-informed opinion on that as I recall. https://github.com/llvm/llvm-project/pull/147285 __

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/147308 >From 8f1c383f8f84fb636af4a78e0ff504830f9272f5 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 7 Jul 2025 17:20:48 +0300 Subject: [PATCH 1/3] [Clang] disallow operator in attribute argument list

[clang] [CIR] Implement AbstractConditionalOperator for ComplexType (PR #147090)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/147090 >From 41e529de4636663cedc01375288cb5a22cd5cfb6 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 4 Jul 2025 19:13:58 +0200 Subject: [PATCH] [CIR] Implement AbstractConditionalOperator for ComplexType

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
NagyDonat wrote: @gamesh411 I applied all the changes that we discussed in the interactive review. Please accept the PR formally (or add any suggestions that you realized since then). I'll probably merge this PR on 9th of July if there is no other feedback. https://github.com/llvm/llvm-projec

[clang] [OpenACC][CIR] 'cache' construct lowering (PR #146915)

2025-07-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/10490 Here is the relev

[clang] [cir-translate] Fix crash issue where the data layout string is missing (PR #147209)

2025-07-07 Thread Andy Kaylor via cfe-commits
@@ -82,12 +85,17 @@ llvm::LogicalResult prepareCIRModuleDataLayout(mlir::ModuleOp mod, // Data layout is fully determined by the target triple. Here we only pass the // triple to get the data layout. + llvm::IntrusiveRefCntPtr diagID( + new clang::DiagnosticIDs); +

[clang] Report wider source range for unsafe buffers warnings (PR #147363)

2025-07-07 Thread Thomas Sepez via cfe-commits
https://github.com/tsepez updated https://github.com/llvm/llvm-project/pull/147363 >From c389b056250871b802d34de6ba2cb0cf365b751a Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 7 Jul 2025 17:59:53 + Subject: [PATCH 1/2] Report wider source range for unsafe buffers warnings --- clang/

[clang] [llvm] __declspec(noshrinkwrap) support (PR #147397)

2025-07-07 Thread Adam Glass via cfe-commits
AdamGlass wrote: Change isn't Windows specific -- seems generally useful. You're right that it enshrines the functionality responsible rather than desire 'don't get cute with the prologue'. I'm open to a better name. re: __declspec() -- there is no compatibility requirement for this choice.

[clang] Sema: suppress deprecated field warnings in implicit special-member functions Fixes: https://github.com/llvm/llvm-project/issues/147293 (PR #147400)

2025-07-07 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 edited https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sema: suppress deprecated field warnings in implicit special-member functions Fixes: https://github.com/llvm/llvm-project/issues/147293 (PR #147400)

2025-07-07 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 ready_for_review https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-07 Thread Nick Sarnie via cfe-commits
sarnex wrote: 🚀 https://github.com/llvm/llvm-project/pull/146891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Sema: suppress deprecated field warnings in implicit special-member functions Fixes: https://github.com/llvm/llvm-project/issues/147293 (PR #147400)

2025-07-07 Thread Shashi Shankar via cfe-commits
https://github.com/shashi1687 edited https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (PR #146891)

2025-07-07 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/146891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 02f60fd - [NFC][Clang][OpenMP] Refactor mapinfo generation for captured vars (#146891)

2025-07-07 Thread via cfe-commits
Author: Abhinav Gaba Date: 2025-07-07T23:47:02Z New Revision: 02f60fda3cb28f14681f8a4252bc832392c91fef URL: https://github.com/llvm/llvm-project/commit/02f60fda3cb28f14681f8a4252bc832392c91fef DIFF: https://github.com/llvm/llvm-project/commit/02f60fda3cb28f14681f8a4252bc832392c91fef.diff LOG:

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -327,39 +327,7 @@ void testArrayDestr() { clang_analyzer_warnIfReached(); // no-warning } -// Invalidate Region even in case of default destructor -class InvalidateDestTest { -public: - int x; - int *y; - ~InvalidateDestTest(); -}; - -int test_member_invalidation() { -

[clang] [Clang] Respect MS layout attributes during CUDA/HIP device compilation (PR #146620)

2025-07-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > This patch fixes an issue where Microsoft-specific layout attributes, such as > __declspec(empty_bases), were ignored during CUDA/HIP device compilation on a > Windows host. This caused a critical memory layout mismatch between host and > device objects, breaking librarie

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
@@ -276,6 +276,10 @@ def err_expected_while : Error<"expected 'while' in do/while loop">; def err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">; def err_expected_semi_after_expr : Error<"expected ';' after expression">; +def warn_expected_stmt_before_sem

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-07 Thread via cfe-commits
@@ -1002,14 +1002,14 @@ RValue CodeGenFunction::EmitCoroutineIntrinsic(const CallExpr *E, } case llvm::Intrinsic::coro_size: { auto &Context = getContext(); -CanQualType SizeTy = Context.getSizeType(); +CanQualType SizeTy = Context.getCanonicalSizeType(); -

[clang] 28649f2 - [Clang] accept @tparam on variable template partial specializations (#147219)

2025-07-07 Thread via cfe-commits
Author: Oleksandr T. Date: 2025-07-07T18:27:08+03:00 New Revision: 28649f2117426df30bf978c1531cd92be05d3865 URL: https://github.com/llvm/llvm-project/commit/28649f2117426df30bf978c1531cd92be05d3865 DIFF: https://github.com/llvm/llvm-project/commit/28649f2117426df30bf978c1531cd92be05d3865.diff

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

2025-07-07 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk closed https://github.com/llvm/llvm-project/pull/147219 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From 43e2dc670d7c9ed5e23b5d26dff1e273c84b5a53 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 3 Jul 2025 02:15:22 +0800 Subject: [PATCH 1/4] [C23][Parser] Diagnostic for attribute declaration where stateme

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
@@ -747,6 +747,10 @@ Bug Fixes in This Version - Fixed an infinite recursion when checking constexpr destructors. (#GH141789) - Fixed a crash when a malformed using declaration appears in a ``constexpr`` function. (#GH144264) - Fixed a bug when use unicode character name in ma

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/146224 >From 43e2dc670d7c9ed5e23b5d26dff1e273c84b5a53 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 3 Jul 2025 02:15:22 +0800 Subject: [PATCH 1/5] [C23][Parser] Diagnostic for attribute declaration where stateme

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Oleksandr T. via cfe-commits
@@ -477,3 +477,8 @@ namespace P2361 { } alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}} + +namespace GH147217 { + [[clang::annotate(#)]] void a(); // expected-error {{'#' is not allowed in attribute argument

[clang] [clang-tools-extra] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

2025-07-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/146422 >From 69049bfcd81134f3787d1ee14ab3e5c6d91eb87d Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 3 Jul 2025 12:46:58 -0700 Subject: [PATCH] [clang][modules] Serialize `CodeGenOptions` --- clang-tools-

[clang] [C23][Parser] Diagnostic for attribute declaration where statement is required (PR #146224)

2025-07-07 Thread via cfe-commits
@@ -276,6 +276,10 @@ def err_expected_while : Error<"expected 'while' in do/while loop">; def err_expected_semi_after_stmt : Error<"expected ';' after %0 statement">; def err_expected_semi_after_expr : Error<"expected ';' after expression">; +def warn_expected_stmt_before_sem

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Oleksandr T. via cfe-commits
@@ -830,6 +830,8 @@ def err_ms_property_expected_comma_or_rparen : Error< "expected ',' or ')' at end of property accessor list">; def err_ms_property_initializer : Error< "property declaration cannot have a default member initializer">; +def err_invalid_attribute_argument

[clang] [CIR] Implement AbstractConditionalOperator for ComplexType (PR #147090)

2025-07-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/147090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1aa6b99 - [CIR] Implement AbstractConditionalOperator for ComplexType (#147090)

2025-07-07 Thread via cfe-commits
Author: Amr Hesham Date: 2025-07-07T18:50:07+02:00 New Revision: 1aa6b99801e1715a47c103cec123c1cd90d1cbec URL: https://github.com/llvm/llvm-project/commit/1aa6b99801e1715a47c103cec123c1cd90d1cbec DIFF: https://github.com/llvm/llvm-project/commit/1aa6b99801e1715a47c103cec123c1cd90d1cbec.diff LO

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: I think marking declarations as invalid even in non-immediate context errors should not be an issue, as the declaration should not end up being used anyway. I think this is a pretty common pattern in other places. Why do we end up crashing only with this

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

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

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Matheus Izvekov via cfe-commits
@@ -4111,7 +4111,10 @@ static ActionResult getPatternForClassTemplateSpecialization( if (Ambiguous) { // Partial ordering did not produce a clear winner. Complain. Inst.Clear(); - ClassTemplateSpec->setInvalidDecl(); + + if (!S.isS

[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

2025-07-07 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon updated https://github.com/llvm/llvm-project/pull/146854 >From 9a640eefb5d27a65f236b5f7df1398bdf1bcc017 Mon Sep 17 00:00:00 2001 From: "Podchishchaeva, Mariya" Date: Thu, 3 Jul 2025 03:46:41 -0700 Subject: [PATCH 1/4] [NFC][clang] Fix CodeGenSYCL::unique_stable_nam

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/147080 From c0e669a4f31702a871fce4c8c3805b322c331afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Wed, 2 Jul 2025 15:09:42 +0200 Subject: [PATCH 1/6] [analyzer] Connversion to CheckerFamily: Mal

[clang] HIPSPV: Unbundle SDL (PR #136412)

2025-07-07 Thread Paulius Velesko via cfe-commits
https://github.com/pvelesko updated https://github.com/llvm/llvm-project/pull/136412 >From fe6a426fc135c7232650b5ebac465ceaa66d7a20 Mon Sep 17 00:00:00 2001 From: Paulius Velesko Date: Sat, 19 Apr 2025 10:02:59 +0300 Subject: [PATCH 1/5] HIPSPV: Unbundle SDL This fixes the issue of rdc linking

[clang] [analyzer] Conversion to CheckerFamily: MallocChecker (PR #147080)

2025-07-07 Thread Donát Nagy via cfe-commits
@@ -402,16 +449,19 @@ class MallocChecker const char *NL, const char *Sep) const override; private: - mutable std::unique_ptr BT_DoubleFree[CK_NumCheckKinds]; - mutable std::unique_ptr BT_DoubleDelete; - mutable std::unique_ptr BT_Leak[CK_NumCheckKinds]; -

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-07 Thread via cfe-commits
@@ -25,20 +40,29 @@ int main() { auto lambda2 = [](int){}; auto lambda3 = [](double){}; - kernel(lambda1); - kernel2(lambda2); - kernel3(lambda3); + kernel_wrapper(lambda1); + kernel2_wrapper(lambda2); + kernel3_wrapper(lambda3); // Ensure the kernels are named

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Matheus Izvekov via cfe-commits
@@ -4111,7 +4111,10 @@ static ActionResult getPatternForClassTemplateSpecialization( if (Ambiguous) { // Partial ordering did not produce a clear winner. Complain. Inst.Clear(); - ClassTemplateSpec->setInvalidDecl(); + + if (!S.isS

[clang] [Clang] Fixed double finally block execution (PR #146796)

2025-07-07 Thread via cfe-commits
https://github.com/yasster updated https://github.com/llvm/llvm-project/pull/146796 >From 2ccf38469c28392597199e98515dd5a21cfc7c84 Mon Sep 17 00:00:00 2001 From: Yassine Missoum Date: Tue, 1 Jul 2025 15:25:21 -0700 Subject: [PATCH 1/2] Fixed double finally block execution --- clang/lib/CodeGe

[clang-tools-extra] [clang-tidy] bugprone-infinite-loop: Add support for tuple structured bindings (PR #147410)

2025-07-07 Thread Aviral Goel via cfe-commits
https://github.com/aviralg created https://github.com/llvm/llvm-project/pull/147410 Tuple structured bindings can introduce new variable declarations under `BindingDecl` nodes which are currently ignored by the infinite loop checker. This PR implements support for extracting variables from the

[clang-tools-extra] [clang-tidy] bugprone-infinite-loop: Add support for tuple structured bindings (PR #147410)

2025-07-07 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] [llvm] __declspec(noshrinkwrap) support (PR #147397)

2025-07-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: As a practical matter, I don't think LLVM supports shrink-wrapping on Windows at the moment. I mean, I guess it's something someone could theoretically look into at some point, but the interaction with unwind info is complicated. Can we define what it means to "shrink-wra

[clang-tools-extra] [clang-tidy] Add new check: `readability-use-concise-preprocessor-directives` (PR #146830)

2025-07-07 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/146830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Add support for capturing all possible versioned APINotes without applying them (PR #147405)

2025-07-07 Thread Artem Chikin via cfe-commits
https://github.com/artemcm updated https://github.com/llvm/llvm-project/pull/147405 >From 1e1b8ed2a995f4969782c257dc03713b52839573 Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Mon, 7 Jul 2025 13:56:41 -0700 Subject: [PATCH] [APINotes] Add support for capturing all possible versioned APINo

<    1   2   3   4   5   6   >