[clang] [llvm] adding clang codegen (PR #109331)

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 7bdad6254a6a5bc763ebcbb120f7ad73f598cb7d Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [clang-offload-bundler] Avoid repeated hash lookups (NFC) (PR #109507)

2024-09-20 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/109507 None >From a08161a8308d724e7cf41ee0f603321ee6a121d4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 20 Sep 2024 13:32:54 -0700 Subject: [PATCH] [clang-offload-bundler] Avoid repeated hash lookups (

[clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-20 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! The patch looks good to me. And the index size measurements reported in [this comment](https://github.com/llvm/llvm-project/pull/67802#issuecomment-1923778262) look good as well, thank you for taking them. https://github.co

[clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

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

[clang] [clang][bytecode] Diagnose weak reads in final load (PR #109515)

2024-09-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109515 They aren't allowed here either. >From bc5bbba9c0ab2aa19172d45b2fad628ec531bb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 21 Sep 2024 08:28:52 +0200 Subject: [PATCH] [clang][bytec

[clang] [clang][bytecode] Diagnose weak reads in final load (PR #109515)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes They aren't allowed here either. --- Full diff: https://github.com/llvm/llvm-project/pull/109515.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+2) - (modified) clang/test/CodeGenC

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/109496 >From e7f7f82b25eaae86623ac8f47731892b3b629d7d Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Fri, 20 Sep 2024 16:27:09 -0700 Subject: [PATCH 1/3] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warni

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Ziqing Luo via cfe-commits
@@ -784,12 +786,12 @@ AST_MATCHER_P(CallExpr, hasUnsafePrintfStringArg, return false; // possibly some user-defined printf function ASTContext &Ctx = Finder->getASTContext(); - QualType FristParmTy = FD->getParamDecl(0)->getType(); + QualType FirstParmTy = FD->getParam

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/109496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Artem Dergachev via cfe-commits
@@ -784,12 +786,12 @@ AST_MATCHER_P(CallExpr, hasUnsafePrintfStringArg, return false; // possibly some user-defined printf function ASTContext &Ctx = Finder->getASTContext(); - QualType FristParmTy = FD->getParamDecl(0)->getType(); + QualType FirstParmTy = FD->getParam

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-20 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. Nice catch! https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/109496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [modularize] Avoid repeated hash lookups (NFC) (PR #109508)

2024-09-20 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/109508 None >From d50b829fd1277736b7e65886879fcfe9a45714f2 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 20 Sep 2024 13:31:12 -0700 Subject: [PATCH] [modularize] Avoid repeated hash lookups (NFC) ---

[clang-tools-extra] [modularize] Avoid repeated hash lookups (NFC) (PR #109508)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109508.diff 1 Files Affected: - (modified) clang-tools-extra/modularize/Modularize.cpp (+4-6) ``diff diff --git a/clan

[clang] [clang-offload-bundler] Avoid repeated hash lookups (NFC) (PR #109507)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109507.diff 1 Files Affected: - (modified) clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp (+1-2) ``diff diff --git a/cl

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

2024-09-20 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-lnt` running on `systemz-1` while building `clang-tools-extra,clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/136/builds/972 Here is the relevant p

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread via cfe-commits
c8ef wrote: > But that function _does_ have a return statement after the loop? I assumed that the entire function body was enclosed within the `while(true)` loop? https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commi

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-20 Thread Timm Baeder via cfe-commits
@@ -10,11 +10,229 @@ using FourI128VecSize __attribute__((vector_size(64))) = __int128; using FourCharsExtVec __attribute__((ext_vector_type(4))) = char; using FourIntsExtVec __attribute__((ext_vector_type(4))) = int; +using FourLongLongsExtVec __attribute__((ext_vector_type(

[clang] [clang-format] Annotate the l_paren of function pointer types (PR #109229)

2024-09-20 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/109229 >From 84c166dfabc3f314cd922baa3933b3d0ea11e08e Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 18 Sep 2024 21:03:24 -0700 Subject: [PATCH] [clang-format] Annotate the l_paren of function pointer types Fixes #

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109470)

2024-09-20 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource updated https://github.com/llvm/llvm-project/pull/109470 >From 6ff9964b7180cc9279c2742b14f69cc966a027a1 Mon Sep 17 00:00:00 2001 From: Tomasz Kaminski Date: Fri, 20 Sep 2024 17:21:33 +0200 Subject: [PATCH] [C++20][Modules] Restore inliness of const

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109470)

2024-09-20 Thread via cfe-commits
https://github.com/tomasz-kaminski-sonarsource edited https://github.com/llvm/llvm-project/pull/109470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Correctly annotate */& in if condition with braced init (PR #109505)

2024-09-20 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/109505 Fixes #109371. >From 192deb4adc9f7e77167a02c060eef8c91932b912 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 20 Sep 2024 20:28:31 -0700 Subject: [PATCH] [clang-format] Correctly annotate */& in if condition

[clang] [clang-format] Correctly annotate */& in if condition with braced init (PR #109505)

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

[clang] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warnings for C files (PR #109496)

2024-09-20 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/109496 >From e7f7f82b25eaae86623ac8f47731892b3b629d7d Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Fri, 20 Sep 2024 16:27:09 -0700 Subject: [PATCH 1/4] [-Wunsafe-buffer-usage] Fix a bug and suppress libc warni

[clang-tools-extra] 0659fd9 - [clangd] Collect comments from function definitions into the index (#67802)

2024-09-20 Thread via cfe-commits
Author: Christian Kandeler Date: 2024-09-20T23:54:20-04:00 New Revision: 0659fd996784cbc2b11379380a03633fa80f7816 URL: https://github.com/llvm/llvm-project/commit/0659fd996784cbc2b11379380a03633fa80f7816 DIFF: https://github.com/llvm/llvm-project/commit/0659fd996784cbc2b11379380a03633fa80f7816.

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-support Author: Rahul Joshi (jurahul) Changes Scaled indent is useful when indentation is always in steps of a fixed number (the Scale) and still allow using the +/- operators to adjust indentation. --- Full diff: https://github.com/llvm/llvm-proj

[clang] [C++20][Modules] Restore inliness of constexpr/consteval functions defined in-class (PR #109470)

2024-09-20 Thread via cfe-commits
tomasz-kaminski-sonarsource wrote: The correct link is https://github.com/llvm/llvm-project/commit/97af17c5. The commit id remains the same. https://github.com/llvm/llvm-project/pull/109470 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

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

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread Timm Baeder via cfe-commits
tbaederr wrote: Yeah the behavior is not the same. The original code only parsed `ident[,]` in the loop, since the `continue` ended the loop anyway. The comment above the function reads: ``` /// [ObjC] protocol-qualifiers: '<' identifier-list '>' ``` So the assumption is that this

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

2024-09-20 Thread Matt Arsenault via cfe-commits
@@ -774,18 +774,27 @@ class buffer_unique_ostream : public raw_svector_ostream { // you can use // OS << indent(6) << "more stuff"; // which has better ergonomics (and clang-formats better as well). +// +// If indentation is always in increments of a fixed value, you can use Sc

[clang] [llvm] [Support] Add scaling support in `indent` (PR #109478)

2024-09-20 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/109478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-20 Thread LLVM Continuous Integration via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Na

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread via cfe-commits
c8ef wrote: > I'm only worried about the missing return at the end of the function - maybe > there should be a `llvm_unreachable` here to silence compilers, even if that > control flow is not possible. https://github.com/llvm/llvm-project/blob/21594f2793da5d2e1d1cd6714bfa10e742f2e526/clang/lib

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread Timm Baeder via cfe-commits
tbaederr wrote: But that function _does_ have a return statement after the loop? https://github.com/llvm/llvm-project/pull/109298 ___ 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-20 Thread Peilin Ye via cfe-commits
peilin-ye wrote: @eddyz87, Thanks! I didn't know about `XXXISelLowering.cpp`. > But there should be a way to tweak existing `fail` function to stop after > errors are reported. Can we `exit(1)` ? :-) `fail()` calls `LLVMContext::diagnose()`, which already `exit(1)` when there's no "report

[clang] [clang] fix the unexpected control flow in ParseTentative.cpp (PR #109298)

2024-09-20 Thread via cfe-commits
c8ef wrote: Or we can simply return `TPResult::Ambiguous`, as many functions in this file do. https://github.com/llvm/llvm-project/pull/109298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] 68849a8 - [TableGen] Use StringSet instead of StringMap (NFC) (#109469)

2024-09-20 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-20T20:32:23-07:00 New Revision: 68849a878858f981e19c5a664310e0ff059f27e7 URL: https://github.com/llvm/llvm-project/commit/68849a878858f981e19c5a664310e0ff059f27e7 DIFF: https://github.com/llvm/llvm-project/commit/68849a878858f981e19c5a664310e0ff059f27e7.diff L

[clang] [TableGen] Use StringSet instead of StringMap (NFC) (PR #109469)

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

[clang] [llvm] adding clang codegen (PR #109331)

2024-09-20 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 6d40fb810312b41d4ec4e10dba2f55e7e0625953 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH] adding clang codegen --- clang/include/clang/Basic/Builtins

[clang] [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109399)

2024-09-20 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: StaticAnalyzer changes LGTM. https://github.com/llvm/llvm-project/pull/109399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tools-extra] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109400)

2024-09-20 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/109400 Follow up to #109133. >From ebffad800626acbdb06c74633c0950e24df755c8 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 20 Sep 2024 11:16:23 +0100 Subject: [PATCH] [clang-tools-extra] Use {} instead of std::nu

[clang-tools-extra] [clang-tools-extra] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109400)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Jay Foad (jayfoad) Changes Follow up to #109133. --- Full diff: https://github.com/llvm/llvm-project/pull/109400.diff 8 Files Affected: - (modified) clang-tools-extra/clang-query/Query.cpp (+1-1) - (modified) clang-tools-e

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: > Missing fold: https://alive2.llvm.org/ce/z/2rmc3h See > [dtcxzyw/llvm-opt-benchmark#1342 > (comment)](https://github.com/dtcxzyw/llvm-opt-benchmark/pull/1342#discussion_r1767033125) In principle, I think this could be supported by making decomposeBitTestICmp detect that `ugt 25

[clang-tools-extra] [clang-tools-extra] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109400)

2024-09-20 Thread Jay Foad via cfe-commits
https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/109400 >From ebffad800626acbdb06c74633c0950e24df755c8 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Fri, 20 Sep 2024 11:16:23 +0100 Subject: [PATCH 1/2] [clang-tools-extra] Use {} instead of std::nullopt to initialize

[clang] [lldb] [llvm] [mlir] [APInt] Assert correct values in APInt constructor (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From 7467ecf67c706ffdfa79eaebdc9528002b74c5af Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6 +

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fix bitwidth (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e5717fb - [clang][wasm] Replace the target iminmax intrinsics with the equivalent generic `__builtin_elementwise_min/max` intrinsics (#109259)

2024-09-20 Thread via cfe-commits
Author: Simon Pilgrim Date: 2024-09-20T11:48:57+01:00 New Revision: e5717fb61d844895d4ca88659646d04ac749bc82 URL: https://github.com/llvm/llvm-project/commit/e5717fb61d844895d4ca88659646d04ac749bc82 DIFF: https://github.com/llvm/llvm-project/commit/e5717fb61d844895d4ca88659646d04ac749bc82.diff

[clang] 2c90eb9 - [clang][wasm] Replace the target integer add saturate intrinsics with the equivalent generic `__builtin_elementwise_add_sat` intrinsics (#109269)

2024-09-20 Thread via cfe-commits
Author: Simon Pilgrim Date: 2024-09-20T11:49:31+01:00 New Revision: 2c90eb990af176f2b57baecd2920481243845bb9 URL: https://github.com/llvm/llvm-project/commit/2c90eb990af176f2b57baecd2920481243845bb9 DIFF: https://github.com/llvm/llvm-project/commit/2c90eb990af176f2b57baecd2920481243845bb9.diff

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: I think this is ready for review now. I've landed many parts of this PR separately already, and am happy to land this in parts (or split as needed). https://github.com/llvm/llvm-project/pull/80309 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][wasm] Replace the target integer add saturate intrinsics with the equivalent generic `__builtin_elementwise_add_sat` intrinsics (PR #109269)

2024-09-20 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/109269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][wasm] Replace the target iminmax intrinsics with the equivalent generic `__builtin_elementwise_min/max` intrinsics (PR #109259)

2024-09-20 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/109259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Matt Arsenault via cfe-commits
@@ -4377,7 +4377,7 @@ AMDGPUInstructionSelector::selectGlobalSAddr(MachineOperand &Root) const { // instructions to perform VALU adds with immediates or inline literals. unsigned NumLiterals = !TII.isInlineConstant(APInt(32, ConstOffset & 0xfff

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Matt Arsenault via cfe-commits
@@ -1806,7 +1806,7 @@ bool AMDGPUDAGToDAGISel::SelectGlobalSAddr(SDNode *N, // instructions to perform VALU adds with immediates or inline literals. unsigned NumLiterals = !TII->isInlineConstant(APInt(32, COffsetVal & 0x)) + - !TII->isInli

[clang] [Clang][TableGen] Support specifying address space in clang builtin prototypes (PR #108497)

2024-09-20 Thread Vikram Hegde via cfe-commits
vikramRH wrote: > > > > Gentle ping @AaronBallman , @philnik777 , @fpetrogalli :) > > > > > > > > > Ah, sorry -- because the PR is marked as a Draft, I figured it wasn't > > > ready for review yet. > > > I think I'd rather this was expressed differently; we already don't put > > > attribute i

[clang] [clang] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109399)

2024-09-20 Thread via cfe-commits
cc-ww wrote: LGTM. https://github.com/llvm/llvm-project/pull/109399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Fix incorrect check prefix in riscv32-toolchain.c and riscv64-toolchain.c. NFC. (PR #109390)

2024-09-20 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. https://github.com/llvm/llvm-project/pull/109390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-20 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/109420 The implementation made the assumption that any feature starting with "sve" meant that this was an SVE feature. This is not the case for "sve-b16b16", as this is a feature that applies to both SVE and SME

[clang-tools-extra] [clangd] Improve robustness when clang-tidy check names contain leading spaces. (PR #109421)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clangd Author: Haojian Wu (hokein) Changes The current logic assumes that check names do not have leading spaces. In cases like "-*, clang-diagnostic*", when processing the second check " clang-diagnostics-*" (wit

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes The implementation made the assumption that any feature starting with "sve" meant that this was an SVE feature. This is not the case for "sve-b16b16", as this is a feature that applies to both SVE

[clang-tools-extra] [clangd] Improve robustness when clang-tidy check names contain leading spaces. (PR #109421)

2024-09-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/109421 The current logic assumes that check names do not have leading spaces. In cases like "-*, clang-diagnostic*", when processing the second check " clang-diagnostics-*" (with a leading space), the check fails on `

[clang] [llvm] [ADT] Simplify SmallSet (PR #109412)

2024-09-20 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. LGTM. Could you also add [NFC] to the PR title? https://github.com/llvm/llvm-project/pull/109412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -77,42 +78,46 @@ class IncrementalCompilerBuilder { llvm::StringRef CudaSDKPath; }; -/// Generate glue code between the Interpreter's built-in runtime and user code. -class RuntimeInterfaceBuilder { -public: - virtual ~RuntimeInterfaceBuilder() = default; - - using Tra

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. In general, I like the direction this is heading! I found a few nits, but nothing significant jumped out at me. Approving because I'm going to be out the next few weeks and I didn't want you to feel held up on my sign-off. https://gi

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -241,28 +244,180 @@ IncrementalCompilerBuilder::CreateCudaHost() { return IncrementalCompilerBuilder::createCuda(false); } -Interpreter::Interpreter(std::unique_ptr CI, +class InProcessPrintingASTConsumer final : public MultiplexConsumer { + Interpreter &Interp; + +publi

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -241,28 +244,180 @@ IncrementalCompilerBuilder::CreateCudaHost() { return IncrementalCompilerBuilder::createCuda(false); } -Interpreter::Interpreter(std::unique_ptr CI, +class InProcessPrintingASTConsumer final : public MultiplexConsumer { + Interpreter &Interp; + +publi

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -53,6 +53,7 @@ class MultiplexConsumer : public SemaConsumer { public: // Takes ownership of the pointers in C. MultiplexConsumer(std::vector> C); + MultiplexConsumer(std::unique_ptr C); AaronBallman wrote: This feels unnecessary because you should be

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -39,11 +44,13 @@ class IncrementalCUDADeviceParser : public IncrementalParser { ~IncrementalCUDADeviceParser(); protected: - IncrementalParser &HostParser; + std::unique_ptr DeviceCI; int SMVersion; llvm::SmallString<1024> PTXCode; llvm::SmallVector FatbinCont

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

2024-09-20 Thread via cfe-commits
EugeneZelenko wrote: I mostly check documentation and minor code issues. Please wait for at least one of active developers whom I added to reviewers list. https://github.com/llvm/llvm-project/pull/109169 ___ cfe-commits mailing list cfe-commits@lists.

[clang-tools-extra] [clangd] Improve robustness when clang-tidy check names contain leading spaces. (PR #109421)

2024-09-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. thanks! https://github.com/llvm/llvm-project/pull/109421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/109277 >From edbdc039ee955cc9d5f0f7d4cb4be287c55e25bb Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 17 Sep 2024 15:48:42 +0200 Subject: [PATCH 1/2] [Loads] Check context instruction for context-sensitive derefa

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: I added some wording to isSafeToSpeculativelyExecute(), but not sure if this is what you had in mind. https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #109375)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Hm, why does this wrapper exist at all? It looks like a trivial wrapper that doesn't add or change any DenseMap functionality. https://github.com/llvm/llvm-project/pull/109375 ___ cfe-commits mailing list cfe-commit

[clang] 96ae7c4 - [clang-repl] Implement continuation for preprocessor directives. (#107552)

2024-09-20 Thread via cfe-commits
Author: Vassil Vassilev Date: 2024-09-20T10:07:46+03:00 New Revision: 96ae7c4f1aa02cb10455dda22abbb0b3b2ceaa6b URL: https://github.com/llvm/llvm-project/commit/96ae7c4f1aa02cb10455dda22abbb0b3b2ceaa6b DIFF: https://github.com/llvm/llvm-project/commit/96ae7c4f1aa02cb10455dda22abbb0b3b2ceaa6b.dif

[clang] [clang][bytecode] Fix a problem with array size limits (PR #109383)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Descriptor::MaxArrayElemBytes is an unsigned value, which might overflow the SizeT we have in CheckArraySize. --- Full diff: https://github.com/llvm/llvm-project/pull/109383.diff 2 Files Affected: - (modi

[clang] [clang-repl] Implement continuation for preprocessor directives. (PR #107552)

2024-09-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/107552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix a problem with array size limits (PR #109383)

2024-09-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/109383 Descriptor::MaxArrayElemBytes is an unsigned value, which might overflow the SizeT we have in CheckArraySize. >From 091ba215597e2fc41b3860182ae2136bcac7f5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-20 Thread Rainer Orth via cfe-commits
rorth wrote: > We try to restrict distribution differences to things like default linker > options and library paths. Affecting `-mcpu=` seems very unintuitive. There > are many Debian derivatives. It's weird that Debian uses -mcpu=v9 while > others use -mcpu=v8. We should not increase `IsDebi

[clang-tools-extra] [clang-tidy] Add new check bugprone-tagged-union-member-count (PR #89925)

2024-09-20 Thread via cfe-commits
=?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3RodsOhcmk=?= , =?utf-8?b?R8OhYm9yIFTDs3Ro

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Haojian Wu via cfe-commits
@@ -637,6 +637,11 @@ return value must be trivially destructible. The calling convention of the caller and callee must match, and they must not be variadic functions or have old style K&R C function declarations. +The lifetimes of all local variables and function parameters e

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. Thanks, it looks good, just a few nits. https://github.com/llvm/llvm-project/pull/109255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] WebKit Checkers should set DeclWithIssue. (PR #109389)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Set DeclWithIssue in alpha.webkit.UncountedCallArgsChecker and alpha.webkit.UncountedLocalVarsChecker. --- Full diff: https://github.com/llvm/llvm-project/pull/109389.diff 2 Files Affected: - (modified) cl

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

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

[clang] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-20 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee updated https://github.com/llvm/llvm-project/pull/107494 >From 57989794675a67b955aaf0e06fb4dbdc3ad48c9b Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Thu, 5 Sep 2024 19:14:11 + Subject: [PATCH] Deprecate the `-fbasic-block-sections=labels` option. This featu

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

2024-09-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this, I'm super excited for the ability to write plugins that work on Windows! https://github.com/llvm/llvm-project/pull/109024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -189,19 +190,23 @@ #define LLVM_TEMPLATE_ABI __declspec(dllimport) #define LLVM_EXPORT_TEMPLATE #endif +#define LLVM_ABI_EXPORT __declspec(dllexport) AaronBallman wrote: I think this is subtle enough that we may need some documentation comments explaining

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread Abhina Sree via cfe-commits
@@ -323,10 +325,11 @@ ErrorOr RealFileSystem::status(const Twine &Path) { } ErrorOr> -RealFileSystem::openFileForRead(const Twine &Name) { +RealFileSystem::openFileForRead(const Twine &Name, bool IsText) { SmallString<256> RealName, Storage; Expected FDOrErr = sys::fs::

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

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

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-09-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: One thing I don't understand about this PR is why we need Compiler.h in Clang -- wouldn't the LLVM definitions in their Compiler.h work for Clang as well? (This would probably be worth explaining in the patch summary.) https://github.com/llvm/llvm-pro

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-09-20 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,69 @@ +//===-- clang/Support/Compiler.h - Compiler abstraction support -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [ADT] Simplify SmallSet (PR #109412)

2024-09-20 Thread Victor Campos via cfe-commits
https://github.com/vhscampos edited https://github.com/llvm/llvm-project/pull/109412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-20 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-09-20T09:14:26-04:00 New Revision: da36603148baf37d3625aa030b4c05bf5785cae2 URL: https://github.com/llvm/llvm-project/commit/da36603148baf37d3625aa030b4c05bf5785cae2 DIFF: https://github.com/llvm/llvm-project/commit/da36603148baf37d3625aa030b4c05bf5785cae2.diff

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

2024-09-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! 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] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed 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] [Clang][Sema] Fix templated array size calculation. (PR #96464)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM, feel free to merge. 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] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
@@ -1,7 +1,7 @@ ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV ; CHECK-SPIRV: %[[#Int:]] = OpTypeInt 32 0 -; CHECK-SPIRV-DAG: %[[#MemScope_Device:]] = OpConstant %[[#Int]] 1 +; CHECK-SPIRV-DAG: %[[#MemScope_AllSvmDevic

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/109255 >From 85ac319257785f88fd27a533fffde7aab20c8d8d Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Wed, 18 Sep 2024 16:22:41 +0100 Subject: [PATCH 1/5] [clang] Lifetime of locals must end before musttail call

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

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
@@ -5,8 +5,8 @@ ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %} ; CHECK: %[[#Int:]] = OpTypeInt 32 0 -; CHECK-DAG: %[[#Scope_Device:]] = OpConstant %[[#Int]] 1{{$}} -; CHECK-DAG: %[[#MemSem_Relaxed:]] = OpConstant %[

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

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
https://github.com/VyacheslavLevytskyy edited https://github.com/llvm/llvm-project/pull/106429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Oliver Stannard via cfe-commits
@@ -267,3 +267,30 @@ namespace ns {} void TestCallNonValue() { [[clang::musttail]] return ns; // expected-error {{unexpected namespace name 'ns': expected expression}} } + +// Test diagnostics for lifetimes of local variables, which end earlier for a +// musttail call than f

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Oliver Stannard via cfe-commits
@@ -637,6 +637,11 @@ return value must be trivially destructible. The calling convention of the caller and callee must match, and they must not be variadic functions or have old style K&R C function declarations. +The lifetimes of all local variables and function parameters e

  1   2   3   4   5   >