[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-10-28 Thread Haojian Wu via cfe-commits
hokein wrote: > Thanks for the reviews! > > > ``` > > * can you give a description if what needs to be done in subsequent PRs? > > (maybe cxx_status.html should say "partial" > > ``` > > The remaining tasks are: > > * Supporting dependent using-declarators such as `using Derived::Base::Base`

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-28 Thread Ming-Yi Lai via cfe-commits
mylai-mtk wrote: LGTM. Thanks. https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-28 Thread Ronan Keryell via cfe-commits
@@ -407,7 +407,8 @@ def MicrosoftExt : LangOpt<"MicrosoftExt">; def Borland : LangOpt<"Borland">; def CUDA : LangOpt<"CUDA">; def HIP : LangOpt<"HIP">; -def SYCL : LangOpt<"SYCLIsDevice">; +def SYCLHost : LangOpt<"SYCLIsHost">; keryell wrote: On the other hand

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Ronan Keryell via cfe-commits
https://github.com/keryell edited https://github.com/llvm/llvm-project/pull/113483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Ronan Keryell via cfe-commits
https://github.com/keryell commented: Nice! https://github.com/llvm/llvm-project/pull/113483 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Ronan Keryell via cfe-commits
@@ -0,0 +1,38 @@ +//===- CIRAttrs.cpp - MLIR CIR Attributes -===// +// +// 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] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-28 Thread Jesse Huang via cfe-commits
jaidTw wrote: @mylai-mtk could you take a look at the latest version? I'm gonna merge it if it looks good to you too https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] [clang-format] convert path to Windows path if user is using a MSYS2 shell (PR #111526)

2024-10-28 Thread Gary Wang via cfe-commits
BLumia wrote: @HazardyKnusperkeks @owenca @cor3ntin sorry for the ping, kindly asking for a review. Thanks in advance! https://github.com/llvm/llvm-project/pull/111526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
@@ -83,6 +83,77 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Jan Svoboda via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
MaxEW707 wrote: > Windows should use `-fuse-ld=lld` as well, not `-fuse-ld=lld-link` Is `-fuse-ld=lld-link` intended to be an allowable option? Right now we don't issue any error if a user passes in `lld-link`. I am interpreting your statement as suggesting we should do something like followi

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

2024-10-28 Thread Amir Ayupov via cfe-commits
aaupov wrote: Ping @wlei-llvm @WenleiHe https://github.com/llvm/llvm-project/pull/79942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: Windows should use `-fuse-ld=lld` as well, not `-fuse-ld=lld-link` https://github.com/llvm/llvm-project/pull/113966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove ignored Flag form of -fauto-profile/-fprofile-sample-use (PR #113528)

2024-10-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Regarding the default filename extension, it doesn't have to be `.profdata` > for `fprofile-sample-use`, it can be the `.afdo`, or any other extension > deemed proper. `fprofile-sample-use` and `fprofile-use` would behave > similarly then: they would look for a `default` file

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Jan Svoboda via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] [compiler-rt] Reapply " [XRay] Add support for instrumentation of DSOs on x86_64 (#90959)" (PR #113548)

2024-10-28 Thread Jordan Rupprecht via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fPIC -fxray-instrument -fxray-shared -c %s -o /dev/null 2>&1 | FileCheck %s +// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fpic -fxray-instrument -fxray-shared -c %s -o /dev/null 2>&1 | FileCheck %

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-designated-initializers check (PR #113688)

2024-10-28 Thread via cfe-commits
z1nke wrote: Hi, I don’t have write access to merge code, and this is my first commit to clang-tidy. What else needs to be done to merge this PR? Thanks! https://github.com/llvm/llvm-project/pull/113688 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Zhaoshi Zheng via cfe-commits
https://github.com/zhaoshiz updated https://github.com/llvm/llvm-project/pull/113966 >From 5259a3b00fe1b841e8548443036a943b169970dc Mon Sep 17 00:00:00 2001 From: Zhaoshi Zheng Date: Mon, 28 Oct 2024 14:35:35 -0700 Subject: [PATCH 1/2] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabl

[libclc] [libclc] Create an internal 'clc' builtins library (PR #109985)

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

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov_dpp8 (PR #113610)

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

[clang] [llvm] [RISCV] Mark RVB23U64 and RVB23S64 as non-experimental (PR #113918)

2024-10-28 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. Cheers! LGTM! https://github.com/llvm/llvm-project/pull/113918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Jan Svoboda via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-28 Thread David Salinas via cfe-commits
https://github.com/david-salinas updated https://github.com/llvm/llvm-project/pull/113628 >From 2ab5bea395fce329be6bbcd8c04f9a9bd9da05df Mon Sep 17 00:00:00 2001 From: David Salinas Date: Tue, 22 Oct 2024 18:58:47 + Subject: [PATCH] Remove Linux search paths on Windows Change-Id: Ia0b44eb1

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -127,50 +128,64 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate( -PathRef ModuleFilePath, -const PrerequisiteModules &RequisiteModules) { -IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(new DiagnosticOptions(

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-28 Thread David Salinas via cfe-commits
https://github.com/david-salinas updated https://github.com/llvm/llvm-project/pull/113628 >From 307e0abed8387b0bffa4b7e24e995ad7ec402749 Mon Sep 17 00:00:00 2001 From: David Salinas Date: Tue, 22 Oct 2024 18:58:47 + Subject: [PATCH] Remove Linux search paths on Windows Change-Id: Ia0b44eb1

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Jan Svoboda via cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader serialization::InputFile getInputFile(ModuleFile &F, unsigned ID, bool Complain = true); + /// Buffer we use as temporary storage backing resolved paths. + SmallString<256> PathBuf;

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -127,33 +127,39 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate(PathRef ModuleFilePath, - const PrerequisiteModules &RequisiteModules, - llvm::IntrusiveRefCntPtr VFS) { +bool IsModuleFileU

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-28 Thread David Salinas via cfe-commits
https://github.com/david-salinas updated https://github.com/llvm/llvm-project/pull/113628 >From ee17fe072310a55e004134bb793a18b8089b4020 Mon Sep 17 00:00:00 2001 From: David Salinas Date: Tue, 22 Oct 2024 18:58:47 + Subject: [PATCH] Remove Linux search paths on Windows Change-Id: Ia0b44eb1

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/113879 >From 99e1989c3b2fad7702795a707d130fe96a93f42f Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 28 Oct 2024 15:54:37 +0800 Subject: [PATCH 1/2] [clangd] [Modules] Use ASTReader directly in IsModuleFileUp

[clang-tools-extra] [clangd] [Modules] Use ASTReader directly in IsModuleFileUpToDate (PR #113879)

2024-10-28 Thread Chuanqi Xu via cfe-commits
@@ -127,50 +128,64 @@ struct ModuleFile { std::string ModuleFilePath; }; -bool IsModuleFileUpToDate( -PathRef ModuleFilePath, -const PrerequisiteModules &RequisiteModules) { -IntrusiveRefCntPtr Diags = - CompilerInstance::createDiagnostics(new DiagnosticOptions(

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 edited https://github.com/llvm/llvm-project/pull/113966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][OpenCL] Fix `alloca` handling & `sret`when compiling for (PR #113930)

2024-10-28 Thread Alex Voicu via cfe-commits
@@ -108,11 +108,15 @@ RawAddress CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, CharUnits Align, if (AllocaAddr) *AllocaAddr = Alloca; llvm::Value *V = Alloca.getPointer(); + assert((!getLangOpts().OpenCL || + CGM.getTarget().getTargetAddressSpace(getASTAl

[clang] [clang][CodeGen][OpenCL] Fix `alloca` handling & `sret`when compiling for (PR #113930)

2024-10-28 Thread Matt Arsenault via cfe-commits
@@ -108,11 +108,15 @@ RawAddress CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, CharUnits Align, if (AllocaAddr) *AllocaAddr = Alloca; llvm::Value *V = Alloca.getPointer(); + assert((!getLangOpts().OpenCL || + CGM.getTarget().getTargetAddressSpace(getASTAl

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
@@ -0,0 +1,15 @@ +// REQUIRES: aarch64-registered-target +// +// RUN: echo "int main() {} " > %t.c +// +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -c %t.c -o %t.o +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -### %t.o 2>&1 |

[clang] [clang][NFC] Add test for CWG issues about linkage in cross-TU context (PR #113736)

2024-10-28 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: LGTM. Thanks https://github.com/llvm/llvm-project/pull/113736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-28 Thread Max Winkler via cfe-commits
@@ -0,0 +1,15 @@ +// REQUIRES: aarch64-registered-target +// +// RUN: echo "int main() {} " > %t.c +// +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -c %t.c -o %t.o +// RUN: %clang --target=aarch64-pc-windows-msvc -O3 -flto -fuse-ld=lld -### %t.o 2>&1 |

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,55 @@ +include "llvm/Option/OptParser.td" + +def WrapperOnlyOption : OptionFlag; + +def help : Flag<["-", "--"], "help">, + HelpText<"Display available options (--help-hidden for more)">; + +def help_hidden : Flag<["-", "--"], "help-hidden">, + HelpText<"Display all a

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// 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: Apac

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// 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: Apac

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-designated-initializers check (PR #113688)

2024-10-28 Thread via cfe-commits
https://github.com/z1nke updated https://github.com/llvm/llvm-project/pull/113688 >From a2184027393c9e9605aaa08f1d1eef4b11cd9be1 Mon Sep 17 00:00:00 2001 From: czn Date: Fri, 25 Oct 2024 21:48:50 +0800 Subject: [PATCH 1/3] [clang-tidy] Fix crash in modernize-use-designated-initializers check

[clang-tools-extra] [clang-tidy] Fix crash in modernize-use-designated-initializers check (PR #113688)

2024-10-28 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/113688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,55 @@ +include "llvm/Option/OptParser.td" + +def WrapperOnlyOption : OptionFlag; + +def help : Flag<["-", "--"], "help">, + HelpText<"Display available options (--help-hidden for more)">; + +def help_hidden : Flag<["-", "--"], "help-hidden">, + HelpText<"Display all a

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// 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: Apac

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,13 @@ +// Tests the driver when linking LLVM IR bitcode files and targeting SPIR-V +// architecture. +// +// RUN: touch %t.bc +// RUN: %clangxx --target=spirv64 --sycl-link -### %t.bc 2>&1 \ +// RUN: | FileCheck %s -check-prefix=LINK +// LINK: "{{.*}}clang-sycl-linker

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,500 @@ +//= clang-sycl-linker/ClangSYCLLinker.cpp - SYCL Linker util ---=// +// +// 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: Apac

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc bader wrote: ```suggestion // RUN: %clangxx -emit-llvm -c %s -o %t.bc ``` `-fsycl` is useless here. We just nee

[clang] [Clang][SYCL] Introduce clang-sycl-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-28 Thread Alexey Bader via cfe-commits
@@ -0,0 +1,42 @@ +// Tests the clang-sycl-linker tool. +// +// Test a simple case without arguments. +// RUN: %clangxx -fsycl -emit-llvm -c %s -o %t.bc +// RUN: clang-sycl-linker --dry-run -triple spirv64 %t.bc -o a.spv 2>&1 \ +// RUN: | FileCheck %s --check-prefix=SIMPLE +// SI

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-28 Thread Craig Topper via cfe-commits
topperc wrote: @T-Tie can you pull from main and fix the conflicts? https://github.com/llvm/llvm-project/pull/111837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Reject field access with nullptr base (PR #113885)

2024-10-28 Thread Richard Smith via cfe-commits
@@ -1703,7 +1703,7 @@ namespace { bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) { if (Designator.Invalid) return false; - if (IsNullPtr) { + if (getLValueBase().isNull()) { zygoloid wrote: Oh, I see. We're adjustin

[clang] [clang][ExprConst] Reject field access with nullptr base (PR #113885)

2024-10-28 Thread Richard Smith via cfe-commits
@@ -1703,7 +1703,7 @@ namespace { bool checkNullPointerDiagnosingWith(const GenDiagType &GenDiag) { if (Designator.Invalid) return false; - if (IsNullPtr) { + if (getLValueBase().isNull()) { zygoloid wrote: Why was the old check not

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
@@ -83,6 +83,77 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes When reading a path from a bitstream blob, `ASTReader` performs up to three allocations: 1. Conversion of the `StringRef` blob into `std::string` to conform to the `ASTReader::ResolveImportedPat

[clang] [clang][modules] Avoid allocations when reading blob paths (PR #113984)

2024-10-28 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/113984 When reading a path from a bitstream blob, `ASTReader` performs up to three allocations: 1. Conversion of the `StringRef` blob into `std::string` to conform to the `ASTReader::ResolveImportedPath()` API t

[clang] Clang tooling generated visibility macros for Clang (PR #109702)

2024-10-28 Thread Tom Stellard via cfe-commits
tstellar wrote: Is there any reason why the tool should be in the monorepo and not some other repository? Also, as for keeping the annotations up-to-date. My recommendation is to add a github action job that runs the ids tool and then submits a pull request for any necessary changes. We co

[clang] [clang][ExprConst] Reject field access with nullptr base (PR #113885)

2024-10-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/113885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] First run at removing the linked-list for decls. Tests not run, but … (PR #113983)

2024-10-28 Thread Erich Keane via cfe-commits
erichkeane wrote: Clang format fails, I expected this, there is a ton of TODOs, commented out code, etc anyway, so I'll fix that after this 'proof of concept' shows promise. https://github.com/llvm/llvm-project/pull/113983 ___ cfe-commits mailing list

[clang] First run at removing the linked-list for decls. Tests not run, but … (PR #113983)

2024-10-28 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 19131c7f36e047898ea954ee5a187ac62f2ab09b 09c1c890394ecaa66b20cd933ba0d85c2141e34f --e

[clang] First run at removing the linked-list for decls. Tests not run, but … (PR #113983)

2024-10-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/113983 …it builds Note: this is a Draft until i can pass testing, clean this up, and figure out if this is of perf benefit. This is #2 here: https://github.com/llvm/llvm-project/issues/113950 >From 09c1c890394e

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Rashmi Mudduluru via cfe-commits
@@ -83,6 +83,77 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [llvm] [HLSL][SPIRV] Added clamp intrinsic (PR #113394)

2024-10-28 Thread Adam Yang via cfe-commits
@@ -83,12 +83,210 @@ entry: ret i64 %0 } -declare half @llvm.dx.clamp.f16(half, half, half) -declare float @llvm.dx.clamp.f32(float, float, float) -declare double @llvm.dx.clamp.f64(double, double, double) -declare i16 @llvm.dx.clamp.i16(i16, i16, i16) -declare i32 @llvm.dx.

[clang] [clang][bytecode] Implement __builtin_arithmetic_fence (PR #113937)

2024-10-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/113937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b46a048 - [clang][bytecode] Implement __builtin_arithmetic_fence (#113937)

2024-10-28 Thread via cfe-commits
Author: Timm Baeder Date: 2024-10-29T00:56:03+01:00 New Revision: b46a0482f9e4c0ee82b38da794b20f8f1a76f044 URL: https://github.com/llvm/llvm-project/commit/b46a0482f9e4c0ee82b38da794b20f8f1a76f044 DIFF: https://github.com/llvm/llvm-project/commit/b46a0482f9e4c0ee82b38da794b20f8f1a76f044.diff L

[clang] Remove Linux search paths on Windows (PR #113628)

2024-10-28 Thread David Salinas via cfe-commits
https://github.com/david-salinas updated https://github.com/llvm/llvm-project/pull/113628 >From 44f610ead0ec6e497f16771234067e7d96460666 Mon Sep 17 00:00:00 2001 From: David Salinas Date: Tue, 22 Oct 2024 18:58:47 + Subject: [PATCH] Remove Linux search paths on Windows Change-Id: Ia0b44eb1

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/113979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
@@ -48,6 +48,64 @@ bool isRefcountedStringsHack(const VarDecl *V) { return false; } +struct GuardianVisitor : public RecursiveASTVisitor { + using Base = RecursiveASTVisitor; + + const VarDecl *Guardian{nullptr}; + +public: + explicit GuardianVisitor(const VarDecl *Guardi

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
@@ -83,6 +83,65 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/113859 >From 8fce7f69eb5e28f6ec648ee0dc4cc23c793f64c0 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 27 Oct 2024 21:43:24 -0700 Subject: [PATCH 1/3] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Chris Apple via cfe-commits
@@ -11,11 +11,16 @@ RealtimeSanitizer (a.k.a. RTSan) is a real-time safety testing tool for C and C+ projects. RTSan can be used to detect real-time violations, i.e. calls to methods that are not safe for use in functions with deterministic run time requirements. RTSan consi

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function v2 (PR #110330)

2024-10-28 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm closed https://github.com/llvm/llvm-project/pull/110330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang/docs/FunctionEffectAnalysis.rst. (PR #109855)

2024-10-28 Thread via cfe-commits
Sirraide wrote: @dougsonos Now that this document exists, we should also update the function effects release note that the part 2 pr added to include a link to it. 👀 https://github.com/llvm/llvm-project/pull/109855 ___ cfe-commits mailing list cfe-com

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

2024-10-28 Thread Rahul Joshi via cfe-commits
jurahul wrote: @AaronBallman can you PTAL? https://github.com/llvm/llvm-project/pull/109220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread via cfe-commits
https://github.com/Sirraide commented: Effects paragraph lgtm. I’m not really familiar w/ rtsan, so I can’t comment on the rest. https://github.com/llvm/llvm-project/pull/113979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-28 Thread Malavika Samak via cfe-commits
@@ -427,6 +427,48 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { //- e. g. "Try harder to find a NamedDecl to point at in the note." //already duplicated // - call both from Sema and from here + std::function + SafeMaskedAccess; + unsigned int

[clang] [llvm] [HLSL] Re-implement countbits with the correct return type (PR #113189)

2024-10-28 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/113189 >From 23d62026c8338e6ad92495cfcaa54ff1fa5d08f0 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 16 Oct 2024 19:00:08 + Subject: [PATCH 1/5] implement countbits correctly --- clang/lib/Headers/hlsl/hlsl_

[clang] [WIP][Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-28 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/112284 >From 7e00765481784324450982e4789bf61bf66dbfdf Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 11 Oct 2024 12:24:58 -0700 Subject: [PATCH 1/2] [Wunsafe-buffer-usage] False positives for & expressio

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2024-10-28 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/112284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use StringRef::str() instead of std::string() cast (PR #113645)

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

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Rashmi Mudduluru via cfe-commits
@@ -83,6 +83,65 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Rashmi Mudduluru via cfe-commits
@@ -83,6 +83,65 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
@@ -48,6 +48,64 @@ bool isRefcountedStringsHack(const VarDecl *V) { return false; } +struct GuardianVisitor : public RecursiveASTVisitor { + using Base = RecursiveASTVisitor; + + const VarDecl *Guardian{nullptr}; + +public: + explicit GuardianVisitor(const VarDecl *Guardi

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Ryosuke Niwa via cfe-commits
@@ -83,6 +83,65 @@ void foo7(RefCountable* obj) { bar.obj->method(); } +void foo8(RefCountable* obj) { + RefPtr foo; + { +RefCountable *bar = foo.get(); +// expected-warning@-1{{Local variable 'bar' is uncounted and unsafe [alpha.webkit.UncountedLocalVarsChecker]}

[clang] [alpha.webkit.UncountedLocalVarsChecker] Warn the use of a raw pointer/reference when the guardian variable gets mutated. (PR #113859)

2024-10-28 Thread Rashmi Mudduluru via cfe-commits
@@ -48,6 +48,64 @@ bool isRefcountedStringsHack(const VarDecl *V) { return false; } +struct GuardianVisitor : public RecursiveASTVisitor { + using Base = RecursiveASTVisitor; + + const VarDecl *Guardian{nullptr}; + +public: + explicit GuardianVisitor(const VarDecl *Guardi

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Florian Mayer via cfe-commits
@@ -11,11 +11,16 @@ RealtimeSanitizer (a.k.a. RTSan) is a real-time safety testing tool for C and C+ projects. RTSan can be used to detect real-time violations, i.e. calls to methods that are not safe for use in functions with deterministic run time requirements. RTSan consi

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Chris Apple via cfe-commits
cjappl wrote: CC for review @dougsonos https://github.com/llvm/llvm-project/pull/113979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/113979.diff 1 Files Affected: - (modified) clang/docs/RealtimeSanitizer.rst (+8-3) ``diff diff --git a/clang/docs/RealtimeSanitizer.rst b/

[clang] [rtsan][NFC] Add documentation link to Function Effects (PR #113979)

2024-10-28 Thread Chris Apple via cfe-commits
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/113979 None >From d2a311863881486fbed6097d6358b096f305377a Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Mon, 28 Oct 2024 16:17:48 -0700 Subject: [PATCH] [rtsan][NFC] Add documentation link to Function Effects ---

[clang] 8e6856e - [Clang][TableGen] Use StringRef::str() instead of std::string() cast (#113645)

2024-10-28 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-10-28T16:15:39-07:00 New Revision: 8e6856e27859c90c5337a8328848b0959fe409fe URL: https://github.com/llvm/llvm-project/commit/8e6856e27859c90c5337a8328848b0959fe409fe DIFF: https://github.com/llvm/llvm-project/commit/8e6856e27859c90c5337a8328848b0959fe409fe.diff L

[clang] Emit constrained atan2 intrinsic for clang builtin (PR #113636)

2024-10-28 Thread Tex Riddell via cfe-commits
https://github.com/tex3d updated https://github.com/llvm/llvm-project/pull/113636 >From 7c7b72b48e07e0f34c2ee65e11e70db37f8c88b3 Mon Sep 17 00:00:00 2001 From: Tex Riddell Date: Tue, 15 Oct 2024 16:18:44 -0700 Subject: [PATCH 1/3] Emit constrained atan2 intrinsic for clang builtin This change

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Shoaib Meenai via cfe-commits
@@ -24,9 +27,149 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] clang: Remove requires system-linux from some driver tests (PR #111976)

2024-10-28 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/111976 >From 91c2f46274f83603552b12317c2fb87a8633ccc3 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 11 Oct 2024 14:33:32 +0400 Subject: [PATCH 1/7] clang: Remove requires system-linux from some driver tests

[clang] Add clang/docs/FunctionEffectAnalysis.rst. (PR #109855)

2024-10-28 Thread Chris Apple via cfe-commits
https://github.com/cjappl closed https://github.com/llvm/llvm-project/pull/109855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7bd8a16 - [X86] Don't allow '+f' as an inline asm constraint. (#113871)

2024-10-28 Thread via cfe-commits
Author: Craig Topper Date: 2024-10-28T13:20:46-07:00 New Revision: 7bd8a165f95123e390f9cbb0a6a5e60d835a4461 URL: https://github.com/llvm/llvm-project/commit/7bd8a165f95123e390f9cbb0a6a5e60d835a4461 DIFF: https://github.com/llvm/llvm-project/commit/7bd8a165f95123e390f9cbb0a6a5e60d835a4461.diff

  1   2   3   4   5   6   >