[clang] [analyzer] Indicate UnarySymExpr is not supported by Z3 (PR #108900)

2024-09-18 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/108900 >From 754ae098e55cd9ea6f7ebeed37aad761598af0f2 Mon Sep 17 00:00:00 2001 From: einvbri Date: Tue, 17 Sep 2024 01:25:20 +0200 Subject: [PATCH] [analyzer] Indicate UnarySymExpr is not supported by Z3 Random tes

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread via cfe-commits
cor3ntin wrote: I think that if we don't have a fix in the next 24-48 hours, and no clarity on the issue - a revert should be considered (note that I think it will be disruptive for llvm too as we are, I think, 3 patches deep, but i agree that keeping a regression on trunk for too long is unde

[clang-tools-extra] [include-cleaner] Suppress all clang warnings (PR #109099)

2024-09-18 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/109099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][CMake] Add CSSPGO support to LLVM_BUILD_INSTRUMENTED (PR #79942)

2024-09-18 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/79942 >From efac76027bd9294d734c3eee77ad582ad0fa9ebe Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Wed, 19 Jul 2023 20:30:29 -0700 Subject: [PATCH] [Clang][CMake] Add CSSPGO support to LLVM_BUILD_INSTRUMENTED Build

[clang-tools-extra] 1be4c97 - [clang-tidy][readability-container-contains] Extend to any class with contains (#107521)

2024-09-18 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-09-18T14:57:31-04:00 New Revision: 1be4c9710bd09e2f56908ca6cee54cb80ca1774d URL: https://github.com/llvm/llvm-project/commit/1be4c9710bd09e2f56908ca6cee54cb80ca1774d DIFF: https://github.com/llvm/llvm-project/commit/1be4c9710bd09e2f56908ca6cee54cb80ca1774d.

[clang] [Clang] Automatically link the `compiler-rt` for GPUs if present (PR #109152)

2024-09-18 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I guess that makes sense. https://github.com/llvm/llvm-project/pull/109152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][readability-container-contains] Extend to any class with contains (PR #107521)

2024-09-18 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank closed https://github.com/llvm/llvm-project/pull/107521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Automatically link the `compiler-rt` for GPUs if present (PR #109152)

2024-09-18 Thread Shilei Tian via cfe-commits
shiltian wrote: I'm not sure about this. What does `compiler-rt` provide? https://github.com/llvm/llvm-project/pull/109152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Automatically link the `compiler-rt` for GPUs if present (PR #109152)

2024-09-18 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'm not sure about this. What does `compiler-rt` provide? It's `clang_rt.builtins`. So, basically complex number multiplication / division, wide integer stuff (I think the backend handles i128 now though). We currently have a wrapper header that defined `__mulsc3` for the devi

[clang] [HLSL] Warn about incomplete language support (PR #108894)

2024-09-18 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. LGTM, I'm happy to get this warning in! https://github.com/llvm/llvm-project/pull/108894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [llvm] [clang][OpenMP] Add codegen for scope directive (PR #109197)

2024-09-18 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,2267 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filechec

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: It was faster than I thought. The original code for case 2 is indeed invalid. Having looked carefully at the two definitions of PrintTo, I clearly see they are violating ODR. And both are originating in the internal code, so nothing specific to Eigen. Thanks again for the good ex

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2024-09-18 Thread John McCall via cfe-commits
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return Visit(const_cast(E)); case CK_NoOp: { -return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE) - : Visit(const_cast(E)); +i

[clang] abb317f - [clang-tidy] Fix performance-unnecessary-value-param (#109145)

2024-09-18 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-18T14:18:04-07:00 New Revision: abb317ff9aba8a58449d91f6162597e54d02a57c URL: https://github.com/llvm/llvm-project/commit/abb317ff9aba8a58449d91f6162597e54d02a57c DIFF: https://github.com/llvm/llvm-project/commit/abb317ff9aba8a58449d91f6162597e54d02a57c.diff L

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/109145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e0ad34e - [clang] Use canonical type for substitution which might be incomplete (#109065)

2024-09-18 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-09-18T18:22:14-03:00 New Revision: e0ad34e56590fa2e6ffdf617e044de7eadee2139 URL: https://github.com/llvm/llvm-project/commit/e0ad34e56590fa2e6ffdf617e044de7eadee2139 DIFF: https://github.com/llvm/llvm-project/commit/e0ad34e56590fa2e6ffdf617e044de7eadee2139.dif

[clang] [clang] Use canonical type for substitution which might be incomplete (PR #109065)

2024-09-18 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/109065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][powerpc][wasm][systemz][x86] Replace target vector popcount intrinsics with __builtin_elementwise_popcount (PR #109160)

2024-09-18 Thread Thomas Lively via cfe-commits
https://github.com/tlively commented: WebAssembly changes LGTM. https://github.com/llvm/llvm-project/pull/109160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Delete unused clang-formatted-files.txt file (PR #109220)

2024-09-18 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From d8a46761ef175194c7e7272313807d2ef25aa497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 18 Sep 2024 17:04:44 + Subject: [PATCH] [clang-tidy] Make modernize-use-nullptr matcher

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Thomas Köppe via cfe-commits
@@ -84,6 +84,14 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + T x; +}; +void test_templated() { + pear p = { NULL }; tkoeppe wrote: Done now. A key insight was that the test defines `NULL` as `0`, so in order for the new che

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
eddyz87 wrote: @peilin-ye , > However, I didn't want to use `lock` because I feel like it's too similar to > the x86 `LOCK` prefix (implies a full memory barrier, which could be > confusing here). WDYT? Cc: @yonghong-song @4ast Well, we already confuse people in a way, since existing `lock *

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
eddyz87 wrote: > > Also a question regarding 3 commits in one pull request. As far as I > > understand [current](https://llvm.org/docs/GitHub.html) policy, the idea is > > to have a separate pull request for each commit (and fork branches from one > > another to build a stack). Otherwise the c

[clang] [clang-tools-extra] Remove clang-pseudo (PR #109154)

2024-09-18 Thread Younan Zhang via cfe-commits
zyn0217 wrote: For visibility, see the last attempt at removal: https://github.com/llvm/llvm-project/pull/80081 AFAIK, some Clangd features e.g. code folding, are still relying on it, so ditching it completely is probably not an option at the moment. https://github.com/llvm/llvm-project/pull/

[clang] [llvm] Buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol should not be supported in GFX940 (PR #109223)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Jun Wang (jwanggit86) Changes Three instructions, namely, buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol are obsolete in GFX940 and should not be supported. --- Patch is 211.53 KiB, truncated to 20.00 KiB below, full version:

[clang] [llvm] Buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol should not be supported in GFX940 (PR #109223)

2024-09-18 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 closed https://github.com/llvm/llvm-project/pull/109223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Buffer_store_lds_dword, buffer_wbinvl1, and buffer_wbinvl1_vol should not be supported in GFX940 (PR #109223)

2024-09-18 Thread Jun Wang via cfe-commits
jwanggit86 wrote: Based off wrong branch. https://github.com/llvm/llvm-project/pull/109223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 258fc7f - [Clang] Fix -ast-dump-decl-types crashes on concepts (#108142)

2024-09-18 Thread via cfe-commits
Author: ofAlpaca Date: 2024-09-19T08:33:37+08:00 New Revision: 258fc7f582877d3bc2a26e62da4f50e467d8c640 URL: https://github.com/llvm/llvm-project/commit/258fc7f582877d3bc2a26e62da4f50e467d8c640 DIFF: https://github.com/llvm/llvm-project/commit/258fc7f582877d3bc2a26e62da4f50e467d8c640.diff LOG:

[clang] -ast-dump-decl-types crashes on codes involving concepts #94928 (PR #108142)

2024-09-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/108142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current CWG direction for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: In case I don't get a chance to look at this in more detail right away can you please reference specific CWG issues in the summary and in comments in the code? Thank you. https://github.com/llvm/llvm-project/pull/109208 _

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-18 Thread Jun Wang via cfe-commits
@@ -678,6 +690,37 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/108786 >From cad9ac7478a158c455b8865cab8bb553a46f7773 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 17 Sep 2024 21:47:45 -0400 Subject: [PATCH] [IR] Introduce `T` to `DataLayout` to represent flat address spa

[clang] [flang] [clang][flang] Support -time in both clang and flang (PR #109165)

2024-09-18 Thread Tarun Prabhu via cfe-commits
tarunprabhu wrote: The buildkite is failing on Windows because `flang` does not print anything on Windows. It is not clear to me why this is the case. I do not have access to a windows machine on which to debug this. The test, `time.f90` has been disabled on Windows with a comment explaining w

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-18 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/109180 This PR adds the step intrinsic and an HLSL function that uses it. The SPIRV backend is also implemented. Used https://github.com/llvm/llvm-project/pull/106471 as a reference. Fixes https://github.com/llvm/llvm

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joshua Batista (bob80905) Changes This PR adds the step intrinsic and an HLSL function that uses it. The SPIRV backend is also implemented. Used https://github.com/llvm/llvm-project/pull/106471 as a reference. Fixes https://github.

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-18 Thread Justin Bogner via cfe-commits
@@ -13,23 +13,23 @@ namespace hlsl { namespace __detail { -#define _HLSL_INLINE \ - __attribute__((__always_inline__, __nodebug__)) static inline bogner wrote: Note that while constexpr implies `inl

[clang] [llvm] Add cross builtins and cross HLSL function to DirectX and SPIR-V backend (PR #109180)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx Author: Joshua Batista (bob80905) Changes This PR adds the step intrinsic and an HLSL function that uses it. The SPIRV backend is also implemented. Used https://github.com/llvm/llvm-project/pull/106471 as a reference. Fixes https://githu

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread Peilin Ye via cfe-commits
@@ -69,29 +69,25 @@ void BPFSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { CPU = "v3"; if (CPU == "probe") CPU = sys::detail::getHostCPUNameForBPF(); - if (CPU == "generic" || CPU == "v1") + if (CPU.empty() || CPU == "generic" || CPU == "v1") -

[clang] [Clang][NFC] Remove incorrect SYCL tests (PR #109182)

2024-09-18 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > Instead of removing the test case altogether, does it not suffice to remove > > the SYCL reference / SYCL specific flag, which I interpret as the problem > > being addressed? SYCL per se is not a target, but rather a language? > > Apologies if I'm missing something. > > I t

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Thomas Köppe via cfe-commits
@@ -84,6 +84,14 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + T x; +}; +void test_templated() { + pear p = { NULL }; tkoeppe wrote: It definitely does, but I was hoping that the absence would cause some kind of test failure!

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From d6a67729477b178d2439dfd31539a82ab7041e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 18 Sep 2024 17:04:44 + Subject: [PATCH 1/2] [clang-tidy] Make modernize-use-nullptr mat

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Thanks for the clarification! The fact that there's code around that isn't quite following the standard, is not news, but the regular way to approach tightening the compiler is to provide an opt-out mechanism for some time (one release cycle?) in the shape of a flag or otherwise

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: > However, I suspect that the parentheses reduction and the one with a ternary > are actually the same issue - The code is IFNDR per > https://eel.is/c++draft/temp.over.link#5 > > In you last example, M*2 and the conditional with M+N after the substitution > of the default argum

[clang] Implement current CWG direction for string literal comparisons. (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 1/2] Implement current CWG direction for string literal compari

[clang] [clang] implement current CWG direction for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Richard Smith (zygoloid) Changes Track the identity of each string literal object produced by evaluation with a global version number. Accept comparisons between literals of the same version, and between literals of different versions that

[clang] Implement current CWG direction for string literal comparisons. (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid ready_for_review https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current CWG direction for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu created https://github.com/llvm/llvm-project/pull/109210 Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 >From c5c827ab2c65da7b

[clang] Implement current CWG direction for string literal comparisons. (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid created https://github.com/llvm/llvm-project/pull/109208 Track the identity of each string literal object produced by evaluation with a global version number. Accept comparisons between literals of the same version, and between literals of different versions that cann

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Tarun Prabhu (tarunprabhu) Changes Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 --- Full dif

[clang] [flang] [flang][Driver] Support -fdiagnostics-color (PR #109210)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Tarun Prabhu (tarunprabhu) Changes Add support for -fdiagnostics-color and -fdiagnostics-color=. Add documentation for -fdiagnostics-color= which should also be visible in clang. Partially addresses requests in #89888 --- Full dif

[clang] [clang] implement current CWG direction for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 1/3] Implement current CWG direction for string literal compari

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Wow, I would never have thought it was a problem. Making these the same type > removes the compilation error. Can you explain why this is a problem from the > C++ standard PoV? That's https://eel.is/c++draft/temp.deduct.type#20 In deduced contexts for an NTTP, the type of th

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2024-09-18 Thread John McCall via cfe-commits
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return Visit(const_cast(E)); case CK_NoOp: { -return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE) - : Visit(const_cast(E)); +i

[clang] fix(clang/**.py): fix comparison to None (PR #94014)

2024-09-18 Thread Eisuke Kawashima via cfe-commits
e-kwsm wrote: This PR is ready but I have no permission. https://github.com/llvm/llvm-project/pull/94014 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: I see. A clear diagnostic wouldn't hurt indeed. Thanks a lot for the analysis! No more concerns from our side at this point. https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang-scan-deps] Don't inspect Args[0] as an option (PR #109050)

2024-09-18 Thread Jan Svoboda via cfe-commits
@@ -839,9 +839,11 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { auto R = std::make_reverse_iterator(FlagsEnd); for (auto I = R, E = Args.rend(); I != E; ++I) { StringRef Arg = *I; +if ((I + 1) == E)

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Thomas Köppe via cfe-commits
https://github.com/tkoeppe updated https://github.com/llvm/llvm-project/pull/109169 From 6e056a2aad2b9b7957c18c8dfb8f64a44c7c785f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 18 Sep 2024 17:04:44 + Subject: [PATCH] [clang-tidy] Make modernize-use-nullptr matcher

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-09-18 Thread Michael Buch via cfe-commits
Michael137 wrote: > This change leads to a crash in `ConstStructBuilder::Build()` for the > following program: > > ``` > struct S { > }; > > union U { > struct S s; > int x; > }; > > void foo() { > union U bar = {}; > } > ``` > > `isEmptyRecordForLayout` returns false for `union

[clang] [PAC] Re-sign a pointer to a noexcept member function when it is converted to a pointer to a member function without noexcept (PR #109056)

2024-09-18 Thread Akira Hatanaka via cfe-commits
@@ -2419,8 +2419,13 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return Visit(const_cast(E)); case CK_NoOp: { -return CE->changesVolatileQualification() ? EmitLoadOfLValue(CE) - : Visit(const_cast(E)); +i

[clang] [Clang] Automatically link the `compiler-rt` for GPUs if present (PR #109152)

2024-09-18 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I like this direction and I think it should be the right way. However, IMHO, > I think it needs discussion (and potentially an RFC). Moving from the header to the definition in `compiler-rt` would warrant an RFC, this patch just automatically links something that exists and wi

[clang] [Clang][NFC] Remove incorrect SYCL tests (PR #109182)

2024-09-18 Thread via cfe-commits
https://github.com/elizabethandrews created https://github.com/llvm/llvm-project/pull/109182 The tests added for SYCL device compilation in https://github.com/llvm/llvm-project/pull/88182 are incorrect SYCL tests. Code technically should not have been emitted in SYCL device compilation for the

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-09-18 Thread Pavel Yaskevich via cfe-commits
@@ -6037,13 +6038,24 @@ class AttributedType : public Type, public llvm::FoldingSetNode { private: friend class ASTContext; // ASTContext creates these + const Attr *Attribute; + QualType ModifiedType; QualType EquivalentType; AttributedType(QualType canon, attr

[clang] [Clang][NFC] Remove incorrect SYCL tests (PR #109182)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (elizabethandrews) Changes The tests added for SYCL device compilation in https://github.com/llvm/llvm-project/pull/88182 are incorrect SYCL tests. Code technically should not have been emitted in SYCL device compilation for these t

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-18 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > For the Mips backend itself, I would ask the Mips backend code > > maintainer... but we don't have a maintainer for Mips. And we don't have > > any buildbots. I'm really not sure about adding complexity to a backend > > which is already suffering from a lack of anyone that

[clang] [llvm] [Clang][CMake] Add CSSPGO support to LLVM_BUILD_INSTRUMENTED (PR #79942)

2024-09-18 Thread Amir Ayupov via cfe-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/79942 >From 2a5a3f2f55bd2b7479278fa72f6f05e54033532c Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Wed, 19 Jul 2023 20:30:29 -0700 Subject: [PATCH] [Clang][CMake] Add CSSPGO support to LLVM_BUILD_INSTRUMENTED Build

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-18 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,14 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + T x; +}; +void test_templated() { + pear p = { NULL }; fmayer wrote: Doesn't this need some `CHECK` or `CHECK-NOT`? https://github.com/llvm/llvm-project/pull/1091

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove feature sha1 from FMV. (PR #108383)

2024-09-18 Thread Andrew Carlotti via cfe-commits
@@ -33,7 +33,6 @@ enum CPUFeatures { FEAT_FP, FEAT_SIMD, FEAT_CRC, - FEAT_SHA1, andrewcarlotti wrote: > And the clang and gcc implementations of FMV are already ABI incompatible for > other reasons. Are they? I'm not currently aware of any incompatibil

[clang-tools-extra] [clang-tidy][readability-container-contains] Use hasOperands when possible (PR #109178)

2024-09-18 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/109178 Simplifies two cases and matches two new cases previously missing, `container.end() [!=]= container.find(...)`. I had split this change from #107521 for easier review. >From a8b8ce089e9eeadf1b8b424e426f7372

[clang-tools-extra] [clang-tidy][readability-container-contains] Use hasOperands when possible (PR #109178)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nicolas van Kempen (nicovank) Changes Simplifies two cases and matches two new cases previously missing, `container.end() [!=]= container.find(...)`. I had split this change from #107521 for easier review. --- Full diff: ht

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
https://github.com/eddyz87 edited https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-18 Thread Alex Voicu via cfe-commits
@@ -766,8 +766,19 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr *Expr, Address Dest, // LLVM atomic instructions always have synch scope. If clang atomic // expression has no scope operand, use default LLVM synch scope. if (!ScopeModel) { +llvm::SyncSc

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: It's one thing that we might tweak the rules to account for redundant parenthesis. But the more complete example shows there is no way to order these unrelated things. Note that we hadn't so far implemented these rules for partial ordering of function templates, but the same i

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
@@ -69,29 +69,25 @@ void BPFSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { CPU = "v3"; if (CPU == "probe") CPU = sys::detail::getHostCPUNameForBPF(); - if (CPU == "generic" || CPU == "v1") + if (CPU.empty() || CPU == "generic" || CPU == "v1") -

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
https://github.com/eddyz87 edited https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
@@ -621,6 +642,16 @@ let Predicates = [BPFHasLdsx] in { def LDD : LOADi64; +class acquiring_load +: PatFrag<(ops node:$ptr), (base node:$ptr)> { + let IsAtomic = 1; eddyz87 wrote: Note: in #107343 we decided to fallback to more strong orderings if there

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-18 Thread via cfe-commits
https://github.com/eddyz87 commented: I think this looks fine, but syntax seems like it adds to zoo we already have. E.g. there are already instructions like `lock *(u32 *)(r1 + 0x0) &= w2` and we treat these as having `monotonic` / `memory_order_relaxed` semantics (see #107343). It seems, to m

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove feature sha1 from FMV. (PR #108383)

2024-09-18 Thread Eli Friedman via cfe-commits
@@ -33,7 +33,6 @@ enum CPUFeatures { FEAT_FP, FEAT_SIMD, FEAT_CRC, - FEAT_SHA1, efriedma-quic wrote: We've generally been more conservative with compiler-rt.builtins compared with other parts of compiler-rt, like sanitizers. People do ship static lib

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-09-18 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Wow, I would never have thought it was a problem. Making these the same type removes the compilation error. Can you explain why this is a problem from the C++ standard PoV? https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commit

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-18 Thread via cfe-commits
goldsteinn wrote: ping5 https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-09-18 Thread Jun Wang via cfe-commits
@@ -434,6 +434,15 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +for (Instruction &I : instructions(F)) { + if (isa(I) && jwanggit86 wrote: @arsenm Following constants to see if

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Increase VecLib bitfield size to 4 bits in CodeGenOptions.def (PR #108804)

2024-09-18 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 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/7718 Here is the relevant piece of the b

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-09-18 Thread Eli Friedman via cfe-commits
@@ -870,6 +904,15 @@ bool ConstStructBuilder::Build(const APValue &Val, const RecordDecl *RD, if (!EltInit) return false; +if (ZeroInitPadding) { + if (!DoZeroInitPadding(Layout, FieldNo, *Field, SizeSoFar, + IsFlexibleArray, All

[clang] [clang] Increase VecLib bitfield size to 4 bits in CodeGenOptions.def (PR #108804)

2024-09-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/7937 Here is the relevant piece of the b

[clang] Revert update-verify-tests.py (PR #109171)

2024-09-18 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn created https://github.com/llvm/llvm-project/pull/109171 This reverts commits c96ee0ffaf5ee7afa1f4b0be0662852f57b47244 and 9ceb9676678ad979a0b767450855d7852ce6a553. Discussion in github PR #108658. >From 0c8a40ed24b0b5f319fd2fb49a27703dc7f1 Mon Sep 17 00:00:00

[clang] Revert update-verify-tests.py (PR #109171)

2024-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrik G. Olsson (hnrklssn) Changes This reverts commits c96ee0ffaf5ee7afa1f4b0be0662852f57b47244 and 9ceb9676678ad979a0b767450855d7852ce6a553. Discussion in github PR #108658. --- Patch is 34.08 KiB, truncated to 20.00 KiB below, full

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: I cannot immediately think of common ways in which an iterator stays valid, but if you don't enable assertions or `LLVM_ENABLE_ABI_BREAKING_CHECKS`, you may be able to avoid a crash although that doesn't necessarily mean that clang-tidy i

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-18 Thread via cfe-commits
https://github.com/MichelleCDjunaidi updated https://github.com/llvm/llvm-project/pull/106675 >From 08324e3586acb16cbf010fd6013c21f2b5faa64e Mon Sep 17 00:00:00 2001 From: MichelleCDjunaidi <87893361+michellecdjuna...@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:55:16 +0800 Subject: [PATC

[clang-tools-extra] Add clang-tidy external examples (PR #106675)

2024-09-18 Thread via cfe-commits
MichelleCDjunaidi wrote: I will need help to merge this once approved. Thank you so much! https://github.com/llvm/llvm-project/pull/106675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] 13502c7 - Revert update-verify-tests.py (#109171)

2024-09-18 Thread via cfe-commits
Author: Henrik G. Olsson Date: 2024-09-18T10:51:53-07:00 New Revision: 13502c7f2c053b2a060f7b9926328cfda46404de URL: https://github.com/llvm/llvm-project/commit/13502c7f2c053b2a060f7b9926328cfda46404de DIFF: https://github.com/llvm/llvm-project/commit/13502c7f2c053b2a060f7b9926328cfda46404de.di

[clang] f212826 - [HLSL][NFC] Remove RegisterBindingFlags struct (#108924)

2024-09-18 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-18T10:51:30-07:00 New Revision: f2128267c26e548bef59209e7a351ff94d343bf3 URL: https://github.com/llvm/llvm-project/commit/f2128267c26e548bef59209e7a351ff94d343bf3 DIFF: https://github.com/llvm/llvm-project/commit/f2128267c26e548bef59209e7a351ff94d343bf3.diff

[clang] [HLSL][NFC] Remove RegisterBindingFlags struct (PR #108924)

2024-09-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/108924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert update-verify-tests.py (PR #109171)

2024-09-18 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn closed https://github.com/llvm/llvm-project/pull/109171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Increase VecLib bitfield size to 4 bits in CodeGenOptions.def (PR #108804)

2024-09-18 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 5 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/9302 Here is the relevant piece

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/109145 >From c230f7e30e60f11c5675ec1dd9f49f5f6378dc6f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 18 Sep 2024 00:19:25 -0700 Subject: [PATCH 1/2] [clang-tidy] Fix performance-unnecessary-value-param T

[clang] [clang-tools-extra] [clang-tidy] Fix performance-unnecessary-value-param (PR #109145)

2024-09-18 Thread Kazu Hirata via cfe-commits
@@ -118,10 +118,19 @@ class FunctionParmMutationAnalyzer { static FunctionParmMutationAnalyzer * getFunctionParmMutationAnalyzer(const FunctionDecl &Func, ASTContext &Context, ExprMutationAnalyzer::Memoized &Memorized) { -auto [it, Ins

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Timm Baeder via cfe-commits
@@ -96,6 +96,8 @@ def note_constexpr_pointer_constant_comparison : Note< "at runtime">; def note_constexpr_literal_comparison : Note< "comparison of addresses of literals has unspecified value">; +def note_constexpr_opaque_call_comparison : Note< + "comparison against opaq

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Timm Baeder via cfe-commits
@@ -2061,15 +2063,21 @@ static bool EvaluateIgnoredValue(EvalInfo &Info, const Expr *E) { return true; } -/// Should this call expression be treated as a no-op? -static bool IsNoOpCall(const CallExpr *E) { +/// Should this call expression be treated as forming an opaque con

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-18 Thread Timm Baeder via cfe-commits
@@ -2142,11 +2150,81 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

  1   2   3   4   5   >