[clang] [clang][analyzer] Fix StreamChecker `ftell` and `fgetpos` at indeterminate file position. (PR #84191)

2024-03-07 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/84191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d72b7f9 - [clang][analyzer] Fix StreamChecker `ftell` and `fgetpos` at indeterminate file position. (#84191)

2024-03-07 Thread via cfe-commits
Author: Balázs Kéri Date: 2024-03-08T08:56:10+01:00 New Revision: d72b7f913300493480f78d4f23104d0f51d50b62 URL: https://github.com/llvm/llvm-project/commit/d72b7f913300493480f78d4f23104d0f51d50b62 DIFF: https://github.com/llvm/llvm-project/commit/d72b7f913300493480f78d4f23104d0f51d50b62.diff

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-07 Thread Craig Topper via cfe-commits
@@ -840,6 +886,33 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension, "string must be lowercase"); } + bool IsProfile = Arch.starts_with("rvi") || Arch.starts_with("rva") || +

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-07 Thread Craig Topper via cfe-commits
@@ -0,0 +1,189 @@ +//===-- RISCVProfiles.td - RISC-V Profiles -*- tablegen -*-===// +// +// 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:

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-07 Thread Craig Topper via cfe-commits
@@ -138,6 +150,8 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo { /// initializeProperties(). RISCVProcFamilyEnum getProcFamily() const { return RISCVProcFamily; } + RISCVProfileEnum getRISCVProfile() const { return RISCVProfile; } topperc wrote:

[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)

2024-03-07 Thread Wang Pengcheng via cfe-commits
wangpc-pp wrote: Ping. https://github.com/llvm/llvm-project/pull/76357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Respect field alignment in layout compatibility of structs (PR #84313)

2024-03-07 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/84313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b6a3400 - [clang] Respect field alignment in layout compatibility of structs (#84313)

2024-03-07 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-03-08T11:31:00+04:00 New Revision: b6a340023d383d1e77cb8d91d92c096f791fa8c0 URL: https://github.com/llvm/llvm-project/commit/b6a340023d383d1e77cb8d91d92c096f791fa8c0 DIFF:

[clang] [Clang][Sema] Allow access to a public template alias declaration that refers to friend's private nested type (PR #83847)

2024-03-07 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky updated https://github.com/llvm/llvm-project/pull/83847 >From a38ad9098c7f4dcffaa22b269bc2a36b5eb0fc4e Mon Sep 17 00:00:00 2001 From: huqizhi Date: Mon, 4 Mar 2024 21:51:07 +0800 Subject: [PATCH] [Clang][Sema] Allow access to a public template alias declaration that

[clang] [clang][dataflow] Add context-sensitive test for returning a record by value. (PR #84317)

2024-03-07 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/84317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9b74c43 - [clang][dataflow] Add context-sensitive test for returning a record by value. (#84317)

2024-03-07 Thread via cfe-commits
Author: martinboehme Date: 2024-03-08T08:19:41+01:00 New Revision: 9b74c43d70f4b39d6fea7b542d77f2b652e4d651 URL: https://github.com/llvm/llvm-project/commit/9b74c43d70f4b39d6fea7b542d77f2b652e4d651 DIFF: https://github.com/llvm/llvm-project/commit/9b74c43d70f4b39d6fea7b542d77f2b652e4d651.diff

[clang] [clang][dataflow] When analyzing ctors, don't initialize fields of `*this` with values. (PR #84164)

2024-03-07 Thread via cfe-commits
https://github.com/martinboehme closed https://github.com/llvm/llvm-project/pull/84164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2d539db - [clang][dataflow] When analyzing ctors, don't initialize fields of `*this` with values. (#84164)

2024-03-07 Thread via cfe-commits
Author: martinboehme Date: 2024-03-08T08:19:02+01:00 New Revision: 2d539db246fd9d26201255b84d04dacf2782eddf URL: https://github.com/llvm/llvm-project/commit/2d539db246fd9d26201255b84d04dacf2782eddf DIFF: https://github.com/llvm/llvm-project/commit/2d539db246fd9d26201255b84d04dacf2782eddf.diff

[clang-tools-extra] [clang-tidy]avoid bugprone-unused-return-value false positive for function with the same prefix as the default argument (PR #84333)

2024-03-07 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/84333 >From aaa9ea1db21b5de5d8be454ce1b1d05b219cccfc Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 7 Mar 2024 23:28:40 +0800 Subject: [PATCH 1/2] [clang-tidy]avoid bugprone-unused-return-value false

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: haha, sorry for the confusion. I don't have any outstanding PR at this point. Thanks for all the reviews :) https://github.com/llvm/llvm-project/pull/82305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: I just thought two PRs, accepted 1, then there were 0 left, and I was confused  https://github.com/llvm/llvm-project/pull/82305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: Oh right right right, so it's closed without committing, nvm then! https://github.com/llvm/llvm-project/pull/82305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: So this PR turned out to be not really correct because we can't get rid of local variable checker when calling a non-trivial function. https://github.com/llvm/llvm-project/pull/82305 ___ cfe-commits mailing list

[clang] [HIP] Make the HIP default architecture use the enum value (PR #84400)

2024-03-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/84400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] ADT] Add implementations for avgFloor and ceilFloor to APInt (PR #84427)

2024-03-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa closed https://github.com/llvm/llvm-project/pull/84427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-07 Thread Kees Cook via cfe-commits
https://github.com/kees edited https://github.com/llvm/llvm-project/pull/84428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kees Cook (kees) Changes GNU and MSVC have extensions where flexible array members (or their equivalent) can be in unions or alone in structs. This is already fully supported in Clang through the 0-sized array ("fake flexible

[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-07 Thread Kees Cook via cfe-commits
https://github.com/kees created https://github.com/llvm/llvm-project/pull/84428 GNU and MSVC have extensions where flexible array members (or their equivalent) can be in unions or alone in structs. This is already fully supported in Clang through the 0-sized array ("fake flexible array")

[clang] [llvm] ADT] Add implementations for avgFloor and ceilFloor to APInt (PR #84427)

2024-03-07 Thread Atousa Duprat via cfe-commits
https://github.com/Atousa created https://github.com/llvm/llvm-project/pull/84427 Supports both signed and unsigned expansions. SelectionDAG now calls the APInt implementation of these functions. >From ac75fc2873fc7b8eec6c24ba97f4673e94457c8e Mon Sep 17 00:00:00 2001 From: Atousa Duprat Date:

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Artem Dergachev via cfe-commits
@@ -27,6 +28,13 @@ tryToFindPtrOrigin(const Expr *E, bool StopAtFirstRefCountedObj) { E = tempExpr->getSubExpr(); continue; } +if (auto *DRE = dyn_cast(E)) { + auto *decl = DRE->getFoundDecl(); haoNoQ wrote: Is this really better

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: Hi, looks like I never got to properly review this one! I don't have major objections but I have some things to consider fixing in follow-up patches. https://github.com/llvm/llvm-project/pull/82305 ___ cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

2024-03-07 Thread Artem Dergachev via cfe-commits
@@ -95,11 +103,136 @@ tryToFindPtrOrigin(const Expr *E, bool StopAtFirstRefCountedObj) { return {E, false}; } +bool isGuardedScopeEmbeddedInGuardianScope(const VarDecl *Guarded, + const VarDecl *MaybeGuardian) { + assert(Guarded);

[clang] [alpha.webkit.UncountedCallArgsChecker] Don't assume local variables are safe & treat guarded local variable as safe function arguments (PR #82305)

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

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-07 Thread Xiang Li via cfe-commits
@@ -226,6 +226,47 @@ HLSLToolChain::TranslateArgs(const DerivedArgList , StringRef BoundArch, A->claim(); continue; } +if (A->getOption().getID() == options::OPT_dxc_hlsl_version) { + // Translate -HV into -std for llvm + // depending on the

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-03-07 Thread Petr Hosek via cfe-commits
petrhosek wrote: I agree with @MaskRay that prior to this change the BareMetal driver was using a logic that was inconsistent with all other drivers and not something we intend to support. The correct solution is to extend the BareMetal driver to support `multilib.yaml` for Clang runtime

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > > There are many `--no-offload-new-driver` test changes. They can be > > > pre-committed to make this default flip modify fewer files. > > > > > > I think it's much easier to keep these in a single patch, both for writing > > and with any potential reverting that it may

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-07 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/83316 >From 2afca3e91d96cc77f43556bbf71b6e60a22e45f2 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 28 Feb 2024 11:04:41 -0800 Subject: [PATCH 1/3] [Headers][X86] Add specific results to comparisons

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-07 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 b334664f9f3a098b6f3fd9cfd17b856a9edfe446 1d691620a0ef9632d85e4691dc644352d4abf2b2 --

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-07 Thread Paul T Robinson via cfe-commits
pogo59 wrote: @RKSimon note this will affect what the tooltips show. Is that okay? https://github.com/llvm/llvm-project/pull/83316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-07 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/83316 >From 2afca3e91d96cc77f43556bbf71b6e60a22e45f2 Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 28 Feb 2024 11:04:41 -0800 Subject: [PATCH 1/2] [Headers][X86] Add specific results to comparisons

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > There are many `--no-offload-new-driver` test changes. They can be > > pre-committed to make this default flip modify fewer files. > > I think it's much easier to keep these in a single patch, both for writing > and with any potential reverting that it may require. Since

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-07 Thread via cfe-commits
Kupa-Martin wrote: > Should we also have a C++ test for this fix? clang/test/Sema/warn-compare-enum-types-mismatch.c should cover both C and C++. Or do you mean some other kind of test? https://github.com/llvm/llvm-project/pull/84068 ___

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I could possibly precommit the basic checks for the ones that just check the phases / bindings. https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [IR] Change representation of getelementptr inrange (PR #84341)

2024-03-07 Thread Nicolai Hähnle via cfe-commits
nhaehnle wrote: Have you thought about the implications for dynamic (non-constant) indices? Stuff like ``` %gep = getelementptr [50 x {i32, [10 x i32]}], ptr %base, i32 0, i32 %outer_idx, i32 1, i32 %inner_idx ``` The current representation allows an `inrange` on the second-to-last index

[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Hi, this broke our downstream. What is the motivation for this, and how is > this intended to be used with compiler-rt locations being set by > multilib.yaml? We have something similar to what ARM does for multilibs.yaml > but with different paths, and this prevents the

[clang] [Clang][Sema] Fix type of enumerators in incomplete enumerations (PR #84068)

2024-03-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Should we also have a C++ test for this fix? https://github.com/llvm/llvm-project/pull/84068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > There are many `--no-offload-new-driver` test changes. They can be > pre-committed to make this default flip modify fewer files. I think it's much easier to keep these in a single patch, both for writing and with any potential reverting that it may require.

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/84285 >From dd9711be2368a299b408d0ff06ec9c1c0540083b Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 7 Mar 2024 15:19:28 +0800 Subject: [PATCH 1/3] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-07 Thread Chuanqi Xu via cfe-commits
@@ -893,102 +889,118 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { if (Format == ScanningOutputFormat::Full) FD.emplace(ModuleName.empty() ? Inputs.size() : 0); - if (Verbose) { -llvm::outs() << "Running clang-scan-deps on " <<

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-07 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 da4957be2365831c94eab0b52612367c29f1d299 e875b07ad16c7c66d8d9dd70efca30276981f639 --

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: There are many `--no-offload-new-driver` test changes. They can be pre-committed to make this default flip modify fewer files. https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-07 Thread Chuanqi Xu via cfe-commits
@@ -893,102 +889,118 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { if (Format == ScanningOutputFormat::Full) FD.emplace(ModuleName.empty() ? Inputs.size() : 0); - if (Verbose) { -llvm::outs() << "Running clang-scan-deps on " <<

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-07 Thread Chuanqi Xu via cfe-commits
@@ -744,6 +744,9 @@ getCompilationDataBase(int argc, char **argv, std::string ) { return nullptr; } + // Only 1 threads is required if P1689 per file mode. + NumThreads = 1; ChuanqiXu9 wrote: Makes sense. Done.

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/84285 >From dd9711be2368a299b408d0ff06ec9c1c0540083b Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Thu, 7 Mar 2024 15:19:28 +0800 Subject: [PATCH 1/2] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-03-07 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,11 @@ +// Note: %s must be preceded by --, otherwise it may be interpreted as a +// command-line option, e.g. on Mac where %s is commonly under /Users. +// +// Note: see also cl-zc.cpp + +// RUN: %clang_cl /TC /dev/null /E -Xclang -dM /Zc:__STDC__- 2>&1 | FileCheck %s

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2024-03-07 Thread Fangrui Song via cfe-commits
@@ -123,6 +123,15 @@ // CHECK-CHAR8_T_: "-fno-char8_t" +// RUN: %clang_cl /TC /dev/null /E -Xclang -dM 2> /dev/null | FileCheck -match-full-lines %s --check-prefix=NOSTDC MaskRay wrote: Driver tests usually only do `-###` and check the generated cc1

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

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

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I think this makes sense. https://github.com/llvm/llvm-project/pull/84184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-07 Thread Shafik Yaghmour via cfe-commits
@@ -0,0 +1,67 @@ +//===- SemaOpenACC.h - Semantic Analysis for OpenACC constructs ---===// +// +// 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:

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-07 Thread Paul T Robinson via cfe-commits
pogo59 wrote: @RKSimon I was not aware of the comparison intrinsics in emmintrin.h. I will follow that pattern. https://github.com/llvm/llvm-project/pull/83316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [llvm] [llvm][Support] Add and use errnoAsErrorCode (PR #84423)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities Author: Michael Spencer (Bigcheese) Changes LLVM is inconsistent about how it converts `errno` to `std::error_code`. This can cause problems because values outside of `std::errc` compare differently if one is system and one is

[clang] [clang-tools-extra] [llvm] [llvm][Support] Add and use errnoAsErrorCode (PR #84423)

2024-03-07 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/84423 LLVM is inconsistent about how it converts `errno` to `std::error_code`. This can cause problems because values outside of `std::errc` compare differently if one is system and one is generic on POSIX systems.

[clang] a4703e5 - [clang] Remove std::move in GenerateModuleAction::CreateMultiplexConsumer (NFC)

2024-03-07 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-03-08T10:19:07+08:00 New Revision: a4703e5bccc63eca45e0e4bff8f04f82d8622ebe URL: https://github.com/llvm/llvm-project/commit/a4703e5bccc63eca45e0e4bff8f04f82d8622ebe DIFF: https://github.com/llvm/llvm-project/commit/a4703e5bccc63eca45e0e4bff8f04f82d8622ebe.diff LOG:

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Offload] Move HIP and CUDA to new driver by default (PR #84420)

2024-03-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/84420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] DefaultNewDriver (PR #84420)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes - [HIP] Make the HIP default architecture use the enum value - [Offload] Move HIP and CUDA to new driver by default --- Patch is 115.28 KiB, truncated to 20.00 KiB below,

[clang] [C++20] [Modules] Introduce reduced BMI (PR #75894)

2024-03-07 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/75894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Finally handle target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2/avx (PR #84136)

2024-03-07 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: ping for review https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Add rounding and exception notes to conversions (PR #83447)

2024-03-07 Thread Paul T Robinson via cfe-commits
@@ -2180,7 +2180,8 @@ _mm256_cvtepi32_pd(__m128i __a) return (__m256d)__builtin_convertvector((__v4si)__a, __v4df); } -/// Converts a vector of [8 x i32] into a vector of [8 x float]. +/// Converts a vector of [8 x i32] into a vector of [8 x float]. Rounds inexact +///

[clang] [Headers][X86] Add rounding and exception notes to conversions (PR #83447)

2024-03-07 Thread Paul T Robinson via cfe-commits
https://github.com/pogo59 updated https://github.com/llvm/llvm-project/pull/83447 >From 64cdd358d0bf359383a5dd3d1da236a219644c9e Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Thu, 29 Feb 2024 08:59:26 -0800 Subject: [PATCH 1/2] [Headers][X86] Add rounding and exception notes to

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-07 Thread YAMAMOTO Takashi via cfe-commits
@@ -999,25 +1002,42 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module ) { // Register __wasm_longjmp function, which calls __builtin_wasm_longjmp. FunctionType *FTy = FunctionType::get( IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false); -

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-07 Thread YAMAMOTO Takashi via cfe-commits
https://github.com/yamt updated https://github.com/llvm/llvm-project/pull/84137 >From 1283ae6b5536810f8fbe183eda80997aa9f5cdc3 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Fri, 9 Feb 2024 15:49:55 +0900 Subject: [PATCH 1/3] [WebAssembly] Implement an alternative translation for

[clang] [Clang] [Sema] No longer diagnose type definitions in `offsetof` in C23 mode (PR #84169)

2024-03-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Should we verify that we diagnose the case where the definition includes a comma? https://github.com/llvm/llvm-project/pull/84169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-07 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,101 @@ +//===--- SuspiciousStringviewDataUsageCheck.cpp - clang-tidy --===// +// +// 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:

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-07 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/83716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add bugprone-suspicious-stringview-data-usage check (PR #83716)

2024-03-07 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. Found something unused, otherwise LGTM https://github.com/llvm/llvm-project/pull/83716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][test] Fix constant __builtin_popcountg test requiring __int128 (PR #84412)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: OverMighty (overmighty) Changes See https://lab.llvm.org/buildbot/#/builders/245/builds/21611/steps/5/logs/FAIL__Clang__constant-builtins-2_c. --- Full diff: https://github.com/llvm/llvm-project/pull/84412.diff 1 Files Affected: -

[clang] [clang][test] Fix constant __builtin_popcountg test requiring __int128 (PR #84412)

2024-03-07 Thread via cfe-commits
overmighty wrote: cc @Sirraide https://github.com/llvm/llvm-project/pull/84412 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][test] Fix constant __builtin_popcountg test requiring __int128 (PR #84412)

2024-03-07 Thread via cfe-commits
https://github.com/overmighty created https://github.com/llvm/llvm-project/pull/84412 See https://lab.llvm.org/buildbot/#/builders/245/builds/21611/steps/5/logs/FAIL__Clang__constant-builtins-2_c. >From ba035f2a40260398c439d6e34b7ed3a5fe6a10d0 Mon Sep 17 00:00:00 2001 From: OverMighty Date:

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-07 Thread Phoebe Wang via cfe-commits
@@ -18543,7 +18552,19 @@ GetTLSADDR(SelectionDAG , SDValue Chain, GlobalAddressSDNode *GA, MFI.setHasCalls(true); SDValue Glue = Chain.getValue(1); - return DAG.getCopyFromReg(Chain, dl, ReturnReg, PtrVT, Glue); + SDValue Ret = DAG.getCopyFromReg(Chain, dl, ReturnReg,

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-07 Thread Phoebe Wang via cfe-commits
@@ -18522,13 +18522,21 @@ GetTLSADDR(SelectionDAG , SDValue Chain, GlobalAddressSDNode *GA, MachineFrameInfo = DAG.getMachineFunction().getFrameInfo(); SDVTList NodeTys = DAG.getVTList(MVT::Other, MVT::Glue); SDLoc dl(GA); - SDValue TGA =

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (4ast) Changes --- Patch is 34.73 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/84410.diff 23 Files Affected: - (modified) clang/lib/Basic/Targets/BPF.cpp (+3) - (modified)

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-07 Thread via cfe-commits
https://github.com/4ast created https://github.com/llvm/llvm-project/pull/84410 None >From dd19f019066852dba15259cd201ce1b94fa5b6e6 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH 1/4] [BPF] Add addr_space_cast BPF instruction This commit

[clang] [clang][analyzer] Fix StreamChecker `ftell` and `fgetpos` at indeterminate file position. (PR #84191)

2024-03-07 Thread Ben Shi via cfe-commits
https://github.com/benshi001 approved this pull request. After eliminating `std::bind`, I hope there can be further solutions to reduce duplications. https://github.com/llvm/llvm-project/pull/84191 ___ cfe-commits mailing list

[clang] [clang] Implement constexpr support for __builtin_popcountg (PR #84318)

2024-03-07 Thread via cfe-commits
overmighty wrote: Usage of `__int128` in the test broke the clang-armv8-quick build: https://lab.llvm.org/buildbot/#/builders/245/builds/21611/steps/5/logs/FAIL__Clang__constant-builtins-2_c. https://github.com/llvm/llvm-project/pull/84318 ___

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-07 Thread Joshua Batista via cfe-commits
@@ -8545,6 +8545,11 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["/", "-"], "HV",

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-03-07 Thread Stefan Gränitz via cfe-commits
weliveindetail wrote: Squashed, rebased, polished and tested https://github.com/llvm/llvm-project/pull/83126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-03-07 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/83126 From 8ba5253b20d1aef0a542506a667f6b66b84ac5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Fri, 8 Mar 2024 00:08:56 +0100 Subject: [PATCH] [clang-repl] Expose

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-07 Thread Xiang Li via cfe-commits
@@ -8545,6 +8545,11 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["/", "-"], "HV",

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-07 Thread Alexandros Lamprineas via cfe-commits
@@ -85,7 +85,21 @@ int hoo(void) { } +// This should generate one target version but no resolver. +__attribute__((target_version("default"))) int unused_with_forward_default_decl(void); +__attribute__((target_version("mops"))) int unused_with_forward_default_decl(void) {

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alexandros Lamprineas (labrinea) Changes We would like the resolver to be generated eagerly, even if the versioned function is not called from the current translation unit. Fixes #81494. --- Patch is 42.97 KiB, truncated to

[clang] [FMV] Emit the resolver along with the default version definition. (PR #84405)

2024-03-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/84405 We would like the resolver to be generated eagerly, even if the versioned function is not called from the current translation unit. Fixes #81494. >From d2572439a8e130c03febd60366962c96b5b4501d Mon Sep 17

[clang] [clang] Implement constexpr support for __builtin_popcountg (PR #84318)

2024-03-07 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/84318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 487cfbe - [Clang] Implement constexpr support for `__builtin_popcountg` (#84318)

2024-03-07 Thread via cfe-commits
Author: OverMighty Date: 2024-03-08T01:01:37+01:00 New Revision: 487cfbe494413e12123b55dead5ef8742ef49fb2 URL: https://github.com/llvm/llvm-project/commit/487cfbe494413e12123b55dead5ef8742ef49fb2 DIFF: https://github.com/llvm/llvm-project/commit/487cfbe494413e12123b55dead5ef8742ef49fb2.diff

[clang] [InstallAPI] Collect C++ Decls (PR #84403)

2024-03-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida edited https://github.com/llvm/llvm-project/pull/84403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstallAPI] Add support for C++ headers (PR #84403)

2024-03-07 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: Looks like I made the mistake of deleting the target branch for PR: https://github.com/llvm/llvm-project/pull/83953 before updating it. Anyway, I applied @ributzka's forward declaration's suggestion. https://github.com/llvm/llvm-project/pull/84403

[clang] [InstallAPI] Add support for C++ headers (PR #84403)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes This includes capturing symbols for global variables, functions, classes, and templated defintions. As pre-determing what symbols are generated from C++ declarations can be non-trivial, InstallAPI only

[clang] [InstallAPI] Add support for C++ headers (PR #84403)

2024-03-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/84403 This includes capturing symbols for global variables, functions, classes, and templated defintions. As pre-determing what symbols are generated from C++ declarations can be non-trivial, InstallAPI only

[clang] [llvm] [Clang] CGCoroutine: Skip moving parameters if the allocation decision is false (PR #81195)

2024-03-07 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/81195 >From 23aca1a0130eeb7162484a13a26cb2fbc98f5cde Mon Sep 17 00:00:00 2001 From: Yuxuan Chen Date: Wed, 7 Feb 2024 16:05:42 -0800 Subject: [PATCH] Skip moving parameters if the allocation decision is false

[clang] [llvm] [InstallAPI] Collect global functions (PR #83952)

2024-03-07 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/83952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 50ae8a2 - [InstallAPI] Collect global functions (#83952)

2024-03-07 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-03-07T15:32:44-08:00 New Revision: 50ae8a2a38b618d76193bed04b1d7df6890d5c8a URL: https://github.com/llvm/llvm-project/commit/50ae8a2a38b618d76193bed04b1d7df6890d5c8a DIFF: https://github.com/llvm/llvm-project/commit/50ae8a2a38b618d76193bed04b1d7df6890d5c8a.diff

[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2024-03-07 Thread Max Winkler via cfe-commits
MaxEW707 wrote: Friendly reminder that I require someone to commit on my behalf since I do not have write access :). https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HIP] Make the HIP default architecture use the enum value (PR #84400)

2024-03-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: This default enum is used in other places, we should keep it consistent. --- Full diff: https://github.com/llvm/llvm-project/pull/84400.diff 2 Files Affected: -

[clang] [HIP] Make the HIP default architecture use the enum value (PR #84400)

2024-03-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/84400 Summary: This default enum is used in other places, we should keep it consistent. >From 4f791a35e775842e758e7be60fef6e3669986c7d Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 7 Mar 2024 17:20:58 -0600

  1   2   3   4   5   >