[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @shafik: Since this is a generated file, it is very easy to regenerate after a revert with `python3 clang/www/make_cxx_dr_status && git commit -am '[Clang][NFC] Update cxx_dr_status.html'` @Endilll: I've removed the other changes from `cxx_dr_status.html` manually from this

[clang] [Clang] Reject `this void` explicit object parameters (CWG2915) (PR #108817)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/108817 >From f283645de806c71d93ec10bc7fcb933ccbfee156 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 16 Sep 2024 12:22:01 +0100 Subject: [PATCH 1/2] [Clang] Reject "this void" (CWG2915) --- clang/docs/Relea

[clang] [Clang][Sema] Fix templated array size calculation. (PR #96464)

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

[clang] Try to fix llvm/llvm-project#41441 (PR #96464)

2024-09-16 Thread via cfe-commits
https://github.com/awson updated https://github.com/llvm/llvm-project/pull/96464 >From 096b999120cc28844d780acbc16f8308b3a54160 Mon Sep 17 00:00:00 2001 From: awson Date: Mon, 24 Jun 2024 10:34:51 +0300 Subject: [PATCH 1/2] [Clang][Sema] don't handle ArraySize/AllocType early. --- clang/lib/Se

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/108758 >From 0a6b4e83318af66888f6297549a806b5d81e4933 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 15 Sep 2024 15:48:59 +0100 Subject: [PATCH] [Clang] Allow user defined conversion implicit cast to _Comple

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-16 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/108758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-16 Thread via cfe-commits
https://github.com/mahesh-attarde edited https://github.com/llvm/llvm-project/pull/108537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-16 Thread via cfe-commits
@@ -2139,9 +2139,9 @@ define <8 x i16> @pr59628_xmm(i16 %arg) { ; X86-LABEL: pr59628_xmm: ; X86: # %bb.0: ; X86-NEXT:movzwl {{[0-9]+}}(%esp), %eax -; X86-NEXT:vxorps %xmm0, %xmm0, %xmm0 +; X86-NEXT:vpxor %xmm0, %xmm0, %xmm0 ; X86-NEXT:vpbroadcastw %eax, %

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-16 Thread via cfe-commits
https://github.com/mahesh-attarde updated https://github.com/llvm/llvm-project/pull/108537 >From d8e76ea27679df40d0c796a5e8e5bc31433b6bff Mon Sep 17 00:00:00 2001 From: mattarde Date: Fri, 13 Sep 2024 03:26:14 -0700 Subject: [PATCH 1/4] update clr --- clang/lib/Headers/CMakeLists.txt

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-16 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Hmm, quite a few things are failing: ``` Failed Tests (14): Clang :: CXX/drs/cwg28xx.cpp Clang :: CXX/drs/cwg7xx.cpp Clang :: CXX/temp/temp.spec/temp.expl.spec/p2-20.cpp Clang :: CXX/temp/temp.spec/temp.expl.spec/p8.cpp Clang :: Index/index-file.cpp Clang :: PCH

[clang] [clang-format] Fix a bug in annotating angles containing FatArrow (PR #108671)

2024-09-16 Thread Owen Pan via cfe-commits
@@ -243,14 +244,16 @@ class AnnotatingParser { // operator that was misinterpreted because we are parsing template // parameters. // FIXME: This is getting out of hand, write a decent parser. - if (InExpr && !Line.startsWith(tok::kw_template) && + if

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

2024-09-16 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/107521 >From 6a12d3c9018361eb99eb7192d06517011aff7dde Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Tue, 17 Sep 2024 00:32:40 -0400 Subject: [PATCH] [clang-tidy][readability-container-contains] Extend to any

[clang] [clang-format] Handle C-style cast of qualified type (PR #108929)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #102874. --- Full diff: https://github.com/llvm/llvm-project/pull/108929.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+8-5) - (modified) clang/unittests/Format/TokenAnn

[clang] [clang-format] Handle C-style cast of qualified type (PR #108929)

2024-09-16 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/108929 Fixes #102874. >From db3da97b684403fdbf38b0f029438c00cfa16a5f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 16 Sep 2024 21:31:29 -0700 Subject: [PATCH] [clang-format] Handle C-style cast of qualified type

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

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes When diagnosing register bindings we just need to make sure there is a resource that matches the provided register type. We can emit the diagnostics right away instead of collecting flags in the RegisterBindin

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

2024-09-16 Thread Helena Kotas via cfe-commits
@@ -41,6 +41,47 @@ using namespace clang; +enum class RegisterType { SRV, UAV, CBuffer, Sampler, C, I, Invalid }; hekota wrote: This is moved from below. https://github.com/llvm/llvm-project/pull/108924 ___ cfe-co

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

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes When diagnosing register bindings we just need to make sure there is a resource that matches the provided register type. We can emit the diagnostics right away instead of collecting flags in the RegisterBindi

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

2024-09-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/108924 When diagnosing register bindings we just need to make sure there is a resource that matches the provided register type. We can emit the diagnostics right away instead of collecting flags in the RegisterBindingF

[clang] 95a0b4f - Revert "[clang][ExprConst] Allow comparisons with string literals (#106733)"

2024-09-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-09-17T05:58:54+02:00 New Revision: 95a0b4f729310d95d89f01f4d92ab7d2bf09941c URL: https://github.com/llvm/llvm-project/commit/95a0b4f729310d95d89f01f4d92ab7d2bf09941c DIFF: https://github.com/llvm/llvm-project/commit/95a0b4f729310d95d89f01f4d92ab7d2bf09941c.diff LO

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

2024-09-16 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: I was over-complicating the task. Instead of trying to match the type of the parameter with the type of the argument, I can just match the types of both parameters. Since on "normal" containers methods will have the same signature minus name, this shouldn't remove any true posi

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-16 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: @zyn0217 Thank you for the analysis and suggestion! I updated the patch as suggested, let's see what buildkite says. https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Iterate redecls starting from the canonical one in getRawCommentsForAnyRedecl() (PR #108475)

2024-09-16 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/108475 >From 408259c2e28e4664f0d0c47a6a897c6eb5660f93 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 10 Sep 2024 22:34:55 -0400 Subject: [PATCH] [AST] Iterate redecls starting from the canonical one in

[clang] [HLSL][NFC] Update resource attribute tests (PR #108919)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes - split resource attribute checks to multiple lines - use @LINE expressions to match line numbers --- Patch is 20.69 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull

[clang] [HLSL][NFC] Update resource attribute tests (PR #108919)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Helena Kotas (hekota) Changes - split resource attribute checks to multiple lines - use @LINE expressions to match line numbers --- Patch is 20.69 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/

[clang] [HLSL][NFC] Update resource attribute tests (PR #108919)

2024-09-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/108919 - split resource attribute checks to multiple lines - use @LINE expressions to match line numbers >From ef22d6e40b6c835a4a46633ba87f2053285c1b49 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 16 Sep 2024

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

2024-09-16 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/107521 >From 72db8b6b30b844bc6cf7502289945c4e34a837fa Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Mon, 16 Sep 2024 23:26:05 -0400 Subject: [PATCH] [clang-tidy][readability-container-contains] Extend to any

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

2024-09-16 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/107521 >From 72db8b6b30b844bc6cf7502289945c4e34a837fa Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Mon, 16 Sep 2024 23:26:05 -0400 Subject: [PATCH] [clang-tidy][readability-container-contains] Extend to any

[clang] [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (PR #107509)

2024-09-16 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 closed https://github.com/llvm/llvm-project/pull/107509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 64aaf05 - [Clang] [Driver] Ensure `-fms-volatile` is set for x86 for `*-windows-msvc` triple on non cl driver modes (#107509)

2024-09-16 Thread via cfe-commits
Author: Max Winkler Date: 2024-09-16T20:17:31-07:00 New Revision: 64aaf0559d9333dc00c04bb581739ddc5da358b2 URL: https://github.com/llvm/llvm-project/commit/64aaf0559d9333dc00c04bb581739ddc5da358b2 DIFF: https://github.com/llvm/llvm-project/commit/64aaf0559d9333dc00c04bb581739ddc5da358b2.diff L

[clang] [clang][TableGen] Migrate clang-tblgen to use const RecordKeeper (PR #107533)

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

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-16 Thread Shafik Yaghmour via cfe-commits
@@ -9868,7 +9868,12 @@ static bool tryVectorConvertAndSplat(Sema &S, ExprResult *scalar, // if necessary. CastKind scalarCast = CK_NoOp; - if (vectorEltTy->isIntegralType(S.Context)) { + if (vectorEltTy->isBooleanType()) { +if (scalarTy->isIntegralType(S.Context)) +

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Please add more details to the summary to explain what the fix actually does. https://github.com/llvm/llvm-project/pull/108657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/108657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Mainak Sil via cfe-commits
MainakSil wrote: Thanks for pointing that out, @mikecrowe! I've gone ahead and fixed the same mistake in `use-std-format.rst` as well in this PR. https://github.com/llvm/llvm-project/pull/108805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [docs][clang-tidy] Correct StrictMode example in modernize-use-std-print (PR #108805)

2024-09-16 Thread Mainak Sil via cfe-commits
https://github.com/MainakSil updated https://github.com/llvm/llvm-project/pull/108805 >From 20b262e9954ec1505b1be4ea3cc362b2a9955bb9 Mon Sep 17 00:00:00 2001 From: Mainak Sil Date: Sun, 15 Sep 2024 22:03:43 +0530 Subject: [PATCH 1/4] [docs][clang-tidy] Correct StrictMode example in modernize-u

[clang] [HLSL] Add `[[hlsl::raw_buffer]]` attribute (PR #107954)

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

[clang] 5df1b79 - [HLSL] Add `[[hlsl::raw_buffer]]` attribute (#107954)

2024-09-16 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-16T19:35:24-07:00 New Revision: 5df1b79372a89648cdb4ab798f1c74985e00ac6e URL: https://github.com/llvm/llvm-project/commit/5df1b79372a89648cdb4ab798f1c74985e00ac6e DIFF: https://github.com/llvm/llvm-project/commit/5df1b79372a89648cdb4ab798f1c74985e00ac6e.diff

[clang] [ast-matcher] Fixed a crash when traverse lambda expr with invalid captures (PR #108689)

2024-09-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/108689 >From af8720ade42fef1571b59e2ca21943abc6b998d1 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sat, 14 Sep 2024 15:38:11 +0800 Subject: [PATCH 1/2] [ast-matcher] Fixed a crash when traverse lambda expr wi

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/108425 >From 451a178dbb461e6b3dd264be6ede0aa26283dbbe Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 28 Aug 2024 23:30:49 -0700 Subject: [PATCH 1/5] [Utils] Add --update-tests to lit This adds a flag to

[clang] fix update-verify-tests test suite for AIX (PR #108871)

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

[clang] c96ee0f - fix update-verify-tests test suite for AIX (#108871)

2024-09-16 Thread via cfe-commits
Author: Henrik G. Olsson Date: 2024-09-16T18:39:31-07:00 New Revision: c96ee0ffaf5ee7afa1f4b0be0662852f57b47244 URL: https://github.com/llvm/llvm-project/commit/c96ee0ffaf5ee7afa1f4b0be0662852f57b47244 DIFF: https://github.com/llvm/llvm-project/commit/c96ee0ffaf5ee7afa1f4b0be0662852f57b47244.di

[clang] fix update-verify-tests test suite for AIX (PR #108871)

2024-09-16 Thread Jake Egan via cfe-commits
https://github.com/jakeegan approved this pull request. LGTM, thanks for the fix! https://github.com/llvm/llvm-project/pull/108871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-16 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/107664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-16 Thread Rich Felker via cfe-commits
richfelker wrote: If I understand this correctly, it's about GCC-style tuples, not the arch/subarch names musl uses for the ABI ldso name, etc. If that's correct, the only consideration is matching the GCC conventions and it's not really a matter governed by musl. https://github.com/llvm/llv

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > Why do we need the two new files? > > We have clang/lib/Driver/ToolChains/CommonArgs.cpp and > > clang/lib/Driver/ToolChain.cpp for shared code. > > Since most of the code in `CommonArgs.cpp` had to do with functions in the > `clang::driver::tools` namespace, I wasn't sure t

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-16 Thread Matin Raayai via cfe-commits
matinraayai wrote: @aeubanks @arsenm any updates on this? https://github.com/llvm/llvm-project/pull/105541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Correct the misuse of the API in the Clang test-report script. (PR #108725)

2024-09-16 Thread via cfe-commits
c8ef wrote: Hi @tru, could you please take a look at this patch? https://github.com/llvm/llvm-project/pull/108725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow user defined conversion implicit cast to _Complex types in constant expressions (PR #108758)

2024-09-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: You need to add more details to the summary something like: the fix was to handle `CK_UserDefinedConversion` in `ComplexExprEvaluator::VisitCastExpr` as opposed to treating it as an error. https://github.com/llvm/llvm-project/pull/108758 __

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

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/108902 >From 9deebd707410a6ad8474f615a97c943937ceeb34 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 16 Sep 2024 18:21:38 -0500 Subject: [PATCH 1/2] [HLSL] Make casting functions constexpr This marks the

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-16 Thread Tarun Prabhu via cfe-commits
@@ -1980,9 +1980,11 @@ within a command line are combined with spaces; spaces and backslashes within an argument are escaped with backslashes. This format differs from the format of the equivalent section produced by GCC with the -frecord-gcc-switches flag. This option is curr

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-16 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/102975 >From 4a37cec543f30bb122bf14573fdec8302a0afa3e Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Mon, 12 Aug 2024 14:32:08 -0600 Subject: [PATCH 1/4] [clang][flang][mlir] Support -frecord-command-line option

[clang] 48498ec - [-Wunsafe-buffer-usage] Fix a bug in "Re-land [-Wunsafe-buffer-usage] Warning Libc functions (#101583)"

2024-09-16 Thread via cfe-commits
Author: ziqingluo-90 Date: 2024-09-16T17:21:24-07:00 New Revision: 48498ec7a4ded9f1bf813051abdc54c3e5b66fa7 URL: https://github.com/llvm/llvm-project/commit/48498ec7a4ded9f1bf813051abdc54c3e5b66fa7 DIFF: https://github.com/llvm/llvm-project/commit/48498ec7a4ded9f1bf813051abdc54c3e5b66fa7.diff

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

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Chris B (llvm-beanz) Changes This marks the `bit_cast` helper as `constexpr` and allows the casts implemented with it to also be `constexpr`. This is largely not a functional change, but it enables using the casts in expressions tha

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

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/108902 This marks the `bit_cast` helper as `constexpr` and allows the casts implemented with it to also be `constexpr`. This is largely not a functional change, but it enables using the casts in expressions that ne

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

2024-09-16 Thread via cfe-commits
vabridgers wrote: Maybe this CR could be easily improved to handle this case correctly rather than avoiding the crash, just wanted to see if it's better to get this change in for now avoiding the crash or get some advice on how to fix this correctly. https://github.com/llvm/llvm-project/pull/

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

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (vabridgers) Changes Random testing found that the Z3 wrapper does not support UnarySymExpr, which was added recently and not included in the original Z3 wrapper. For now, just avoid submi

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

2024-09-16 Thread via cfe-commits
https://github.com/vabridgers created https://github.com/llvm/llvm-project/pull/108900 Random testing found that the Z3 wrapper does not support UnarySymExpr, which was added recently and not included in the original Z3 wrapper. For now, just avoid submitting expressions to Z3 to avoid compile

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 approved this pull request. https://github.com/llvm/llvm-project/pull/106856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-16 Thread via cfe-commits
eddyz87 wrote: @yonghong-song, note: if all three commits remain a part of a single pull request, the are required to be squashed ([link](https://llvm.org/docs/GitHub.html)). If you want all three to be separate, each has to have it's separate pull request (one branch forked from another). h

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

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

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-16 Thread via cfe-commits
@@ -0,0 +1,186 @@ +; RUN: llc -march=bpfel -mcpu=v3 -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s +; RUN: llc -march=bpfeb -mcpu=v3 -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s +; +; Source: +; #include +; struct gstruct_t { +; _Atomic int a;

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-16 Thread via cfe-commits
@@ -800,6 +809,10 @@ void BTFDebug::visitDerivedType(const DIDerivedType *DTy, uint32_t &TypeId, bool CheckPointer, bool SeenPointer) { unsigned Tag = DTy->getTag(); + if (Tag == dwarf::DW_TAG_atomic_type) +return visitTypeEntry(DTy->get

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-16 Thread via cfe-commits
@@ -152,22 +152,93 @@ static bool hasLiveDefs(const MachineInstr &MI, const TargetRegisterInfo *TRI) { return false; } -void BPFMIPreEmitChecking::processAtomicInsts() { +bool BPFMIPreEmitChecking::processAtomicInsts() { + if (!MF->getSubtarget().getHasJmp32()) { +// O

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-16 Thread via cfe-commits
@@ -152,22 +152,93 @@ static bool hasLiveDefs(const MachineInstr &MI, const TargetRegisterInfo *TRI) { return false; } -void BPFMIPreEmitChecking::processAtomicInsts() { +bool BPFMIPreEmitChecking::processAtomicInsts() { + if (!MF->getSubtarget().getHasJmp32()) { +// O

[clang] [llvm] [BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-16 Thread via cfe-commits
@@ -35,6 +35,15 @@ static const char *BTFKindStr[] = { #include "llvm/DebugInfo/BTF/BTF.def" }; +static const DIType *tryRemoveAtomicType(const DIType *Ty) { eddyz87 wrote: Is it necessary to call this thing in `BTFTypeTypeTag::completeType`? https://github.

[clang] [PowerPC] Fix incorrect store alignment for __builtin_vsx_build_pair() (PR #108606)

2024-09-16 Thread Eli Friedman via cfe-commits
@@ -18197,7 +18197,7 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, CallOps.push_back(Ops[i]); llvm::Function *F = CGM.getIntrinsic(ID); Value *Call = Builder.CreateCall(F, CallOps); -return Builder.CreateAlignedStore(Call, Ops[0], MaybeAli

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

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes This adds a warning about incomplete language mode support before HLSL 202x. This is the last change in the sequence to fix and make HLSL 202x the default mode for Clang (#108044). Fixes #108044 --- Full di

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

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/108894 This adds a warning about incomplete language mode support before HLSL 202x. This is the last change in the sequence to fix and make HLSL 202x the default mode for Clang (#108044). Fixes #108044 >From 0b5

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-09-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Should be fixed by > https://github.com/llvm/llvm-project/commit/940f89255e4a3982d94dad57837e8e658092af78. I quickly glanced through the other uses of setIsInBounds in LLVM; the one in CodeGenPrepare seems suspicious. https://github.com/llvm/llvm-project/pull/107257 ___

[clang] [llvm] [Utils] Add new --update-tests flag to llvm-lit (PR #108425)

2024-09-16 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/108425 >From 451a178dbb461e6b3dd264be6ede0aa26283dbbe Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Wed, 28 Aug 2024 23:30:49 -0700 Subject: [PATCH 1/5] [Utils] Add --update-tests to lit This adds a flag to

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-16 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: I obviously can't speak to Rich's opinion on this, but I'll just note that [musl's `configure` script](https://git.musl-libc.org/cgit/musl/tree/configure) only cares about the arch component of the triple; it does not match on the environment at all. My understanding is that all

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > I see that it is set and the reason the existing error is not emitted is > because of the !Entry->isDeclaration() condition. For non-lambda methods, the way this works it that we call GetOrCreateLLVMFunction for both methods... for the first method, the `!Entry->isDecla

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clangd-ubuntu-tsan` running on `clangd-ubuntu-clang` while building `clang` at step 6 "test-build-clangd-clangd-index-server-clangd-indexer-check-clangd". Full details are available at: https://lab.llvm.org/buildbot/#/builder

[clang] [HLSL] Add `[[hlsl::raw_buffer]]` attribute (PR #107954)

2024-09-16 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/107954 >From 1c66d2767ca20f42b6edaae834cc186be7d23712 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 9 Sep 2024 19:39:02 -0700 Subject: [PATCH 1/9] [HLSL] Add `[[hlsl::row_access]]` attribute This PR introduces

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/108662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4886403 - [HLSL] Align language modes on 202x as default (#108662)

2024-09-16 Thread via cfe-commits
Author: Chris B Date: 2024-09-16T17:17:15-05:00 New Revision: 488640389faedee8c65566275441779faa620fd2 URL: https://github.com/llvm/llvm-project/commit/488640389faedee8c65566275441779faa620fd2 DIFF: https://github.com/llvm/llvm-project/commit/488640389faedee8c65566275441779faa620fd2.diff LOG:

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

2024-09-16 Thread via cfe-commits
gonzalobg wrote: Another example for PTX targets is `.generic`, `.shared::cluster`, and `.shared::cta`, where `.generic` covers `.shared::cluster` which covers `.shared::cta`. https://github.com/llvm/llvm-project/pull/108786 ___ cfe-commits mailing l

[clang] [compiler-rt] [libcxx] [cmake] Add hexagon-linux cmake cache files (PR #98712)

2024-09-16 Thread Brian Cain via cfe-commits
https://github.com/androm3da updated https://github.com/llvm/llvm-project/pull/98712 >From 3d8388d723b3c5dc3d51a6d3e80051dfe7da8a4c Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Fri, 12 Jul 2024 21:34:56 -0700 Subject: [PATCH] [cmake] Add hexagon-linux cmake cache files These can be used to

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > How does this interact with #107598? I think it's solving the same problem, but a different way (looking at the final LLVM function type rather than checking the ABI information). https://github.com/llvm/llvm-project/pull/108853 ___ c

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
@@ -12881,6 +12886,12 @@ QualType Sema::CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, if (!getLangOpts().CPlusPlus && !(isa(vType->getAs( return InvalidLogicalVectorOperands(Loc, LHS, RHS); + if (getLangOpts().HLSL && + getLangOpts().getHLS

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
@@ -12881,6 +12886,12 @@ QualType Sema::CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, if (!getLangOpts().CPlusPlus && !(isa(vType->getAs( return InvalidLogicalVectorOperands(Loc, LHS, RHS); + if (getLangOpts().HLSL && + getLangOpts().getHLS

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp edited https://github.com/llvm/llvm-project/pull/108659 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-16 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp commented: LGTM - reviewed mostly to see if I could read and get a high level gist of what it was doing. I'm afraid I've not carefully looked through the real meat of this change. https://github.com/llvm/llvm-project/pull/108659 _

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
@@ -37,7 +37,7 @@ _Static_assert(is_same<__decltype(4294967296), int64_t>::value, "4294967296 is i // Clang emits a warning that it is interpreting it as unsigned because that is // not conforming to the C standard. -// expected-warning@+1{{integer literal is too large to be

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
@@ -12,7 +12,7 @@ // HALF: #define __HLSL_ENABLE_16_BIT 1 // NOHALF-NOT: __HLSL_ENABLE_16_BIT -// CHECK: #define __HLSL_VERSION 2021 +// CHECK: #define __HLSL_VERSION 2028 llvm-beanz wrote: Yea. Subject to revision once we have an actual year. https://github

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Chris B via cfe-commits
@@ -12,7 +12,7 @@ // HALF: #define __HLSL_ENABLE_16_BIT 1 // NOHALF-NOT: __HLSL_ENABLE_16_BIT -// CHECK: #define __HLSL_VERSION 2021 +// CHECK: #define __HLSL_VERSION 2028 llvm-beanz wrote: 202x doesn't have a year yet, so to make it big and far out I gave it

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Julian Schmidt via cfe-commits
@@ -119,7 +123,6 @@ Changes in existing checks ` check to avoid false positive when member initialization depends on a structured binging variable. - 5chmidti wrote: thanks https://github.com/llvm/llvm-project/pull/106856 __

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/106856 >From f47b807598ed0e80d3e3bd2c05699f977a2395bf Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 31 Aug 2024 16:56:54 +0200 Subject: [PATCH 1/2] [clang-tidy] fix nullptr dereference in bugprone-forwardi

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Nicolas van Kempen via cfe-commits
@@ -119,7 +123,6 @@ Changes in existing checks ` check to avoid false positive when member initialization depends on a structured binging variable. - nicovank wrote: Probably unwanted deleted line here. https://github.com/llvm/llvm-project/pull/106856

[clang] [clang][codegen] Don't mark "int" TBAA on FP libcalls with indirect args (PR #108853)

2024-09-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: How does this interact with #107598? https://github.com/llvm/llvm-project/pull/108853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-16 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I think you should be able to avoid constructing the initializer twice if you restructure the code a bit to just construct the global before the call to BuildVTablePointer. I added GlobalVariable::replaceInitializer because I was looking at this rev

[clang-tools-extra] [clang-tidy] fix nullptr dereference in bugprone-forwarding-reference (PR #106856)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/106856 >From f47b807598ed0e80d3e3bd2c05699f977a2395bf Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 31 Aug 2024 16:56:54 +0200 Subject: [PATCH] [clang-tidy] fix nullptr dereference in bugprone-forwarding-r

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

2024-09-16 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Both in InferAddressSpaces, and in Attributor, you don't really care about whether a flat address-space exists. All you really need to know is whether, for a given pair of address-spaces "A" and "B", `addrspacecast ptr addrspace(A) %x to ptr addrspace(B)` should be optimi

[clang-tools-extra] [NFC][clang-tidy] reword diagnostic note in definitions-in-headers (PR #106862)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/106862 >From c641dd2a2cb6185b088e469a5f5db160e8c76bae Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 31 Aug 2024 18:44:37 +0200 Subject: [PATCH 1/3] [NFC][clang-tidy] reword diagnostic note in definitions-i

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-16 Thread Julian Schmidt via cfe-commits
@@ -72,7 +72,7 @@ static FindArgsResult findArgs(const CallExpr *Call) { return Result; } -static SmallVector +static std::pair> 5chmidti wrote: done https://github.com/llvm/llvm-project/pull/107649 ___ cfe-commi

[clang-tools-extra] [clang-tidy] fix false positive in modernize-min-max-use-initializer-list (PR #107649)

2024-09-16 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/107649 >From 097a679f33bdded29fa67833b7fcd4707057cbf3 Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 7 Sep 2024 00:10:08 +0200 Subject: [PATCH 1/4] [clang-tidy] fix false positive in modernize-min-max-use-i

[clang] [clang][ExprConst] Allow comparisons with string literals (PR #106733)

2024-09-16 Thread Richard Smith via cfe-commits
zygoloid wrote: See https://github.com/llvm/llvm-project/issues/58754#issuecomment-2354048986 -- this introduces a miscompile by producing comparison results at compile time that differ from the results at runtime. Please can this be reverted? https://github.com/llvm/llvm-project/pull/106733 _

[clang] [HLSL] Align language modes on 202x as default (PR #108662)

2024-09-16 Thread Greg Roth via cfe-commits
@@ -37,7 +37,7 @@ _Static_assert(is_same<__decltype(4294967296), int64_t>::value, "4294967296 is i // Clang emits a warning that it is interpreting it as unsigned because that is // not conforming to the C standard. -// expected-warning@+1{{integer literal is too large to be

  1   2   3   4   5   >