[clang] 5eca2dd - [clang][bytecode] Don't diagnose const extern reads in CPCE mode (#137285)

2025-04-24 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-25T08:54:34+02:00 New Revision: 5eca2ddeba6d05f0b1cf2193d56d059502122d00 URL: https://github.com/llvm/llvm-project/commit/5eca2ddeba6d05f0b1cf2193d56d059502122d00 DIFF: https://github.com/llvm/llvm-project/commit/5eca2ddeba6d05f0b1cf2193d56d059502122d00.diff L

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

2025-04-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/137103 >From b4ae58e13bbbc62272a900cac5e1f158c437e8c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Apr 2025 18:16:42 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

2025-04-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka converted_to_draft https://github.com/llvm/llvm-project/pull/137103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

2025-04-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/137103 >From b4ae58e13bbbc62272a900cac5e1f158c437e8c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Apr 2025 18:16:42 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?

[clang-tools-extra] [clang-tidy] Do not pass any file when listing checks in run_clang_ti… (PR #137286)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Carlos Galvez (carlosgalvezp) Changes …dy.py Currently, run_clang_tidy.py does not correctly display the list of checks picked up from the top-level .clang-tidy file. The reason for that is that we are passing an empty string

[clang-tools-extra] [clang-tidy] Do not pass any file when listing checks in run_clang_ti… (PR #137286)

2025-04-24 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/137286 …dy.py Currently, run_clang_tidy.py does not correctly display the list of checks picked up from the top-level .clang-tidy file. The reason for that is that we are passing an empty string as input file.

[clang] [clang][bytecode] Don't diagnose const extern reads in CPCE mode (PR #137285)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes They might become constexpr later. --- Full diff: https://github.com/llvm/llvm-project/pull/137285.diff 4 Files Affected: - (modified) clang/lib/AST/ByteCode/Descriptor.cpp (+5-5) - (modified) clang/lib/A

[clang] [clang][bytecode] Don't diagnose const extern reads in CPCE mode (PR #137285)

2025-04-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137285 They might become constexpr later. >From af0ed78bbab6b944d51b35ab2d2055c9f781662c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 25 Apr 2025 07:40:30 +0200 Subject: [PATCH] [clang][byt

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-24 Thread via cfe-commits
fanju110 wrote: > There is precedent for changing the clang source in order to share code or to > augment it for use with flang. For what needs to be done here, I think it > should be fine. We will have to request reviews from the clang developers as > well. Since this PR focuses on enablin

[clang] [lld] [llvm] [X86] Implement disabling APX relocations and EPGR/NDD instrs for relocations (PR #136660)

2025-04-24 Thread Feng Zou via cfe-commits
fzou1 wrote: Any comments? https://github.com/llvm/llvm-project/pull/136660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add support for Ziccamoc (PR #136694)

2025-04-24 Thread Liao Chunyu via cfe-commits
https://github.com/ChunyuLiao closed https://github.com/llvm/llvm-project/pull/136694 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9c2190e - [RISCV] Add support for Ziccamoc (#136694)

2025-04-24 Thread via cfe-commits
Author: T-Tie Date: 2025-04-25T13:49:48+08:00 New Revision: 9c2190eb5dacfb7991f616c83a9e87740c1c6d49 URL: https://github.com/llvm/llvm-project/commit/9c2190eb5dacfb7991f616c83a9e87740c1c6d49 DIFF: https://github.com/llvm/llvm-project/commit/9c2190eb5dacfb7991f616c83a9e87740c1c6d49.diff LOG: [R

[clang] [clang][bytecode] Allow forming pointers to fields of extern globals (PR #137211)

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

[clang] 3b58a60 - [clang][bytecode] Allow forming pointers to fields of extern globals (#137211)

2025-04-24 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-25T07:43:33+02:00 New Revision: 3b58a60086cb755fe40cb90a73d27a83d44ce766 URL: https://github.com/llvm/llvm-project/commit/3b58a60086cb755fe40cb90a73d27a83d44ce766 DIFF: https://github.com/llvm/llvm-project/commit/3b58a60086cb755fe40cb90a73d27a83d44ce766.diff L

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-24 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/136842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-24 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/8492 Here is the releva

[libclc] [libclc] Support the generic address space (PR #137183)

2025-04-24 Thread Wenju He via cfe-commits
@@ -420,12 +420,37 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) -D${CLC_TARGET_DEFINE} # All libclc builtin libraries see CLC headers -I${CMAKE_CURRENT_SOURCE_DIR}/clc/include + # Error on undefined macros + -Werror=undef ) if( NOT "${cpu}"

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-24 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: According to the sync-up meeting, we can proceed this patch as-is. I will merge this in a few days. I added back the release note. @asb https://github.com/llvm/llvm-project/pull/136842 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [llvm] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` (PR #136842)

2025-04-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/136842 >From 723976e74398e12252a599e3aabb05ec8f2515ab Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Wed, 23 Apr 2025 18:19:41 +0800 Subject: [PATCH 1/5] [RISCV] Allow `Zicsr`/`Zifencei` to duplicate with `g` T

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-24 Thread via cfe-commits
https://github.com/fanju110 updated https://github.com/llvm/llvm-project/pull/136098 >From 9494c9752400e4708dbc8b6a5ca4993ea9565e95 Mon Sep 17 00:00:00 2001 From: fanyikang Date: Thu, 17 Apr 2025 15:17:07 +0800 Subject: [PATCH 1/4] Add support for IR PGO (-fprofile-generate/-fprofile-use=/file

[clang] [flang] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-24 Thread via cfe-commits
https://github.com/fanju110 updated https://github.com/llvm/llvm-project/pull/136098 >From 9494c9752400e4708dbc8b6a5ca4993ea9565e95 Mon Sep 17 00:00:00 2001 From: fanyikang Date: Thu, 17 Apr 2025 15:17:07 +0800 Subject: [PATCH 1/3] Add support for IR PGO (-fprofile-generate/-fprofile-use=/file

[clang] [clang-format] Correctly identify include guards (PR #137112)

2025-04-24 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/137112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 82f1f5e - [clang-format] Correctly identify include guards (#137112)

2025-04-24 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-24T20:17:07-07:00 New Revision: 82f1f5e5d4104fa276386f4840eacef9c44becce URL: https://github.com/llvm/llvm-project/commit/82f1f5e5d4104fa276386f4840eacef9c44becce DIFF: https://github.com/llvm/llvm-project/commit/82f1f5e5d4104fa276386f4840eacef9c44becce.diff LOG:

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/136854 >From fd1d37ebf0f1c4a23f573444f30730b0f65630bf Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Wed, 23 Apr 2025 20:23:09 +0800 Subject: [PATCH 1/2] [CIR] Cleanup support for C functions --- clang/lib/

[clang] [clang] Merge gtest binaries into AllClangUnitTests (PR #134196)

2025-04-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Ping, WDYT? https://github.com/llvm/llvm-project/pull/134196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Emit fake uses before musttail calls (PR #136867)

2025-04-24 Thread via cfe-commits
gulfemsavrun wrote: Is there anything that is blocking this PR to be merged? If it needs more time to review, could you please revert the original change and reland with this fix? This is blocking us to roll Clang in our project. https://github.com/llvm/llvm-project/pull/136867 ___

[clang] Mark CXX module initializer with PACBTI attributes (PR #133716)

2025-04-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/133716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-24 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/136386 >From c1a89d6896edd29ff345dd8fdc30cd040f3760f3 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 18 Apr 2025 16:06:18 -0700 Subject: [PATCH 1/4] add md node type filter, and test --- .../test/CodeGenHL

[clang] [Clang][NFC] Explicitly delete copy ctor and assignment for CGAtomicOptionsRAII (PR #137275)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Shafik Yaghmour (shafik) Changes Static analysis flagged CGAtomicOptionsRAII as having an explicit destructor but not having explicit copy ctor and assignment. Rule of three says we should. We are just using this as an RAII object

[clang] [Clang][NFC] Explicitly delete copy ctor and assignment for CGAtomicOptionsRAII (PR #137275)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged CGAtomicOptionsRAII as having an explicit destructor but not having explicit copy ctor and assignment. Rule of three says we should. We are just using this as an RAII object, no nee

[clang] [Clang][NFC] Explicitly delete copy ctor and assignment for CGAtomicOptionsRAII (PR #137275)

2025-04-24 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/137275 Static analysis flagged CGAtomicOptionsRAII as having an explicit destructor but not having explicit copy ctor and assignment. Rule of three says we should. We are just using this as an RAII object, no need for

[clang] 31b38d6 - [HLSL] Handle incomplete array types (#133508)

2025-04-24 Thread via cfe-commits
Author: Chris B Date: 2025-04-24T19:22:08-05:00 New Revision: 31b38d67f246066cbca9328a5b2dd66a31e71245 URL: https://github.com/llvm/llvm-project/commit/31b38d67f246066cbca9328a5b2dd66a31e71245 DIFF: https://github.com/llvm/llvm-project/commit/31b38d67f246066cbca9328a5b2dd66a31e71245.diff LOG:

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-04-24 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/133508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/137133 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -271,26 +271,32 @@ class CFGWalker { // translateAttrExpr needs it, but that should be moved too. class CapabilityExpr { private: - /// The capability expression and whether it's negated. - llvm::PointerIntPair CapExpr; + /// The capability expression and flags. + llvm::

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -103,6 +103,23 @@ static StringRef ClassifyDiagnostic(QualType VDT) { return "mutex"; } +static unsigned getCapabilityExprFlags(QualType VDT) { + unsigned Flags = 0; + + if (const auto *RT = VDT->getAs()) { +if (const auto *RD = RT->getDecl()) + if (RD->hasAttr

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -271,26 +271,32 @@ class CFGWalker { // translateAttrExpr needs it, but that should be moved too. class CapabilityExpr { private: - /// The capability expression and whether it's negated. - llvm::PointerIntPair CapExpr; + /// The capability expression and flags. + llvm::

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -6708,15 +6708,15 @@ int testAdoptShared() { } // namespace ReturnScopedLockable -#endif +#endif // __cpp_guaranteed_copy_elision aaronpuchert wrote: These changes are fine, but please just commit them separately. (No review required.) https://github.co

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -163,15 +184,15 @@ using FactID = unsigned short; /// the analysis of a single routine. class FactManager { private: - std::vector> Facts; + std::vector> Facts; aaronpuchert wrote: This does not work, `FactEntry` has to remain `const`. See Delesley's comm

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -434,6 +434,16 @@ class can be used as a capability. The string argument specifies the kind of capability in error messages, e.g. ``"mutex"``. See the ``Container`` example given above, or the ``Mutex`` class in :ref:`mutexheader`. +REENTRANT aaronpucher

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -434,6 +434,16 @@ class can be used as a capability. The string argument specifies the kind of capability in error messages, e.g. ``"mutex"``. See the ``Container`` example given above, or the ``Mutex`` class in :ref:`mutexheader`. +REENTRANT +- + +``REENTRANT``

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
@@ -1831,15 +1852,15 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, assert(!Self); const auto *TagT = Exp->getType()->getAs(); if (D->hasAttrs() && TagT && Exp->isPRValue()) { - std::pair Placeholder = - Analyzer->SxBuilder.crea

[clang] Thread Safety Analysis: Support reentrant capabilities (PR #137133)

2025-04-24 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: I think the biggest issue is that removing `const` from `FactEntry` does not work. You'll have to undo all those changes and instead create a new `FactEntry` for every lock/unlock. https://github.com/llvm/llvm-project/pull/137133 _

[clang] TODO (PR #137273)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Vitaly Buka (vitalybuka) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/137273.diff 1 Files Affected: - (modified) clang/lib/Driver/SanitizerArgs.cpp (+2) ``diff diff --git

[clang] TODO (PR #137273)

2025-04-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka converted_to_draft https://github.com/llvm/llvm-project/pull/137273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] TODO (PR #137273)

2025-04-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/137273 None >From ee49ae72cd437b98b921956908c6262431b6887a Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 24 Apr 2025 17:10:58 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia

[clang] 70e303f - [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (#135688)

2025-04-24 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-24T17:10:05-07:00 New Revision: 70e303f11e1b9ac4af20d4fad5f1ec1c8ceb448e URL: https://github.com/llvm/llvm-project/commit/70e303f11e1b9ac4af20d4fad5f1ec1c8ceb448e DIFF: https://github.com/llvm/llvm-project/commit/70e303f11e1b9ac4af20d4fad5f1ec1c8ceb448e.diff

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

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

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

2025-04-24 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/135688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove duplicate API (PR #132776)

2025-04-24 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Jugst3r Let us know if this is ready to be merged. https://github.com/llvm/llvm-project/pull/132776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove duplicate API (PR #132776)

2025-04-24 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. I talked to Aaron offline whether there's a better way to mark duplicates as deprecated, but given the variety of C compilers that can consume this header, we don't think there's a better way than a doxygen comment https://github.com/llvm/

[clang] [CIR] Fix calling defined functions (PR #137271)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes Until now our function symbol lookup has been assuming that the function did not exist and creating a definition for it. This caused us to create a duplicate definition if we ever tried to call a functio

[clang] [CIR] Fix calling defined functions (PR #137271)

2025-04-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/137271 Until now our function symbol lookup has been assuming that the function did not exist and creating a definition for it. This caused us to create a duplicate definition if we ever tried to call a function th

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/20928 Here is the relevant piece of the build lo

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/137248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be48c0d - [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (#137248)

2025-04-24 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-04-24T17:03:06-07:00 New Revision: be48c0df77413a237565a339c9ccc275b8256631 URL: https://github.com/llvm/llvm-project/commit/be48c0df77413a237565a339c9ccc275b8256631 DIFF: https://github.com/llvm/llvm-project/commit/be48c0df77413a237565a339c9ccc275b8256631.diff LO

[clang] [clang] Ensure correct copying of records with authenticated fields (PR #136783)

2025-04-24 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/16608 Here is the relevant piece of the

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2025-04-24 Thread Stephen Tozer via cfe-commits
SLTozer wrote: > Hi, I believe this merge is breaking external projects because you added > `#include "llvm/Config/config.h"` which is not available (see comments at the > top of that file). Reverted for now, will look into relanding without the inclusion issue later. https://github.com/llvm/

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/137253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b6746b0 - [CIR] Upstream namepsace handling (#137253)

2025-04-24 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-24T16:42:36-07:00 New Revision: b6746b06574686a587587acafb38881ca848089c URL: https://github.com/llvm/llvm-project/commit/b6746b06574686a587587acafb38881ca848089c DIFF: https://github.com/llvm/llvm-project/commit/b6746b06574686a587587acafb38881ca848089c.diff L

[clang] fdbf073 - Revert "[DLCov] Implement DebugLoc coverage tracking (#107279)"

2025-04-24 Thread Stephen Tozer via cfe-commits
Author: Stephen Tozer Date: 2025-04-25T00:36:28+01:00 New Revision: fdbf073a86573c9ac4d595fac8e06d252ce1469f URL: https://github.com/llvm/llvm-project/commit/fdbf073a86573c9ac4d595fac8e06d252ce1469f DIFF: https://github.com/llvm/llvm-project/commit/fdbf073a86573c9ac4d595fac8e06d252ce1469f.diff

[clang] 5b16941 - [clang] Ensure correct copying of records with authenticated fields (#136783)

2025-04-24 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-04-24T16:22:50-07:00 New Revision: 5b16941f5707c3a326b688e0954f8882d8a36951 URL: https://github.com/llvm/llvm-project/commit/5b16941f5707c3a326b688e0954f8882d8a36951 DIFF: https://github.com/llvm/llvm-project/commit/5b16941f5707c3a326b688e0954f8882d8a36951.diff L

[clang] [clang] Ensure correct copying of records with authenticated fields (PR #136783)

2025-04-24 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt closed https://github.com/llvm/llvm-project/pull/136783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-24 Thread via cfe-commits
https://github.com/Sirraide commented: What about `and`, `or`, and friends (which I think are only keywords in C if you include a certain header irrc). https://github.com/llvm/llvm-project/pull/137234 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-24 Thread via cfe-commits
Andres-Salamanca wrote: @bcardosolopes I've added more test, let me know if there's a specific scenario you think is still missing https://github.com/llvm/llvm-project/pull/137106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-04-24 Thread via cfe-commits
Sirraide wrote: > I think `-Wc++-keyword` is kinda nice +1 https://github.com/llvm/llvm-project/pull/137234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-24 Thread via cfe-commits
@@ -802,6 +804,132 @@ Block *cir::BrCondOp::getSuccessorForOperands(ArrayRef operands) { return nullptr; } +//===--===// +// CaseOp +//===

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-24 Thread via cfe-commits
@@ -753,6 +755,225 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-24 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/137106 >From da645e2445e5539e7ea53307596de684203ecd27 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Tue, 22 Apr 2025 15:16:19 -0500 Subject: [PATCH 1/4] Add initial CIR support for switch operation --

[clang] [Driver][CFI] Allow CFI with minimal runtime (PR #137103)

2025-04-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/137103 >From b4ae58e13bbbc62272a900cac5e1f158c437e8c1 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 23 Apr 2025 18:16:42 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -609,8 +609,8 @@ def ConditionOp : CIR_Op<"condition", [ //===--===// def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator, - ParentOneOf<["IfOp", "ScopeOp", "WhileOp", -

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -1058,6 +1058,48 @@ LogicalResult cir::BinOp::verify() { return mlir::success(); } +//===--===// +// TernaryOp +//===--===// + +/// Give

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -254,10 +254,61 @@ class CIRLoopOpInterfaceFlattening } }; +class CIRTernaryOpFlattening : public mlir::OpRewritePattern { +public: + using OpRewritePattern::OpRewritePattern; + + mlir::LogicalResult + matchAndRewrite(cir::TernaryOp op, + mlir::Pattern

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -1246,6 +1246,59 @@ def SelectOp : CIR_Op<"select", [Pure, }]; } +//===--===// +// TernaryOp +//===--===// + +def TernaryOp : CIR_Op<"te

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -1058,6 +1058,48 @@ LogicalResult cir::BinOp::verify() { return mlir::success(); } +//===--===// +// TernaryOp +//===--===// + +/// Give

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -254,10 +254,61 @@ class CIRLoopOpInterfaceFlattening } }; +class CIRTernaryOpFlattening : public mlir::OpRewritePattern { +public: + using OpRewritePattern::OpRewritePattern; + + mlir::LogicalResult + matchAndRewrite(cir::TernaryOp op, + mlir::Pattern

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -1246,6 +1246,59 @@ def SelectOp : CIR_Op<"select", [Pure, }]; } +//===--===// +// TernaryOp +//===--===// + +def TernaryOp : CIR_Op<"te

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -1246,6 +1246,59 @@ def SelectOp : CIR_Op<"select", [Pure, }]; } +//===--===// +// TernaryOp +//===--===// + +def TernaryOp : CIR_Op<"te

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2025-04-24 Thread Scott Manley via cfe-commits
rscottmanley wrote: Hi, I believe this merge is breaking external projects because you added `#include "llvm/Config/config.h"` which is not available. #include "llvm/Config/llvm-config.h` but then `ENABLE_DEBUGLOC_COVERAGE_TRACKING` is not defined. https://github.com/llvm/llvm-project/pull/1

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/137248 >From f9e68fd71677e047ee82992f2034bd62958ecbed Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Thu, 24 Apr 2025 13:29:24 -0700 Subject: [PATCH 1/3] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CX

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

2025-04-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/135688 >From 41992e5ffb43f7db7704b93c7ad5fe2135e86e26 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 14 Apr 2025 15:12:10 -0700 Subject: [PATCH 1/2] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

2025-04-24 Thread Ryosuke Niwa via cfe-commits
@@ -372,6 +372,14 @@ void trivial_lambda() { trivial_lambda(); } +bool call_lambda_var_decl() { + RefCountable* ref_countable = make_obj(); + auto lambda = [&]() -> bool { +return ref_countable->next(); + }; + return lambda(); +} + rniwa wrote: Sure

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread Jan Korous via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -std=c++20 -Wno-all -Wunsafe-buffer-usage \ +// RUN:-verify %s + +// This example uncovered a bug in UnsafeBufferUsage.cpp, where the +// code assumed that a CXXMethodDecl always have an identifier. + +int printf( const char* format

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/137248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - 2>&1 | FileCheck %s + +// Test anonymous namespace. +namespace { + int g1 = 1; + + // Note: This causes a warning about the function being undefined, but we + // curren

[clang] [HLSL] Handle incomplete array types (PR #133508)

2025-04-24 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/133508 >From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Thu, 27 Mar 2025 09:26:31 -0500 Subject: [PATCH 1/6] [HLSL] Handle incomplete array types This refactors the

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/137253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread Erich Keane via cfe-commits
@@ -0,0 +1,55 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - 2>&1 | FileCheck %s + +// Test anonymous namespace. +namespace { + int g1 = 1; + + // Note: This causes a warning about the function being undefined, but we + // curren

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

2025-04-24 Thread Eli Friedman via cfe-commits
@@ -4622,7 +4618,12 @@ handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type, } } - CompleteObject LitObj(LVal.Base, &Lit, Base->getType()); + APValue *Lit = + CLE->hasStaticStorage() + ? &CLE->getStaticVa

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

2025-04-24 Thread Eli Friedman via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak approved this pull request. https://github.com/llvm/llvm-project/pull/137248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a bug that wrongly assumed CXXMethodDecl always has an identifier (PR #137248)

2025-04-24 Thread David Tarditi via cfe-commits
dtarditi wrote: LGTM. Thanked! https://github.com/llvm/llvm-project/pull/137248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

2025-04-24 Thread Rashmi Mudduluru via cfe-commits
@@ -372,6 +372,14 @@ void trivial_lambda() { trivial_lambda(); } +bool call_lambda_var_decl() { + RefCountable* ref_countable = make_obj(); + auto lambda = [&]() -> bool { +return ref_countable->next(); + }; + return lambda(); +} + t-rasmud wrote: M

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

2025-04-24 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/135688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Treat a call to lambda function via a variable as safe. (PR #135688)

2025-04-24 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud edited https://github.com/llvm/llvm-project/pull/135688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This adds the handlers for Decl::Namespace and Decl::UsingDirective (which is needed for anonymous namespaces). --- Full diff: https://github.com/llvm/llvm-project/pull/137253.diff 4 Files Affected: - (

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This adds the handlers for Decl::Namespace and Decl::UsingDirective (which is needed for anonymous namespaces). --- Full diff: https://github.com/llvm/llvm-project/pull/137253.diff 4 Files Affected: -

[clang] [CIR] Upstream namepsace handling (PR #137253)

2025-04-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/137253 This adds the handlers for Decl::Namespace and Decl::UsingDirective (which is needed for anonymous namespaces). >From 8e8baed406019bee2b5acd71b0d08b65360ee032 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date

[clang] [llvm] [HLSL] Implement the `faceforward` intrinsic (PR #135878)

2025-04-24 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng closed https://github.com/llvm/llvm-project/pull/135878 ___ 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   >