[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/101639 >From a1d5fffca7b8a63efa338f1aeac3a516145ca569 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 2 Aug 2024 16:36:31 +0800 Subject: [PATCH 1/2] [X86_64] Fix empty field error in vaarg of C++. Such struct

[clang] [Serialization] Add a callback to register new created predefined decls for DeserializationListener (PR #102850)

2024-08-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102850 >From 598ce1867b5ac36aa6da48be0556bb637ce1ddb0 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 12 Aug 2024 13:31:35 +0800 Subject: [PATCH] [Serialization] Add a callback to register new created predefin

[clang] cb372bd - Revert "[NFC] [C++20] [Modules] Adjust the implementation of wasDeclEmitted to make it more clear"

2024-08-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-12T14:50:32+08:00 New Revision: cb372bd5e789a7d5f1945b476e643d4abfd18f35 URL: https://github.com/llvm/llvm-project/commit/cb372bd5e789a7d5f1945b476e643d4abfd18f35 DIFF: https://github.com/llvm/llvm-project/commit/cb372bd5e789a7d5f1945b476e643d4abfd18f35.diff LO

[clang] 27ed9b4 - [clang][Interp][NFC] Move ctor compilation to compileConstructor

2024-08-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-08-12T08:47:55+02:00 New Revision: 27ed9b47977ff99e182b74f653d4d125d2baa896 URL: https://github.com/llvm/llvm-project/commit/27ed9b47977ff99e182b74f653d4d125d2baa896 DIFF: https://github.com/llvm/llvm-project/commit/27ed9b47977ff99e182b74f653d4d125d2baa896.diff LO

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker edited https://github.com/llvm/llvm-project/pull/101639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c6062d3 - [clang][Interp][NFC] Cleanup CheckActive()

2024-08-11 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-08-12T08:28:13+02:00 New Revision: c6062d38f74e600c185c30eec7afaa8d0a007424 URL: https://github.com/llvm/llvm-project/commit/c6062d38f74e600c185c30eec7afaa8d0a007424 DIFF: https://github.com/llvm/llvm-project/commit/c6062d38f74e600c185c30eec7afaa8d0a007424.diff LO

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker edited https://github.com/llvm/llvm-project/pull/101639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Add a callback to register new created predefined decls for DeserializationListener (PR #102850)

2024-08-11 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 7d4aa1ff6bab27b5442f4765336fa827479d7bbc 91fb8c787523a00d9fec11f065549fa000cac4a5 --e

[clang] [Serialization] Add a callback to register new created predefined decls for DeserializationListener (PR #102850)

2024-08-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102850 >From 91fb8c787523a00d9fec11f065549fa000cac4a5 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 12 Aug 2024 13:31:35 +0800 Subject: [PATCH] [Serialization] Add a callback to register new created predefin

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread Fangrui Song via cfe-commits
MaskRay wrote: `--print-runtime-dir` can be defined in multiple ways. The current definition is to print a directory suitable for `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on` configurations. This interppretation makes sense to me, as the "runtime" in "print-runtime-dir" matches `LLVM_ENABLE_PER_TARG

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
@@ -3124,26 +3124,76 @@ RValue X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr = Address(CGF.Builder.CreateG

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

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

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Max Winkler (MaxEW707) Changes Godbolt for reference: https://godbolt.org/z/ovKjvWc46 I definitely remember this being an extension in older versions of VS around VS 2012 but don't know when MSVC no longer exactly removed support for this

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

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

[clang] [Clang] [Sema] Error on reference types inside a union with msvc 1910+ (PR #102851)

2024-08-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/102851 Godbolt for reference: https://godbolt.org/z/ovKjvWc46 I definitely remember this being an extension in older versions of VS around VS 2012 but don't know when MSVC no longer exactly removed support for this

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-11 Thread via cfe-commits
https://github.com/skc7 closed https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 62ced81 - [Sanitizer] Make sanitizer passes idempotent (#99439)

2024-08-11 Thread via cfe-commits
Author: Chaitanya Date: 2024-08-12T11:16:44+05:30 New Revision: 62ced8116ba5274991af0e94cfdf873593c7764d URL: https://github.com/llvm/llvm-project/commit/62ced8116ba5274991af0e94cfdf873593c7764d DIFF: https://github.com/llvm/llvm-project/commit/62ced8116ba5274991af0e94cfdf873593c7764d.diff LOG

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-08-11 Thread via cfe-commits
h-vetinari wrote: I'm trying another approach here (now that #96171 showed we cannot get rid of `llvm_check_compiler_linker_flag` anyway) -- instead of doing the manual work-arounds for the linker flags & static targets everywhere, teach the existing function to do it (optionally). There's n

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/101639 >From a1d5fffca7b8a63efa338f1aeac3a516145ca569 Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 2 Aug 2024 16:36:31 +0800 Subject: [PATCH 1/2] [X86_64] Fix empty field error in vaarg of C++. Such struct

[clang-tools-extra] [include-cleaner] Unify symlink handling (PR #102615)

2024-08-11 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. thanks. https://github.com/llvm/llvm-project/pull/102615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-08-11 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/93429 >From 8c1b899aa174b107fece1edbf99eaf261bdea516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 25 Apr 2022 09:45:22 +0300 Subject: [PATCH 01/15] [runtimes] [CMake] Use CMAKE_REQUIRE

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [llvm] [openmp] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-08-11 Thread via cfe-commits
https://github.com/h-vetinari converted_to_draft https://github.com/llvm/llvm-project/pull/93429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Add a callback to register new created predefined decls for DeserializationListener (PR #102850)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/102684 The root cause of the issue is, it is possible that the predefined decl is not registered at the beginning of writing a module file but got c

[clang] [Serialization] Add a callback to register new created predefined decls for DeserializationListener (PR #102850)

2024-08-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/102850 Close https://github.com/llvm/llvm-project/issues/102684 The root cause of the issue is, it is possible that the predefined decl is not registered at the beginning of writing a module file but got created du

[clang-tools-extra] [clang-tidy] use upper case letters for bool conversion suffix (PR #102831)

2024-08-11 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp requested changes to this pull request. There might be people who don't want uppercase suffix, so this will cause problems to them. This should be put into a configuration option instead. https://github.com/llvm/llvm-project/pull/102831 _

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
@@ -3124,26 +3124,76 @@ RValue X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr = Address(CGF.Builder.CreateG

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Longsheng Mou via cfe-commits
https://github.com/CoTinker updated https://github.com/llvm/llvm-project/pull/101639 >From 328ae6052894eb45c4e7541dadf63a3a04540cda Mon Sep 17 00:00:00 2001 From: Longsheng Mou Date: Fri, 2 Aug 2024 16:36:31 +0800 Subject: [PATCH 1/2] [X86_64] Fix empty field error in vaarg of C++. Such struct

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-11 Thread Eli Friedman via cfe-commits
@@ -3124,26 +3124,76 @@ RValue X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr = Address(CGF.Builder.CreateG

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Max Winkler (MaxEW707) Changes Partial fix for https://github.com/llvm/llvm-project/issues/92204. This PR just fixes VS2019+ since that is the suite of compilers that I require link compatibility with at the moment. I still intend to fix V

[clang] [Clang] [AST] Fix placeholder return type name mangling for MSVC 1920+ / VS2019+ (PR #102848)

2024-08-11 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 created https://github.com/llvm/llvm-project/pull/102848 Partial fix for https://github.com/llvm/llvm-project/issues/92204. This PR just fixes VS2019+ since that is the suite of compilers that I require link compatibility with at the moment. I still intend to fix VS2

[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

2024-08-11 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Note I'm not really attached to merging this either. I mostly posted this to have a space to discuss the consequences of #70307/#100452. If the decision is that we don't want this, I'm fine with that. Also, if we change our mind based on user reports, this would be prett

[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

2024-08-11 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/102390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-11 Thread via cfe-commits
@@ -0,0 +1,45 @@ +// RUN: %check_clang_tidy %s bugprone-public-enable-shared-from-this %t -- -- + +namespace std { + +template class enable_shared_from_this {}; MichelleCDjunaidi wrote: Manually formatted. https://github.com/llvm/llvm-project/pull/102299 __

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-11 Thread via cfe-commits
https://github.com/MichelleCDjunaidi edited https://github.com/llvm/llvm-project/pull/102299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] sort C standards on status page in reverse chronological order (PR #102844)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (h-vetinari) Changes Put the newest standards first, same as for the [C++ status page](https://clang.llvm.org/cxx_status.html). The diff is pretty busted, but I swear I copy & pasted faithfully 😅 The only change beyond shuffling se

[clang] [clang][NFC] sort C standards on status page in reverse chronological order (PR #102844)

2024-08-11 Thread via cfe-commits
https://github.com/h-vetinari created https://github.com/llvm/llvm-project/pull/102844 Put the newest standards first, same as for the [C++ status page](https://clang.llvm.org/cxx_status.html). The diff is pretty busted, but I swear I copy & pasted faithfully 😅 The only change beyond shuffli

[clang] 4399f2a - [NFC] [C++20] [Modules] Adjust the implementation of wasDeclEmitted to make it more clear

2024-08-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-08-12T11:25:05+08:00 New Revision: 4399f2a5ef38df381c2b65052621131890194d59 URL: https://github.com/llvm/llvm-project/commit/4399f2a5ef38df381c2b65052621131890194d59 DIFF: https://github.com/llvm/llvm-project/commit/4399f2a5ef38df381c2b65052621131890194d59.diff LO

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-08-11 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 380569a0fd1f6cabdfe227ee71bac554347d61bb Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH] Support --sysroot= for ${arch}-windows-msvc targets I think it is

[clang] [clang][analyzer] Remove array bounds check from PointerSubChecker (PR #102580)

2024-08-11 Thread Ben Shi via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/benshi001 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/102580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-11 Thread via cfe-commits
@@ -0,0 +1,96 @@ +//===--- IncorrectEnableSharedFromThisCheck.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-Id

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-11 Thread via cfe-commits
https://github.com/MichelleCDjunaidi updated https://github.com/llvm/llvm-project/pull/102299 >From 75306bd83eb43d0606630f9f059fc04ad1b20b06 Mon Sep 17 00:00:00 2001 From: Michelle C Djunaidi Date: Wed, 7 Aug 2024 13:10:02 +0800 Subject: [PATCH 1/6] [clang-tidy] Add bugprone-public-enable-share

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-11 Thread Chuanqi Xu via cfe-commits
@@ -1230,6 +1230,57 @@ parsing their headers, those should be included after the import. If the imported modules don't provide such a header, one can be made manually for improved compile time performance. +Reachability of internal partition units +---

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-11 Thread Chuanqi Xu via cfe-commits
@@ -1230,6 +1230,57 @@ parsing their headers, those should be included after the import. If the imported modules don't provide such a header, one can be made manually for improved compile time performance. +Reachability of internal partition units +---

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-11 Thread Chuanqi Xu via cfe-commits
@@ -1230,6 +1230,57 @@ parsing their headers, those should be included after the import. If the imported modules don't provide such a header, one can be made manually for improved compile time performance. +Reachability of internal partition units +---

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-11 Thread Chuanqi Xu via cfe-commits
@@ -1230,6 +1230,57 @@ parsing their headers, those should be included after the import. If the imported modules don't provide such a header, one can be made manually for improved compile time performance. +Reachability of internal partition units +---

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/102572 >From c5766b29042cd5109c22f7c399ebc33ffd0f6b3b Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 9 Aug 2024 13:48:35 +0800 Subject: [PATCH 1/2] [Doc] [C++20] [Modules] Clarify the reachability of internal

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-08-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/86175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
farzonl wrote: this is looking pretty good will do a second pass tomorrow. https://github.com/llvm/llvm-project/pull/102683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,118 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; Make sure dxil operation function call

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-11 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/102622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,118 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; Make sure dxil operation function call

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; Make sure SPIRV operation function calls for normalize are lowered correctly. + +; CH

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -229,6 +230,75 @@ static bool expandLog10Intrinsic(CallInst *Orig) { return expandLogIntrinsic(Orig, numbers::ln2f / numbers::ln10f); } +static bool expandNormalizeIntrinsic(CallInst *Orig) { + Value *X = Orig->getOperand(0); + Type *Ty = Orig->getType(); + Type *EltTy

[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-11 Thread via cfe-commits
MichelleCDjunaidi wrote: > Actually an ASTVisitor approach could be better here, this way you could > create a set of all the `CXXRecordDecls` that publicly inherit from or > transitively inherit from `::std::enable_shared_from_this` during traversal To confirm, @njames93 do you mean clang::Re

[clang] [llvm] [DataLayout] Remove constructor accepting a pointer to Module (PR #102841)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sergei Barannikov (s-barannikov) Changes The constructor initializes `*this` with `M->getDataLayout()`, which is effectively the same as calling the copy constructor. There does not seem to be a case where a copy would be necessary. Note t

[clang] [llvm] [DataLayout] Remove constructor accepting a pointer to Module (PR #102841)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-nvptx Author: Sergei Barannikov (s-barannikov) Changes The constructor initializes `*this` with `M->getDataLayout()`, which is effectively the same as calling the copy constructor. There does not seem to be a case where a copy would be necessary.

[clang] [llvm] [DataLayout] Remove constructor accepting a pointer to Module (PR #102841)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sergei Barannikov (s-barannikov) Changes The constructor initializes `*this` with `M->getDataLayout()`, which is effectively the same as calling the copy constructor. There does not seem to be a case where a copy would be necessary.

[clang] [llvm] [DataLayout] Remove constructor accepting a pointer to Module (PR #102841)

2024-08-11 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov created https://github.com/llvm/llvm-project/pull/102841 The constructor initializes `*this` with `M->getDataLayout()`, which is effectively the same as calling the copy constructor. There does not seem to be a case where a copy would be necessary. Note that the

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-11 Thread Cameron Angus via cfe-commits
kamrann wrote: @ChuanqiXu9 I tested the small repro I had for this issue on latest from `main` and everything appears to be fine. https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-08-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From a9f228a344d928c2c7a0ffd70605a0665b2b9a07 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 3 Jun 2024 19:52:12 -0700 Subject: [PATCH] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload MIME-

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; Make sure SPIRV operation function calls for normalize are lowered correctly. + +; CH

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,10 @@ +; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation normalize does not support double overload type +; CHECK: Cannot create Dot2 operation: Invalid overload type + +define noundef <2 x double> @test

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,118 @@ +; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK +; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK + +; Make sure dxil operation function call

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,31 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -verify -verify-ignore-unexpected + +void test_too_few_arg() +{ + return __builtin_hlsl_normalize(); + // expected-error@-

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -18584,6 +18584,29 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, CGM.getHLSLRuntime().getLengthIntrinsic(), ArrayRef{X}, nullptr, "hlsl.length"); } + case Builtin::BI__builtin_hlsl_normalize: { +Value *X = EmitScalarExpr(E->getArg

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/102683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -18584,6 +18584,29 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, CGM.getHLSLRuntime().getLengthIntrinsic(), ArrayRef{X}, nullptr, "hlsl.length"); } + case Builtin::BI__builtin_hlsl_normalize: { +Value *X = EmitScalarExpr(E->getArg

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-11 Thread Farzon Lotfi via cfe-commits
@@ -4725,6 +4725,12 @@ def HLSLMad : LangBuiltin<"HLSL_LANG"> { let Prototype = "void(...)"; } +def HLSLNormalize : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_normalize"]; farzonl wrote: is this an elementwise case? isnt it `n = normali

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-08-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From af99a3106a886d634eace010295796b3111b99ee Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 3 Jun 2024 19:52:12 -0700 Subject: [PATCH] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload MIME-

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-11 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > See for example CXXRecordDecl's getLambdaContextDecl function. > Unfortunately there is an issue where we currently only store this lambda > context when we need it for mangling reasons, … Yeah, I remember we use that to store an ImplicitConceptSpecializationDecl as well, not

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandre Ganea (aganea) Changes Before this PR, `clang --print-runtime-dir` used to report a non-existent directory if `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF`. We now check if any of the known runtime directories exist before printing o

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/102834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Ensure `--print-runtime-dir` path exists (PR #102834)

2024-08-11 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea created https://github.com/llvm/llvm-project/pull/102834 Before this PR, `clang --print-runtime-dir` used to report a non-existant directory if `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF`. We now check if any of the known runtime directories exist before printing on std

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-08-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 1a3cf890f27db42684061794b9c95665db54656b Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 3 Jun 2024 19:52:12 -0700 Subject: [PATCH] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload MIME-

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > It is not only valuable to external resugarers. Another point that warrants > an introduction of it is for unevaluated lambdas. These lambdas e.g. > appearing as part of the `using Alias = decltype(lambda)` could carry a > requires expression and thus evaluating it requires t

[clang] Resolve FIXME: Look at E, not M (PR #85541)

2024-08-11 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Hmm. The best solution there is probably to use a consistent representation > but introduce some sort of `GLValueThatTheStandardAbsurdlyPretendsIsAnRValue` > (definitely the only and best word for this, ship it) that we can use as the > value category. IIRC, something similar

[clang] [llvm] [PAC][ELF][AArch64] Encode several ptrauth features in PAuth core info (PR #102508)

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

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-08-11 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 96f25f66fd86831e6039fc6ddf30fa8030595456 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 3 Jun 2024 19:52:12 -0700 Subject: [PATCH] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload MIME-

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Mital Ashok via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang-tools-extra] [clang-tidy] use upper case letters for bool conversion suffix (PR #102831)

2024-08-11 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (Da-Viper) Changes When readability-implicit-bool-conversion-check and readability-uppercase-literal-suffix-check is enabled this will cause you to apply a fix twice from (!i) -> (i == 0u) to (i == 0U) twice instead will

[clang-tools-extra] [clang-tidy] use upper case letters for bool conversion suffix (PR #102831)

2024-08-11 Thread via cfe-commits
https://github.com/Da-Viper created https://github.com/llvm/llvm-project/pull/102831 When readability-implicit-bool-conversion-check and readability-uppercase-literal-suffix-check is enabled this will cause you to apply a fix twice from (!i) -> (i == 0u) to (i == 0U) twice instead will skip t

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102824 >From 618e8c138544bab863da0d6595c6a9f38426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51 +0200 Subject: [PATCH] [clang][Interp] Fix diagnosing uninitialized ne

[clang] Resolve FIXME: Look at E, not M (PR #85541)

2024-08-11 Thread Rose Silicon via cfe-commits
https://github.com/RSilicon closed https://github.com/llvm/llvm-project/pull/85541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-11 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/102602 >From 7b4f999b39f4308cab253204e6be41ea7a70f695 Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 9 Aug 2024 14:37:47 +0300 Subject: [PATCH 1/4] clang/csa: add initial support for builtin overflow --- ..

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > can you add tests for non aggregate with non elligible constructors and > destructors ? I don't think that a class with a destructor not eligible via requires clause is well-formed per http://eel.is/c++draft/class.dtor#4: > At the end of the definition of a class, overload res

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101807 >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3 Aug 2024 13:05:21 +0300 Subject: [PATCH 1/4] [clang] Implement `__builtin_is_implicit_lifetime()` Th

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 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 293df8afae3ec1f99e44d6bc015e4edf2c165c8d 49de16a0126a3fe3284f017ee4a4969d41bb4094 --e

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
@@ -5637,6 +5638,27 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, return false; case UTT_IsTriviallyEqualityComparable: return isTriviallyEqualityComparableType(Self, T, KeyLoc); + case UTT_IsImplicitLifetime: { +DiagnoseVLAInCXXTypeTrait(Self

[clang] [clang] Implement `__builtin_is_implicit_lifetime()` (PR #101807)

2024-08-11 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/101807 >From 9c4e7ccf47d5ede2b6169effb2a09668f512a182 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sat, 3 Aug 2024 13:05:21 +0300 Subject: [PATCH 1/3] [clang] Implement `__builtin_is_implicit_lifetime()` Th

[clang] [clang][llvm-lit] Rewrite constexpr vectors test to use element access (PR #102757)

2024-08-11 Thread Amr Hesham via cfe-commits
@@ -1,10 +1,6 @@ -// RUN: %clang_cc1 -std=c++14 -Wno-unused-value %s -disable-llvm-passes -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -Wno-uninitialized -std=c++17 -fsyntax-only -verify AmrDeveloper wrote: @tbaederr Done https

[clang] [clang][llvm-lit] Rewrite constexpr vectors test to use element access (PR #102757)

2024-08-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/102757 >From 673b9e08de8a661c9deed2ee497889312f059f3d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 10 Aug 2024 16:54:33 +0200 Subject: [PATCH] [clang][llvm-lit] Rewrite constexpr vectors test to use ele

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-11 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 3364284d87035eaac9662d345d4ddee2714f8fd7 a928600fcf613ff1f85fa1e5093c7973d4b8cfb8 --e

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-11 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/102602 >From 3e0fcffa8fbea5f89ab927fd897c451bcafd8e5e Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 9 Aug 2024 14:37:47 +0300 Subject: [PATCH 1/4] clang/csa: add initial support for builtin overflow --- ..

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-11 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/102602 >From 3e0fcffa8fbea5f89ab927fd897c451bcafd8e5e Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Fri, 9 Aug 2024 14:37:47 +0300 Subject: [PATCH 1/3] clang/csa: add initial support for builtin overflow --- ..

[clang] [clang][Interp] Fix diagnosing uninitialized nested union fields (PR #102824)

2024-08-11 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/102824 >From 983411854aeb39a0ddba04f5d30b6aa284c297bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sun, 11 Aug 2024 19:52:51 +0200 Subject: [PATCH] [clang][Interp] Fix diagnosing uninitialized ne

  1   2   >