[clang] [clang][bytecode] Fix three-way unordered non-pointer comparisions (PR #127759)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This _can_ happen with non-pointers, but we shouldn't diagnose it in that case. --- Full diff: https://github.com/llvm/llvm-project/pull/127759.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/In

[clang] [clang][bytecode] Fix three-way unordered non-pointer comparisions (PR #127759)

2025-02-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/127759 This _can_ happen with non-pointers, but we shouldn't diagnose it in that case. >From 1b4f4b78741e297e8d257af427206f3dbc3501d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 19 Feb 202

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread via cfe-commits
@@ -20212,6 +20212,59 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_wave_reduce_add_i32: + case AMDGPU::BI__builtin_amdg

[clang] [clang][TSA] Make RequiresCapability a DeclOrType attribute (PR #67095)

2025-02-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67095 >From 1bb62210a2ec5342111a0407cbfa8a73d761357f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 22 Sep 2023 08:42:05 +0200 Subject: [PATCH] [clang][TSA] Make RequiresCapability a DeclOrTyp

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/8367 Here is the relevant piece of the bu

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Noticed this while looking at https://github.com/llvm/llvm-project/issues/120175. The range information originates as a `CharSourceRange` in `MacroOccurrence::toRange()`, then it's converted to `clangd::Range` using `halfOpenToRange()`. Then we convert it back to a `Sour

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes … --- Full diff: https://github.com/llvm/llvm-project/pull/127757.diff 3 Files Affected: - (modified) clang-tools-extra/clangd/CollectMacros.cpp (+6-3) - (modified) clang-tools-extra/clangd/Collec

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > (For example `ClangdModules` was an action we were trying to take in this > direction. It actually aims to provide people infrastructure to implement > their desired functionality in clangd, while limiting resource and > maintenance costs to only that specific feature a

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes … --- Full diff: https://github.com/llvm/llvm-project/pull/127757.diff 3 Files Affected: - (modified) clang-tools-extra/clangd/CollectMacros.cpp (+6-3) - (modified) clang-tools-extra/cl

[clang-tools-extra] [clangd] Avoid round-trip from SourceLocation to clangd::Range and back in SymbolCollector::handleMacros() (PR #127757)

2025-02-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/127757 … >From d7f83b154b17856b1de2d97cf0a3aca72dd0379c Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 19 Feb 2025 02:25:16 -0500 Subject: [PATCH] [clangd] Avoid round-trip from SourceLocation to clang

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -20212,6 +20212,59 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_wave_reduce_add_i32: + case AMDGPU::BI__builtin_amdg

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `clang` at step 12 "build-stage2-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/8866 He

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot1` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/10094 Here is the relevant piece of the

[clang-tools-extra] [clangd] Store full decl/def range with symbol locations (PR #118102)

2025-02-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > I notice that there are four fields in the Symbol struct that are only > relevant for symbols indexed for completion. Presumably these would be > candidates for such an extension block? I think that depends on what proportion of symbols are indexed for completion. I wa

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > @metaflow @vitalybuka I've checked in > [8f41d28](https://github.com/llvm/llvm-project/commit/8f41d28d89ee287d0f5a6518116ab316be2657b8) > to fix warnings. Thanks! Thank You! https://github.com/llvm/llvm-project/pull/127063 ___ cf

[clang] Reland "[libclang] Always Dup in createRef(StringRef)" (PR #127078)

2025-02-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/127078 >From a831b96cc2eb4b65e7157ee3cb519cf9b4a6af76 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 13 Feb 2025 07:42:46 -0800 Subject: [PATCH] Revert "Revert "[libclang] Always Dup in createRef(StringRef)"

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread Kazu Hirata via cfe-commits
kazutakahirata wrote: @metaflow @vitalybuka I've checked in 8f41d28d89ee287d0f5a6518116ab316be2657b8 to fix warnings. Thanks! https://github.com/llvm/llvm-project/pull/127063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,69 @@ +// RUN: %check_clang_tidy %s bugprone-unintended-char-ostream-output %t + +namespace std { + +template class basic_ostream { +public: + basic_ostream &operator<<(int); + basic_ostream &operator<<(unsigned int); +}; + +template +basic_ostream &operator<<(basic

[clang] 8f41d28 - [c-index-test] Fix warnings

2025-02-18 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2025-02-18T23:18:08-08:00 New Revision: 8f41d28d89ee287d0f5a6518116ab316be2657b8 URL: https://github.com/llvm/llvm-project/commit/8f41d28d89ee287d0f5a6518116ab316be2657b8 DIFF: https://github.com/llvm/llvm-project/commit/8f41d28d89ee287d0f5a6518116ab316be2657b8.diff L

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,30 @@ +.. title:: clang-tidy - bugprone-unintended-char-ostream-output + +bugprone-unintended-char-ostream-output +=== + +Finds unintended character output from ``unsigned char`` and ``signed char`` to an +``ostream``. + +Normally, w

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot8` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/3 Here is the relevant piece of the

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-18 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Maybe @vgvassilev might know more about this behaviour and if it is expected. For some context you can read the discussion from here https://github.com/llvm/llvm-project/pull/127087#issuecomment-2664564232 https://github.com/llvm/llvm-project/pull/127087 _

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread via cfe-commits
@@ -20212,6 +20212,59 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_wave_reduce_add_i32: + case AMDGPU::BI__builtin_amdg

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 1/2] [clang-tidy]add new check bugprone-unintended-char-ostre

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -346,6 +346,24 @@ BUILTIN(__builtin_amdgcn_endpgm, "v", "nr") BUILTIN(__builtin_amdgcn_get_fpenv, "WUi", "n") BUILTIN(__builtin_amdgcn_set_fpenv, "vWUi", "n") +//===--===// + +// Wave Reduction builtins. +

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread via cfe-commits
@@ -20212,6 +20212,59 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_wave_reduce_add_i32: + case AMDGPU::BI__builtin_amdg

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -20212,6 +20212,59 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_wave_reduce_add_i32: + case AMDGPU::BI__builtin_amdg

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -20212,6 +20212,59 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, llvm::Value *Env = EmitScalarExpr(E->getArg(0)); return Builder.CreateCall(F, {Env}); } + case AMDGPU::BI__builtin_amdgcn_wave_reduce_add_i32: + case AMDGPU::BI__builtin_amdg

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-18 Thread Matt Arsenault via cfe-commits
@@ -346,6 +346,24 @@ BUILTIN(__builtin_amdgcn_endpgm, "v", "nr") BUILTIN(__builtin_amdgcn_get_fpenv, "WUi", "n") BUILTIN(__builtin_amdgcn_set_fpenv, "vWUi", "n") +//===--===// + +// Wave Reduction builtins. +

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-18 Thread Michael Flanders via cfe-commits
Flandini wrote: Going to add tests for placement new and user-defined placement new operator with list initializers also https://github.com/llvm/llvm-project/pull/127702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-18 Thread Michael Flanders via cfe-commits
https://github.com/Flandini updated https://github.com/llvm/llvm-project/pull/127702 >From 12791f2c89f7e42bd261ac573c2497857c42b6f3 Mon Sep 17 00:00:00 2001 From: Michael Flanders Date: Tue, 18 Feb 2025 15:56:13 -0600 Subject: [PATCH 1/5] [analyzer] Do list initialization for CXXNewExpr with i

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-18 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hmmm confused ! So does it really come down to the flag responsible for enabling assertions. `LLVM_ENABLE_ASSERTIONS=ON` https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-18 Thread Michael Klemm via cfe-commits
mjklemm wrote: One warning per source file is what is being done for -fopenmp at the moment. So, it should be fine to do that. https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-18 Thread Michael Flanders via cfe-commits
https://github.com/Flandini updated https://github.com/llvm/llvm-project/pull/127702 >From 12791f2c89f7e42bd261ac573c2497857c42b6f3 Mon Sep 17 00:00:00 2001 From: Michael Flanders Date: Tue, 18 Feb 2025 15:56:13 -0600 Subject: [PATCH 1/4] [analyzer] Do list initialization for CXXNewExpr with i

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-02-18 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/125643 >From 0aebcd7119fbcd51154c5d9706752e8ff3f041bc Mon Sep 17 00:00:00 2001 From: ShashwathiNavada Date: Tue, 4 Feb 2025 00:16:09 -0600 Subject: [PATCH 1/6] Adding diagnostics for unsupported option --- c

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-18 Thread Ryosuke Niwa via cfe-commits
@@ -87,6 +92,31 @@ class RawPtrRefMemberChecker } } + void visitObjCDecl(const ObjCContainerDecl *CD) const { +if (auto *ID = dyn_cast(CD)) { + for (auto *Ivar : ID->ivars()) +visitIvarDecl(CD, Ivar); + return; +} +if (auto *ID = dyn_cast(C

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-18 Thread Ryosuke Niwa via cfe-commits
@@ -87,6 +92,31 @@ class RawPtrRefMemberChecker } } + void visitObjCDecl(const ObjCContainerDecl *CD) const { +if (auto *ID = dyn_cast(CD)) { rniwa wrote: oh, but this if statement does that already, right? as in, this if will only evaluate to tru

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-18 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @mjklemm suggested to add a warning that the pass is still experimental, which I think is a good idea. However, I am wondering what the best place for that warning would be? I prefer not to do that in `CodeGenAction::beginSourceFileAction()` (where we inspect the flag and actual

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-18 Thread via cfe-commits
bd1976bris wrote: > Some high level comments: > * Should we just call it distributedLTO, or DLTO? Feel like we can drop the > thin part for less typing, and from the user's point of view, using thinLTO > infrastructure is just implementation details. Thanks! I'll discuss this and get back to y

[clang] [Driver][MSVC] Pass profile file to lld-link via -lto-sample-profile option (PR #127442)

2025-02-18 Thread via cfe-commits
https://github.com/tianleliu closed https://github.com/llvm/llvm-project/pull/127442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6c39ee7 - [Driver][MSVC] Pass profile file to lld-link via -lto-sample-profile option (#127442)

2025-02-18 Thread via cfe-commits
Author: tianleliu Date: 2025-02-19T12:45:45+08:00 New Revision: 6c39ee717f03a0fe28f563d525fa5aff09804ba8 URL: https://github.com/llvm/llvm-project/commit/6c39ee717f03a0fe28f563d525fa5aff09804ba8 DIFF: https://github.com/llvm/llvm-project/commit/6c39ee717f03a0fe28f563d525fa5aff09804ba8.diff LOG

[clang] [Driver][MSVC] Pass profile file to lld-link via -lto-sample-profile option (PR #127442)

2025-02-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/127442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-18 Thread Rashmi Mudduluru via cfe-commits
@@ -87,6 +92,31 @@ class RawPtrRefMemberChecker } } + void visitObjCDecl(const ObjCContainerDecl *CD) const { +if (auto *ID = dyn_cast(CD)) { t-rasmud wrote: Ah ok. I was wondering if we should check for dullness before dereferencing `ID` in the n

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

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

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: I am kind of confused now. So the situation here is that RVIOS has already implemented these vendor extensions in cores and RVIOS is also trying to make these extensions official RVI standards, right? https://github.com/llvm/llvm-project/pull/127694 ___

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-18 Thread Ryosuke Niwa via cfe-commits
@@ -87,6 +92,31 @@ class RawPtrRefMemberChecker } } + void visitObjCDecl(const ObjCContainerDecl *CD) const { +if (auto *ID = dyn_cast(CD)) { + for (auto *Ivar : ID->ivars()) +visitIvarDecl(CD, Ivar); + return; +} +if (auto *ID = dyn_cast(C

[clang] Check the type of Objective-C++ instance variables in WebKit member variable checkers. (PR #127570)

2025-02-18 Thread Ryosuke Niwa via cfe-commits
@@ -87,6 +92,31 @@ class RawPtrRefMemberChecker } } + void visitObjCDecl(const ObjCContainerDecl *CD) const { +if (auto *ID = dyn_cast(CD)) { rniwa wrote: I don't think so. `ObjCContainerDecl` could be `ObjCCategoryDecl` or `ObjCProtocolDecl` as w

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/127555 >From c6df3aa9b9769d096d2cd63fc2353665ec9edbd1 Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Tue, 18 Feb 2025 10:00:25 +0800 Subject: [PATCH] [clang][LoongArch] Add OHOS target Add support for OHOS on loonga

[clang] Inital support for privavate variable reduction (PR #127740)

2025-02-18 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale created https://github.com/llvm/llvm-project/pull/127740 None >From cf392f05f9499fd0621ffec91a3b852d4b91820b Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Tue, 18 Feb 2025 21:24:22 -0600 Subject: [PATCH] Inital support for privavate variable reduction ---

[clang] [Driver][MSVC] Pass profile file to lld-link via -lto-sample-profile option (PR #127442)

2025-02-18 Thread via cfe-commits
https://github.com/tianleliu edited https://github.com/llvm/llvm-project/pull/127442 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][MSVC] Add lto-sample-profile option for lld-link (PR #127442)

2025-02-18 Thread via cfe-commits
https://github.com/tianleliu updated https://github.com/llvm/llvm-project/pull/127442 >From ad4d2857220e5e5b31cd66a79eac7d8dca438864 Mon Sep 17 00:00:00 2001 From: tianleli Date: Mon, 17 Feb 2025 11:24:10 +0800 Subject: [PATCH 1/3] [SPGO][Driver] Add lto-sample-profile option for lld-link SPGO

[clang] [clang][X86] Only define __CET__ macro for X86 targets (PR #127616)

2025-02-18 Thread Ming-Yi Lai via cfe-commits
mylai-mtk wrote: > Can you update the description to mention which PR makes RISCV targets > inspect -fcf-protection=? Added PR links. Thanks! https://github.com/llvm/llvm-project/pull/127616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [C++20] [Modules] Instantiate pending instantiations when GMF ends (PR #126842)

2025-02-18 Thread Chuanqi Xu via cfe-commits
@@ -1104,9 +1104,13 @@ void Sema::ActOnStartOfTranslationUnit() { } void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { - // No explicit actions are required at the end of the global module fragment. - if (Kind == TUFragmentKind::Global) + if (Kind == TUFrag

[clang] [Driver][MSVC] Add lto-sample-profile option for lld-link (PR #127442)

2025-02-18 Thread Haohai Wen via cfe-commits
HaohaiWen wrote: This tittle looks like you are adding a new option -lto-sample-profile for LLD. It's recommended to rename the tittle so that other developer can easily know you are trying to pass profile file to lto backend via -lto-sample-profile. https://github.com/llvm/llvm-project/pull/12

[clang] [HLSL] Implement the 'and' HLSL function (PR #127098)

2025-02-18 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/127098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Tooling] Support relative directory in compilation database (PR #127734)

2025-02-18 Thread Keith Smiley via cfe-commits
https://github.com/keith updated https://github.com/llvm/llvm-project/pull/127734 >From b8c294fcd30153842e1c0741fc623f45317618b1 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 19 Feb 2025 01:54:42 + Subject: [PATCH] [clang][Tooling] Support relative directory in compilation databas

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Helena Kotas via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [clang][Tooling] Support relative directory in compilation database (PR #127734)

2025-02-18 Thread Keith Smiley via cfe-commits
@@ -399,6 +399,32 @@ TEST(findCompileArgsInJsonDatabase, FindsEntry) { EXPECT_EQ("command4", FoundCommand.CommandLine[0]) << ErrorMessage; } +TEST(findCompileArgsInJsonDatabase, FindsEntryRelativeDirectory) { + StringRef Directory("."); + StringRef FileName("file"); + Str

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Helena Kotas via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [clang][Tooling] Support relative directory in compilation database (PR #127734)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Keith Smiley (keith) Changes This allows you to use `"directory": ".",` in `compile_commands.json` and have it be understood for file lookup by `clangd`. --- Full diff: https://github.com/llvm/llvm-project/pull/127734.diff 2 Files Affec

[clang] [clang][Tooling] Support relative directory in compilation database (PR #127734)

2025-02-18 Thread Keith Smiley via cfe-commits
https://github.com/keith created https://github.com/llvm/llvm-project/pull/127734 This allows you to use `"directory": ".",` in `compile_commands.json` and have it be understood for file lookup by `clangd`. >From 6ad2014e4c69c3d949f081b522630f804a4db567 Mon Sep 17 00:00:00 2001 From: Keith Smi

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Helena Kotas via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
@@ -741,16 +741,28 @@ std::unique_ptr AllocateTarget(const llvm::Triple &Triple, case llvm::Triple::loongarch32: switch (os) { case llvm::Triple::Linux: - return std::make_unique>(Triple, - Opt

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
@@ -2458,7 +2458,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( static const char *const LoongArch64LibDirs[] = {"/lib64", "/lib"}; static const char *const LoongArch64Triples[] = { - "loongarch64-linux-gnu", "loongarch64-unknown-linux-gnu"};

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
https://github.com/SixWeining commented: I think you should add more tests like `clang/test/Driver/loongarch-toolchain.c` and https://reviews.llvm.org/D55029. https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
https://github.com/SixWeining commented: LGTM for the LoongArch change. We'll see if @kpdev has any objections later. https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
https://github.com/SixWeining edited https://github.com/llvm/llvm-project/pull/127555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
@@ -368,7 +370,12 @@ void OHOS::addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const { CmdArgs.push_back("-z"); CmdArgs.push_back("relro"); CmdArgs.push_back("-z"); - CmdArgs.push_back("max-page-size=4096"); + // LoongArch needs page size 16K SixWeini

[clang] [clang][LoongArch] Add OHOS target (PR #127555)

2025-02-18 Thread Lu Weining via cfe-commits
@@ -368,7 +370,12 @@ void OHOS::addExtraOpts(llvm::opt::ArgStringList &CmdArgs) const { CmdArgs.push_back("-z"); CmdArgs.push_back("relro"); CmdArgs.push_back("-z"); - CmdArgs.push_back("max-page-size=4096"); + // LoongArch needs page size 16K + if (getArch() == llvm:

[clang] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-18 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'm not really happy with that... but if the semantics were never properly defined in the first place, I guess this isn't making things worse. Not sure if marking the allocas themselves is actually the right approach long-term. It seems like there's a distinction between

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/124886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Helena Kotas via cfe-commits
@@ -56,9 +75,18 @@ llvm::Type *DirectXTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM, return llvm::TargetExtType::get(Ctx, TypeName, {ElemType}, Ints); } - case llvm::dxil::ResourceClass::CBuffer: -llvm_unreachable("dx.CBuffer handles are not implemented yet");

[clang] [NFC][Clang][CodeGen] Remove vestigial assertion (PR #127528)

2025-02-18 Thread Joseph Huber via cfe-commits
jhuber6 wrote: The fix will need to be backported, but I don't think this fixed it all the way so we'll need another follow-up. https://github.com/llvm/llvm-project/pull/127528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread via cfe-commits
@@ -91,6 +91,12 @@ Improvements to clang-tidy New checks ^^ +- New :doc:`bugprone-unintended-char-ostream-output + ` check. + + Finds unintended character output from `unsigned char` and `signed char` to an EugeneZelenko wrote: ```suggestion Find

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread via cfe-commits
@@ -0,0 +1,70 @@ +//===--- UnintendedCharOstreamOutputCheck.cpp - clang-tidy +//-===// EugeneZelenko wrote: Should be merged into previous line. https://github.com/llvm/llvm-project/pull/127720 ___

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread via cfe-commits
@@ -0,0 +1,30 @@ +.. title:: clang-tidy - bugprone-unintended-char-ostream-output + +bugprone-unintended-char-ostream-output +=== + +Finds unintended character output from `unsigned char` and `signed char` to an EugeneZelenko wr

[clang-tools-extra] [clang-tidy]add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-18 Thread via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %check_clang_tidy %s bugprone-unintended-char-ostream-output %t + +namespace std { + +template class basic_ostream { +public: + basic_ostream &operator<<(int); + basic_ostream &operator<<(unsigned int); +}; + +template +basic_ostream &operator<<(basic

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// 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] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// 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] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -56,9 +75,18 @@ llvm::Type *DirectXTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM, return llvm::TargetExtType::get(Ctx, TypeName, {ElemType}, Ints); } - case llvm::dxil::ResourceClass::CBuffer: -llvm_unreachable("dx.CBuffer handles are not implemented yet");

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -115,48 +83,176 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() { return CGM.getTarget().getTriple().getArch(); } -void CGHLSLRuntime::addConstant(VarDecl *D, Buffer &CB) { - if (D->getStorageClass() == SC_Static) { -// For static inside cbuffer, take as global st

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// 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] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: This is looking pretty good, though I have some misgivings about `CommonHLSLTargetCodeGenInfo` and think it might be better to introduce a `HLSLLayoutBuilder` that can be used by targets as necessary instead. If you take that suggestion a couple of my comme

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/124886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Constant buffers codegen (PR #124886)

2025-02-18 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +//===- HLSLTargetInfo.h ---===// +// +// 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] [WebAssembly] Enable extended-const feature by default (PR #127721)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-webassembly Author: Sam Clegg (sbc100) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/127721.diff 6 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+7) - (modified) clang/lib/Basic/Targets/WebAssembly.cpp (+1) -

[clang] [llvm] [WebAssembly] Enable extended-const feature by default (PR #127721)

2025-02-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sam Clegg (sbc100) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/127721.diff 6 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+7) - (modified) clang/lib/Basic/Targets/WebAssembly.cpp (+1) - (modified) cl

[clang] [llvm] [WebAssembly] Enable extended-const feature by default (PR #127721)

2025-02-18 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 created https://github.com/llvm/llvm-project/pull/127721 None >From 6d8b255090f08835b8b6b22e7c3d2abfe5ef7531 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Tue, 18 Feb 2025 15:34:13 -0800 Subject: [PATCH] [WebAssembly] Enable extended-const feature by default --- cl

[clang] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread David Olsen via cfe-commits
@@ -0,0 +1,134 @@ +//===--===// +// +// 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] [CIR] Upstream simple function bodies (PR #127674)

2025-02-18 Thread David Olsen via cfe-commits
@@ -0,0 +1,203 @@ +//===--===// +// +// 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] [-Wunsafe-buffer-usage] Add absl::{Span,string_view} to UnsafeBufferUsage analysis (PR #127698)

2025-02-18 Thread via cfe-commits
https://github.com/mxms0 edited https://github.com/llvm/llvm-project/pull/127698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Sam Elliott via cfe-commits
@@ -721,6 +721,8 @@ DecodeStatus RISCVDisassembler::getInstruction32(MCInst &MI, uint64_t &Size, "Qualcomm uC Conditional Move custom opcode table"); TRY_TO_DECODE_FEATURE(RISCV::FeatureVendorXqciint, DecoderTableXqciint32, "Qu

[clang] [clang][docs] Fix typos concerning wasm __funcref (PR #124365)

2025-02-18 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/124365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9bf582f - [clang][docs] Fix typos concerning wasm __funcref (#124365)

2025-02-18 Thread via cfe-commits
Author: Timothy Herchen Date: 2025-02-18T14:55:38-08:00 New Revision: 9bf582fc090f28c2423fdf472635c39145a13bc9 URL: https://github.com/llvm/llvm-project/commit/9bf582fc090f28c2423fdf472635c39145a13bc9 DIFF: https://github.com/llvm/llvm-project/commit/9bf582fc090f28c2423fdf472635c39145a13bc9.dif

[clang] [llvm] [RISCV] Assembler support for XRivosVizip (PR #127694)

2025-02-18 Thread Jessica Clarke via cfe-commits
@@ -202,6 +202,7 @@ // CHECK-NEXT: xqcilo 0.2 'Xqcilo' (Qualcomm uC Large Offset Load Store Extension) // CHECK-NEXT: xqcilsm 0.2 'Xqcilsm' (Qualcomm uC Load Store Multiple Extension) // CHECK-NEXT: xqcisls 0.2

  1   2   3   4   5   6   >