[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/28320 Here is the rel

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Seems like a reasonable assumption for now. THOUGH, I wonder if we'd be better off at one point instead to figure out which ones we DO know how to handle, and use the 'nobuiltin' as a fallback instead? That way we can exercise the bui

[clang] [Clang] Explain why is_standard_layout evaluated to false (PR #143722)

2025-06-12 Thread Samarth Narang via cfe-commits
@@ -488,3 +488,83 @@ static_assert(__is_trivially_copyable(S12)); // expected-note@-1 {{'S12' is not trivially copyable}} \ // expected-note@#tc-S12 {{'S12' defined here}} } + +namespace standard_layout_tests { +struct WithVirtual { // #sl-Virtual + virtual void foo(); +};

[clang] [CIR] Upstream support for emitting constructors (PR #143639)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-debug-reverse-iteration` running on `linaro-flang-aarch64-debug-reverse-iteration` while building `clang` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/bui

[clang] [Clang] Explain why is_standard_layout evaluated to false (PR #143722)

2025-06-12 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/143722 >From b92f63bcd8b9910278102353bed4db6b433629ce Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Mon, 2 Jun 2025 19:30:39 -0400 Subject: [PATCH 1/2] Add std layout diagnostics Add diagnostic test cases ---

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-12 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/143487 >From 5825b324e47c78a939d8e62d1101e1574fd04638 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Tue, 10 Jun 2025 15:50:10 +0800 Subject: [PATCH 1/5] [-Wunterminated-string-initialization] Handle C string li

[clang] [ASTReader] Remove assert in GetExternalDeclStmt (PR #143739)

2025-06-12 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > I think we shouldn't remove the assertion. Your test passes with the > > removal of the assertion since the initializers are not complex. So it ends > > quickly. But if it is a complex initialization which triggers more > > deserialization, I feel it will be problematic.

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/34690 Here is

[clang] 7232c07 - Reland [HIP] use offload wrapper for non-device-only non-rdc (#143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-06-12T21:41:41-04:00 New Revision: 7232c07eb97d5c21d47a661c9cca8981c7f91698 URL: https://github.com/llvm/llvm-project/commit/7232c07eb97d5c21d47a661c9cca8981c7f91698 DIFF: https://github.com/llvm/llvm-project/commit/7232c07eb97d5c21d47a661c9cca8981c7f91698.dif

[clang] 8890706 - Revert "Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (#143964)"

2025-06-12 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-06-12T21:33:05-04:00 New Revision: 8890706db67384a423773cc921302dd63d950ef5 URL: https://github.com/llvm/llvm-project/commit/8890706db67384a423773cc921302dd63d950ef5 DIFF: https://github.com/llvm/llvm-project/commit/8890706db67384a423773cc921302dd63d950ef5.dif

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-multistage` running on `ppc64le-clang-multistage-test` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/76/builds/10425 Here is th

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-key-instructions` running on `sie-linux-worker5` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/208/builds/1948 Here

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-global-isel` running on `linaro-clang-aarch64-global-isel` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/125/builds/8357 Here is the

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -628,10 +628,13 @@ class ASTContext : public RefCountedBase { getRelocationInfoForCXXRecord(const CXXRecordDecl *) const; void setRelocationInfoForCXXRecord(const CXXRecordDecl *, CXXRecordDeclRelocationInfo); + bool containsAddressD

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -15121,6 +15155,21 @@ ASTContext::baseForVTableAuthentication(const CXXRecordDecl *ThisClass) { return PrimaryBase; } +bool ASTContext::hasAddressDiscriminatedVTableAuthentication( ojhunt wrote: Which function? https://github.com/llvm/llvm-project/pull

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
@@ -1705,6 +1705,40 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +bool ASTContext::containsAddressDiscriminatedPointerAuth(QualType T) { + if (!LangOpts.PointerAuthCalls && !LangOpts.PointerAuthIntrinsics) +return false; + +

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/143969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes The code to read the "nobuiltins" attributes hasn't been implemented yet, but we were defaulting to the assumption that use of builtins is allowed for function calls that we recognize as standard C libra

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes The code to read the "nobuiltins" attributes hasn't been implemented yet, but we were defaulting to the assumption that use of builtins is allowed for function calls that we recognize as standard C library

[clang] [CIR] Change default assumption about allowing builtins (PR #144004)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/144004 The code to read the "nobuiltins" attributes hasn't been implemented yet, but we were defaulting to the assumption that use of builtins is allowed for function calls that we recognize as standard C library c

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/143969 >From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 12 Jun 2025 13:17:11 -0700 Subject: [PATCH 1/2] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

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

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 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,h -- clang/test/SemaCXX/trivially-relocatable-ptrauth.cp

[clang] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable (PR #143969)

2025-06-12 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/143969 >From f47680310ed68a9f8e8cb15bc1cd474740072463 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 12 Jun 2025 13:17:11 -0700 Subject: [PATCH 1/2] [clang] Fix PointerAuth semantics of cpp_trivially_relocatable

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 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` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/19330 Her

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 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,h -- clang/include/clang/Tooling/DependencyScanning/Depe

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes While the source code isn't supposed to change during a build, in some environments it does. This adds an option that disables caching of stat failures, meaning that source files can be added to the bui

[clang] [clang][scan-deps] Add option to disable caching stat failures (PR #144000)

2025-06-12 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/144000 While the source code isn't supposed to change during a build, in some environments it does. This adds an option that disables caching of stat failures, meaning that source files can be added to the build dur

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/143980 >From 3041ad6f68f4097dadf0870177eed4e749e915cc Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 4 Jun 2025 10:27:48 -0700 Subject: [PATCH 1/2] [CIR] Support for static variables This adds support for em

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/143964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 22f9b4a - Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (#143964)

2025-06-12 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-06-12T20:08:55-04:00 New Revision: 22f9b4aa1dad597d908be77be1e10ba4c77330ce URL: https://github.com/llvm/llvm-project/commit/22f9b4aa1dad597d908be77be1e10ba4c77330ce DIFF: https://github.com/llvm/llvm-project/commit/22f9b4aa1dad597d908be77be1e10ba4c77330ce.dif

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { if (d.hasExternalStorage()) return; - if (d.getStorageDuration() != SD_Automatic) -cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration"); + if (d.getStorageDuration() !=

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/143964 >From ff3a9dd0765e499573d8d0049aca1d4568ac586f Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 11 Jun 2025 14:02:59 -0400 Subject: [PATCH 1/3] Revert "Revert "[HIP] use offload wrapper for non-devi

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { if (d.hasExternalStorage()) return; - if (d.getStorageDuration() != SD_Automatic) -cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration"); + if (d.getStorageDuration() !=

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
@@ -9249,8 +9249,20 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, // Add the linker arguments to be forwarded by the wrapper. CmdArgs.push_back(Args.MakeArgString(Twine("--linker-path=") + LinkCommand->getEx

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/143964 >From 5f3cc287ff2c3c84ba840ebaa0931773341a02b2 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 11 Jun 2025 14:02:59 -0400 Subject: [PATCH 1/3] Revert "Revert "[HIP] use offload wrapper for non-devi

[clang] [llvm] [mlir] [NFC][AMDGPU] Fix stale links to ROCm repositories (PR #143949)

2025-06-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/143949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reset FileID based diag state mappings (PR #143695)

2025-06-12 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: FWIW, I am seeing an assertion failure when running `check-clang` after this change. ``` $ cmake \ -B build \ -G Ninja \ -S llvm \ -Wno-dev \ -DCLANG_ENABLE_STATIC_ANALYZER=OFF \ -DCLANG_PLUGIN_SUPPORT=OFF \ -DCMAKE_BUILD_TYPE=Releas

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for requiring unwind v2 to be used (equivalent to MSVC's /d2epilogunwindrequirev2) (PR #143577)

2025-06-12 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/143577 >From 082514ffe8cd9086d82cbe0a114dfc736b0518dc Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Fri, 6 Jun 2025 16:39:07 -0700 Subject: [PATCH 1/2] Add support for requiring Win x64 Unwind V2 --- clang

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

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

[clang] 32e1360 - [CIR][NFC] Fix build problems with [[maybe_unused]] (#143994)

2025-06-12 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-12T16:16:14-07:00 New Revision: 32e1360aaa9fbf5e388f9d061fa004b02c0a1359 URL: https://github.com/llvm/llvm-project/commit/32e1360aaa9fbf5e388f9d061fa004b02c0a1359 DIFF: https://github.com/llvm/llvm-project/commit/32e1360aaa9fbf5e388f9d061fa004b02c0a1359.diff L

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha approved this pull request. This fixes the build on my machine with clang 19.1. Thanks! https://github.com/llvm/llvm-project/pull/143994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Andy Kaylor via cfe-commits
andykaylor wrote: I should mention that the problem was introduced by https://github.com/llvm/llvm-project/pull/143932 Top-of-trunk clang doesn't report an error for this situation. https://github.com/llvm/llvm-project/pull/143994 ___ cfe-commits mai

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes A recent commit introduced the use of [[maybe_unused]] following LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled it with clang 14.0, which doesn't support the `preferred_type` attr

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes A recent commit introduced the use of [[maybe_unused]] following LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled it with clang 14.0, which doesn't support the `preferred_type` attrib

[clang] [CIR][NFC] Fix build problems with [[maybe_unused]] (PR #143994)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/143994 A recent commit introduced the use of [[maybe_unused]] following LLVM_PREFFERED_TYPE(bool) on a member variable declaration. I compiled it with clang 14.0, which doesn't support the `preferred_type` attribut

[clang] [flang] [llvm] Fix and reapply IR PGO support for Flang (PR #142892)

2025-06-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks. I'll merge this tomorrow morning (my time), so I can keep an eye on the buildbots, just in case. https://github.com/llvm/llvm-project/pull/142892 ___ cfe-commits mailing list cfe-commi

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Other than the one comment, the frontend related parts LGTM, but please wait for someone more familiar with the OpenMP side of things. https://github.com/llvm/llvm-project/pull/143441 ___ cfe-

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-12 Thread Tarun Prabhu via cfe-commits
@@ -88,6 +88,44 @@ void fir::setTuneCPU(mlir::ModuleOp mod, llvm::StringRef cpu) { mod->setAttr(tuneCpuName, mlir::StringAttr::get(ctx, cpu)); } +static constexpr const char *amdgpuIgnoreDenormalModeName = +"fir.amdgpu.ignore.denormal.mode"; +void fir::setAmdgpuIgnoreDe

[clang] [flang] [mlir] [flang][flang-driver] atomic control support (PR #143441)

2025-06-12 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/143441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
@@ -76,3 +76,21 @@ float constant_fp_builtin_single() { // OGCG: define {{.*}}float @_Z26constant_fp_builtin_singlev() // OGCG: ret float 0x3FB9A000 // OGCG: } + +void library_builtins() { + __builtin_printf(nullptr); mmha wrote: I added `builtin_prin

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/143984 >From c60378591a7d8d156306ff9c840aa319396c4f00 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 13 Jun 2025 00:04:24 +0200 Subject: [PATCH 1/3] [CIR] Add Support For Library Builtins This patch upstreams sup

[clang] [clang] Add diagnostic for usage of implicit constructor with pointer to bool convertion (PR #143990)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ralender) Changes This emits warnings for this code instead of silently creating a new B in place. ```c++ struct B { B(bool V) {} }; void test(const B& b); void test0(B* b) { test(b); // HERE } ``` --- Full diff: https://gith

[clang] [clang] Add diagnostic for usage of implicit constructor with pointer to bool convertion (PR #143990)

2025-06-12 Thread via cfe-commits
https://github.com/Ralender created https://github.com/llvm/llvm-project/pull/143990 This emits warnings for this code instead of silently creating a new B in place. ```c++ struct B { B(bool V) {} }; void test(const B& b); void test0(B* b) { test(b); // HERE } ``` >From f2744c89892d2803

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
@@ -3651,6 +3674,21 @@ static FormatToken *getFunctionName(const AnnotatedLine &Line, continue; } +// Skip past template typename declarations that may precede the +// constructor/destructor name bdunkin wrote: Done. https://github.com/llv

[clang] Reland [HIP] use offload wrapper for non-device-only non-rdc (#132869) (PR #143964)

2025-06-12 Thread Yaxun Liu via cfe-commits
@@ -310,8 +310,8 @@ Error relocateOffloadSection(const ArgList &Args, StringRef Output) { // Remove the old .llvm.offloading section to prevent further linking. ObjcopyArgs.emplace_back("--remove-section"); ObjcopyArgs.emplace_back(".llvm.offloading"); - for (StringRef

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
https://github.com/bdunkin updated https://github.com/llvm/llvm-project/pull/143194 >From 839d068df748189470f2c69eb47714425de9524b Mon Sep 17 00:00:00 2001 From: Ben Dunkin Date: Fri, 6 Jun 2025 12:29:13 -0700 Subject: [PATCH] Fix identifiers not being marked as constructor/destructor names if

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
@@ -3659,9 +3697,23 @@ static FormatToken *getFunctionName(const AnnotatedLine &Line, } // Skip to the unqualified part of the name. -while (Tok->startsSequence(tok::identifier, tok::coloncolon)) { - assert(Tok->Next); - Tok = Tok->Next->Next; +while

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
@@ -3622,6 +3622,29 @@ static unsigned maxNestingDepth(const AnnotatedLine &Line) { return Result; } +static bool startsQualifiedName(const FormatToken *Tok) { + // Consider: A::B::B() + // Tok --^ + if (Tok->startsSequence(tok::identifier, tok::coloncolo

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
@@ -3622,6 +3622,29 @@ static unsigned maxNestingDepth(const AnnotatedLine &Line) { return Result; } +static bool startsQualifiedName(const FormatToken *Tok) { bdunkin wrote: Done. https://github.com/llvm/llvm-project/pull/143194 _

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Ben Dunkin via cfe-commits
https://github.com/bdunkin updated https://github.com/llvm/llvm-project/pull/143194 >From 37c7cde072e25eae0409e162c5080830d182f2dd Mon Sep 17 00:00:00 2001 From: Ben Dunkin Date: Fri, 6 Jun 2025 12:29:13 -0700 Subject: [PATCH] Fix identifiers not being marked as constructor/destructor names if

[clang] [clang-format] Handle templates in qualified typenames (PR #143194)

2025-06-12 Thread Björn Schäpers via cfe-commits
@@ -3651,6 +3674,21 @@ static FormatToken *getFunctionName(const AnnotatedLine &Line, continue; } +// Skip past template typename declarations that may precede the +// constructor/destructor name +if (Tok->is(tok::kw_template)) { Hazardy

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { return emitAutoVarDecl(d); } +static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) { + if (cgm.getLangOpts().CPlusPlus) +return cgm.getMangledName(&d).str(); + + // If this

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -185,11 +185,23 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { global.getSymName()); } + mlir::Value createGetGlobal(cir::GlobalOp global) { +return createGetGlobal(global.getLoc(), global); + } + cir::StoreOp createStore

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Minor suggestions, else LGTM. https://github.com/llvm/llvm-project/pull/143980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/143980 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Erich Keane via cfe-commits
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) { if (d.hasExternalStorage()) return; - if (d.getStorageDuration() != SD_Automatic) -cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration"); + if (d.getStorageDuration() !=

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
@@ -479,6 +479,275 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32, return ret; } +#define INTRINSIC_LOAD(func_name, asm_op, decl_type, internal_type, asm_type) \ Artem-B wrote: We have to be careful with the names used in th

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B requested changes to this pull request. Nice. I like this approach better. There are few more things to polish up, but it looks good overall. https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
@@ -479,6 +479,275 @@ inline __device__ unsigned __funnelshift_rc(unsigned low32, unsigned high32, return ret; } +#define INTRINSIC_LOAD(func_name, asm_op, decl_type, internal_type, asm_type) \ Artem-B wrote: Can we merge `INTRINSIC*` and `MINTRINSIC*` mac

[clang] Add missing intrinsics to cuda headers (PR #143664)

2025-06-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/143664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/143984 >From c60378591a7d8d156306ff9c840aa319396c4f00 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 13 Jun 2025 00:04:24 +0200 Subject: [PATCH 1/2] [CIR] Add Support For Library Builtins This patch upstreams sup

[clang-tools-extra] [clang-tidy] add AllowedTypes option to misc-const-correctness (PR #122951)

2025-06-12 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,180 @@ +// RUN: %check_clang_tidy %s misc-const-correctness %t -- \ +// RUN: -config="{CheckOptions: {\ +// RUN: misc-const-correctness.AllowedTypes: '[Pp]ointer$;[Pp]tr$;[Rr]ef(erence)?$;qualified::Type;::fully::QualifiedType;ConstTemplate', \ +// RUN: misc

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Morris Hafner (mmha) Changes This patch upstreams support for builtins that map to a standard library function. Examples would be abort() and printf(). It also fixes a minor issue with the errorNYI for all rem

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/143984 This patch upstreams support for builtins that map to a standard library function. Examples would be abort() and printf(). It also fixes a minor issue with the errorNYI for all remaining unimplemented builtins usi

[clang] [llvm] [Transforms] Implement always_specialize attribute lowering (PR #143983)

2025-06-12 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: Discourse RFC is at https://github.com/llvm/llvm-project/pull/143983 https://github.com/llvm/llvm-project/pull/143983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [Transforms] Implement always_specialize attribute lowering (PR #143983)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Jon Chesterfield (JonChesterfield) Changes Implement an attribute in the spirit of always_inline, for giving programmers a hook to have llvm specialise subtrees of their program with respect to constant variables. For example, spe

[clang] [llvm] [Transforms] Implement always_specialize attribute lowering (PR #143983)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jon Chesterfield (JonChesterfield) Changes Implement an attribute in the spirit of always_inline, for giving programmers a hook to have llvm specialise subtrees of their program with respect to constant variables. For example, specialise

[clang] [llvm] [Transforms] Implement always_specialize attribute lowering (PR #143983)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Jon Chesterfield (JonChesterfield) Changes Implement an attribute in the spirit of always_inline, for giving programmers a hook to have llvm specialise subtrees of their program with respect to constant variables. For example, s

[clang] [llvm] [Transforms] Implement always_specialize attribute lowering (PR #143983)

2025-06-12 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield created https://github.com/llvm/llvm-project/pull/143983 Implement an attribute in the spirit of always_inline, for giving programmers a hook to have llvm specialise subtrees of their program with respect to constant variables. For example, specialise a sort

[clang] [CIR] Add support for delegating constructors (PR #143932)

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

[clang] 4a4035c - [CIR] Add support for delegating constructors (#143932)

2025-06-12 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-06-12T14:52:07-07:00 New Revision: 4a4035c86b0dd2b1aa09bb2ff4b6788c2bf88745 URL: https://github.com/llvm/llvm-project/commit/4a4035c86b0dd2b1aa09bb2ff4b6788c2bf88745 DIFF: https://github.com/llvm/llvm-project/commit/4a4035c86b0dd2b1aa09bb2ff4b6788c2bf88745.diff L

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This adds support for emitting static variables and their initializers. --- Patch is 21.07 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/143980.diff 8 File

[clang] [CIR] Support for static variables (PR #143980)

2025-06-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/143980 This adds support for emitting static variables and their initializers. >From 3041ad6f68f4097dadf0870177eed4e749e915cc Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 4 Jun 2025 10:27:48 -0700 Subject:

[clang] [clang][Sema] Fixed Compound Literal is not Constant Expression (PR #143852)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
@@ -7219,6 +7219,17 @@ Sema::ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty, return BuildCompoundLiteralExpr(LParenLoc, TInfo, RParenLoc, InitExpr); } +static bool IsInsideFunction(Scope *S) { shafik wrote: @AaronBallman it feels like it make

[clang] [Clang][NFC] Move Input into SmallVector instead of copy (PR #143830)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/143830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-06-12 Thread Victor Lomuller via cfe-commits
https://github.com/Naghasan ready_for_review https://github.com/llvm/llvm-project/pull/143909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-06-12 Thread Victor Lomuller via cfe-commits
https://github.com/Naghasan updated https://github.com/llvm/llvm-project/pull/143909 >From 049087b07503add00192211b8ee96bdfebcfeed3 Mon Sep 17 00:00:00 2001 From: Victor Lomuller Date: Thu, 5 Jun 2025 16:17:10 +0100 Subject: [PATCH] [SPIRV] Add more id and range builtIns The patch adds intrins

[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-12 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/143205 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-12 Thread via cfe-commits
@@ -219,6 +219,12 @@ Changes in existing checks tolerating fix-it breaking compilation when functions is used as pointers to avoid matching usage of functions within the current compilation unit. +- Improved :doc: `bugprone-sizeof-expression + ` check. + + Introduced WarnO

[clang] e4c32a4 - [Clang][NFC] Move Input into SmallVector instead of copy (#143830)

2025-06-12 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-06-12T14:30:59-07:00 New Revision: e4c32a4147012da735205eb44a45b8be5eea048d URL: https://github.com/llvm/llvm-project/commit/e4c32a4147012da735205eb44a45b8be5eea048d DIFF: https://github.com/llvm/llvm-project/commit/e4c32a4147012da735205eb44a45b8be5eea048d.dif

[clang] [Clang][Sema] Apply CWG400 'Using-declarations and the "struct hack"' to C++98 mode (PR #143492)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
@@ -13632,82 +13632,36 @@ bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, RequireCompleteDeclContext(const_cast(SS), NamedContext)) return true; - if (getLangOpts().CPlusPlus11) { -// C++11 [namespace.udecl]p3: -// In a using

[clang] [Clang][Sema] Apply CWG400 'Using-declarations and the "struct hack"' to C++98 mode (PR #143492)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: @Endilll has been handling a lot of conformance testing, so please wait for more feedback from him before landing. https://github.com/llvm/llvm-project/pull/143492 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Clang][Sema] Apply CWG400 'Using-declarations and the "struct hack"' to C++98 mode (PR #143492)

2025-06-12 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/143492 ___ 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   7   8   9   10   >